Re: [api-dev] Re: [users] Macro in 1.1.4 does not work in 2.0

2006-06-08 Thread Miguel Quirós
El mar, 06-06-2006 a las 21:38 -0400, Andrew Douglas Pitonyak escribió:
 Miguel Quirós wrote:
 
 Thank you very much for your answer. As I told, I am not expert in
 writing macros and I am just using the things that I can see are used by
 the macro recorder (the dispatcher) and try to adapt them to my needs.
 From your answer, I deduce that there are methods easier to use than the
 dispatcher (.searchString).
   
 
 Unfortunately, they are not easier, because you need to learn how things 
 work inside of OOo.
 Many examples are available that can be adapted to the problems that you 
 want to solve. Also, sometimes the macro recorder works for what you 
 want, and sometimes it does not.
 I have a free macro document that contains many examples (this is 
 different than my book):
 
 http://www.pitonyak.org/AndrewMacro.odt
 

Thank you again. I hava had a quick look and it looks like a magnificent
work (I imagine that the book will be even more magnificent). I will
need to find some time to grab at least the fundamentals of what it is
said here.

 There are so many resources that I can not easily list them all. There 
 are code snippets with examples:
 
 http://codesnippets.services.openoffice.org/
 
 There is a forum that you can search:
 
 http://www.oooforum.org/
 
 My needs are to search all occurrences of a determinate string in a
 document 
 
 You did not say why you wanted to search for every occurrence of the 
 string. Ignoring the replace it part, here is an example that finds 
 all occurrences:
 
 Take a look at my macro document in section 7.14 titled  Search And 
 Replace. Does this help at all?
 

At first sight, I think I have found something useful. The result of
findFirst used as result.end can be used for findNext as starting point
to find the next occurence. Anyway, it is clear I would need to find
time to learn more, not easy ...

In any case, thanks a lot for your help.

 and, in some cases just replace it by another simple string (in
 which case I see that there is something called .replaceAll that may be
 useful and easy to use) and in other cases by something more complicated
 like putting a new string with special symbols, superindexes , etc in
 it, in this case perhaps .replaceAll cannot do all the work.
 
 As suggested, I am sending this message also to dev@api.openoffice.org
 
   
 
 
-- 
Miguel Quirós Olozábal
Departamento de Química Inorgánica. Facultad de Ciencias.
Universidad de Granada. 18071 Granada. SPAIN
email:mquirosatugrdotes
  mquirosarrobaugrpuntoes

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Problem to create a predefined Query

2006-06-08 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Stefan,

 I want to add a new QueryDefinition to the DefenitionContainer. It's an
 example from the OOo Developer Guide (12.2.2 DataSources - Adding and
 Editing Predefined Queries)
 
 The Method createQuerydefinition() which I'm using is one-to-one from
 the CodeSamples.java (see code below)
 
 The Problem is that the last-but-one command returns null (= the xStore
 variable is null).

Those last two lines look like nonsense, the query container is not
storable. At the very moment you do an insertByName, the query is part
of the query container.
However, for persistence of your change, you need to store the *database
document*, which in fact has the XStorable interface (I suppose this is
where the XStorable in the example wrongly came from). For this, query
the data source for XDocumentDataSource, obtain the document, and ask it
for its XStorable interface.

Could you please write an issue for this bug in the DevGuide and assign
it to me ([EMAIL PROTECTED])? Thanks.

 I have read in the api reference that XSingleServiceFactory is
 deprecated and it is recommended to use the XSingleComponentFactory
 instead.

Deprecation doesn't mean all implementations using it are already
migrated. (I'm not even sure the deprecation is meant for the particular
way how we use the interface here, but that might be another story.) It
just means that you are encouraged to use the new interface if it's
present - but here it isn't. So, just stick with the
XSingleServiceFactory, and everything should be fine :)

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Re: [users] Macro in 1.1.4 does not work in 2.0

2006-06-08 Thread Andrew Douglas Pitonyak

Your welcome. Be certain to ask if you have other questions.

Miguel Quirós wrote:


El mar, 06-06-2006 a las 21:38 -0400, Andrew Douglas Pitonyak escribió:
 


Miguel Quirós wrote:

   


Thank you very much for your answer. As I told, I am not expert in
writing macros and I am just using the things that I can see are used by
the macro recorder (the dispatcher) and try to adapt them to my needs.

From your answer, I deduce that there are methods easier to use than the

dispatcher (.searchString).


 

Unfortunately, they are not easier, because you need to learn how things 
work inside of OOo.
Many examples are available that can be adapted to the problems that you 
want to solve. Also, sometimes the macro recorder works for what you 
want, and sometimes it does not.
I have a free macro document that contains many examples (this is 
different than my book):


http://www.pitonyak.org/AndrewMacro.odt

   



Thank you again. I hava had a quick look and it looks like a magnificent
work (I imagine that the book will be even more magnificent). I will
need to find some time to grab at least the fundamentals of what it is
said here.

 

There are so many resources that I can not easily list them all. There 
are code snippets with examples:


http://codesnippets.services.openoffice.org/

There is a forum that you can search:

http://www.oooforum.org/

   


My needs are to search all occurrences of a determinate string in a
document 

 

You did not say why you wanted to search for every occurrence of the 
string. Ignoring the replace it part, here is an example that finds 
all occurrences:


Take a look at my macro document in section 7.14 titled  Search And 
Replace. Does this help at all?


   



At first sight, I think I have found something useful. The result of
findFirst used as result.end can be used for findNext as starting point
to find the next occurence. Anyway, it is clear I would need to find
time to learn more, not easy ...

In any case, thanks a lot for your help.

 


and, in some cases just replace it by another simple string (in
which case I see that there is something called .replaceAll that may be
useful and easy to use) and in other cases by something more complicated
like putting a new string with special symbols, superindexes , etc in
it, in this case perhaps .replaceAll cannot do all the work.

As suggested, I am sending this message also to dev@api.openoffice.org



 



--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Macro to accept all tracked changes

2006-06-08 Thread Jo

Christian Junker schreef:

Hi Jo,

it's not clear to me what your goal is, can you be a bit more specific
so that people can more easily help you find a solution?

2006/6/3, Jo [EMAIL PROTECTED]:

Hi,

I created the following with Record Macro to record all changes made to
a document. I was wondering if there would be a cleaner way to
accomplish this. (i.e. without dispatcher)

Sub AcceptTrackedChanges
  dim document   as object
  dim dispatcher as object

  document   = ThisComponent.CurrentController.Frame
  dispatcher = createUnoService(com.sun.star.frame.DispatchHelper)

  dispatcher.executeDispatch(document, .uno:AcceptTrackedChanges, ,
0, Array())
End Sub

Hi Christian,

I read in Andrew Pitonyak's book that working with the dispatcher is 
sort of a last resort. The names of the dispatcher objects may change 
from one release to another the book says, so I have a working solution, 
but I was wondering if there is a better solution that doesn't depend on 
the dispatcher.


Many thanks for your answer,

Jo

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] How to add a toolbar and its icons to a uno.pkg

2006-06-08 Thread Paolo Mantovani
Alle 21:57, mercoledì 7 giugno 2006, Jo ha scritto:
[...]
 Ciao Paolo,
[...]
 I found a typo on http://www.paolo-mantovani.org/downloads/PyInLettere/

 After installing PyInLettere UNo Package you will find a new function
 under the Text cathegory

 - category

 Spero che aiuta,

Of course! :-) thank you very much, I will fix it ASAP

ciao
Paolo

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[api-dev] [EMAIL PROTECTED] TOPIC: Contributing

2006-06-08 Thread Michael Hoennig
Dear OpenOffice.org community,

This is the 2-weekly announcement of current issues regarding the
OOo API project which I want to hightlight to the community.


*** =
*** Todays Issue: Contributing to the OOo API Project
*** -

The OOo community needs YOUR contribution too.  And we are sure that
you can contribute real value to OOo.  Don't know how?  YOU too can
contribute to the OOo API project by:

- Reviewing the documentation and reporting issues if you find any
- Useing the OOo API and reporting issues if you find any
- Answering the Questions of other Users of the OOo API
- Summarizing answers which were given to questions (CodeSnippets)
- Contributing your larger API examples to our example collection
- Pointing out important articles for the [EMAIL PROTECTED] NEWSLETTER 
- Tracking unanswered questions on this mailing list
- Preparing the next issue of [EMAIL PROTECTED] TOPIC
- Writing Test Cases
- Translating Examples to C++ (NEW!)
- Becoming an Official OOo Contributor

Each idea contains a short description of how you could help in
its respect, one ore more URLs for more information and an estimation
about the efford on the task.


*** =
*** Reviewing the documentation and report issues if you find any
*** -

Besides others, the OOo SDK contains a Developers Guide and a
Reference Guide.  It's not only important for developers who
want to develop applications with OOo to know these well.
There is also always room for improvement in such documents.

Thus, read the documentation:
  - http://api.openoffice.org/DevelopersGuide/DevelopersGuide.html
  - http://api.openoffice.org/docs/common/ref/com/sun/star/module-ix.html

And when you find anything to improve which you think should actually
be improved, report an issue to IssueZilla.

After once being registered with IssueZilla, reporting an issue is
just a matter of minutes.  


*** =
*** Using the OOo API and reporting issues if you find any
*** -

Next you might want to use the OOo API for your own projects.
Nothing is perfect, thus don't hesitate to report problems you
consider worth getting fixed to IssueZilla.

Here you find a description of OOos IssueZilla:
  - http://www.openoffice.org/project_issues.html

After once being registered with IssueZilla, reporting an issue is
just a matter of minutes.  Of course code examples, well stripped 
down to the point, would help us even more.  Thus count about up to
30 minutes for a complex issue. 


*** =
*** Answering the Questions of other Users of the OOo API
*** -

dev@api.openoffice.org is not an official support medium.  But that
does not mean, we do not want questions answers.  The OOo developers
will do their very best to answer questions, but WE NEED YOUR HELP!

The OOo core development team is very small compared to competing
projects.  Thus we cannot answer all questions.  If you know an
answer of somebody elses question, please post it to the list.
If you are not sure, answer anyway, but mention your incertitude.

This way you give the core developers more space to answer the tough
questions, maybe your next tough question.

If you know the answer off hand, it only needs a few minutes to
contribute by answering questions.  But we appreciate it even
more if you have a vague idea and do some research.  


*** =
*** Summarizing answers which were given to questions (CodeSnippets)
*** -

If you asked a question and got a satisfactory answer with a code
example, be so nice and save it for somebody else who might have
the same question in future.  The mail archive can be searched,
but the search features are not good enough, mostly because mails
are not structured enough.  But there is a better way:

Summarize your question and the given answer(s) in an XML format
for CodeSnippets.  You can find more information here:

  - http://api.openoffice.org/SDK/snippets/

To delopy a CodeSnippet, you need about 15 minutes each.  
Don't you think that the answer given to you was worth it?

Please submit the created codesnippet to the mailinglist
dev@api.openoffice.org and it will be integrated into the
snippet-collection on http://codesnippets.services.openoffice.org/ 
by one of the comminity members with CVS commit rights.

As an addon to easily create codesnippets Paolo Mantovani  has