Re: [api-dev] Assign to Save)-as) events behaviour

2006-09-08 Thread Paolo Mantovani
Hi Mathias,

First of all, thanks for useful information and suggestions 
Please, see my comments in line

Alle 08:50, giovedì 7 settembre 2006, Mathias Bauer ha scritto:
[]
  Although an official support is actually missing, with a creative ;-)
  use of the createUnoListener() function it's possible to intercept
  dispatches and replace dispatch actions with your arbitrary basic code.

 Yes, correct. Of course this is something I recommend only to
 experienced developers. 

Yes, I agree.

 Thanks for posting this example. Does it exist 
 as a code snippet BTW?

No, but there should be an old version (more or less the same code) in the 
Andrew Pitonyak Macro document.
Anyway if you think it's appropriate I can submit it as a code snippet.



 We should mention two things here:

 Your example does not support the StatusListeners so it will not send
 any status events to the GUI. This will work in many cases but not in
 all. In case of the Save command this command will never be disabled
 then. This is not a serious problem but it will look unusual at least.

Of course you are right!
With a small work I've been able to manage the status-listener (at least for 
the .uno:Save dispatch) directly from my basic program.


 In this case it could help to redirect StatusListeners to the
 SlaveDispatcher.

This would seem a bit more difficult, but I've to experiment more...



 The interceptor also must be registered somehow, so binding the macro
 that registers it to the event OnViewCreated on a global level is
 recommened.

I can't find this event among the ones available in the user interface.
Perhaps is it only available via the API ? 

Thanks
Paolo

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



[api-dev] Disabling Commands at runtime depending on context

2006-09-08 Thread Jimmy
Now that I finally got my DisptachInterceptor running (thanks to 
Mathias), I'd like my application to have the following behaviour:


Depending on the cursor context I'd like to enable or gray-out commands.

1.) How can I fire an event whenever the context of the cursor changes. 
For example the Cursor moves from one paragraph style to another, or 
into a texttable ...I always have to check for the context and do step (2).


2.) How can I gray-out and enable commands at runtime? I got my 
DispatchInterceptor to gray out commands when initiated but how can I 
change the behaviour at runtime? Do I have to write more than one 
DispatchProviderInterceptor and release and register them all the time 
depending on the context?


Thanks for the help
Jimmy

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



[api-dev] Problem: rtf files haven't header and footer.

2006-09-08 Thread aloizio

Hi everybody,

I am trying to merge a lot of RTF documents into only one rtf document. The
problem happens when some rtf files have header and footer. They don't
appear in the final merged document. Why the header and footer do not appear
in merged document? Should I set any parameter of Xcursor or XText?



-- 
View this message in context: 
http://www.nabble.com/Problem%3A-rtf-files-haven%27t-header-and-footer.-tf2239124.html#a6209036
Sent from the openoffice - api dev forum at Nabble.com.

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



Re: [api-dev] Disabling Commands at runtime depending on context

2006-09-08 Thread Jimmy
Alright, got a first hint and solved question Nr.1 with a 
XSelectionChangeListener. This only leaves question 2 open :)



Jimmy schrieb:
Now that I finally got my DisptachInterceptor running (thanks to 
Mathias), I'd like my application to have the following behaviour:


Depending on the cursor context I'd like to enable or gray-out commands.

1.) How can I fire an event whenever the context of the cursor 
changes. For example the Cursor moves from one paragraph style to 
another, or into a texttable ...I always have to check for the context 
and do step (2).


2.) How can I gray-out and enable commands at runtime? I got my 
DispatchInterceptor to gray out commands when initiated but how can I 
change the behaviour at runtime? Do I have to write more than one 
DispatchProviderInterceptor and release and register them all the time 
depending on the context?


Thanks for the help
Jimmy

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



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



Re: [api-dev] Disabling Commands at runtime depending on context

2006-09-08 Thread Carsten Driesner

Jimmy wrote:
2.) How can I gray-out and enable commands at runtime? I got my 
DispatchInterceptor to gray out commands when initiated but how can I 
change the behaviour at runtime? Do I have to write more than one 
DispatchProviderInterceptor and release and register them all the time 
depending on the context?


Hi Jimmy,

The user interface elements register themselves at the dispatch objects 
as listeners. These objects are responsible to provide the correct state 
to the listeners (via com.sun.star.frame.XStatusListener::statusChanged 
). Therefore the dispatch objects (provided by your dispatch 
interceptor) must call statusChanged on the listeners to offer the 
correct state information.


Regards,
Carsten

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



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

2006-09-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 

Re: [api-dev] How can I concatenate a stream word collection

2006-09-08 Thread Andrew Douglas Pitonyak
I was never able to insert one document into another using a stream... I 
can open a document using certain types of streams (Never from a stream 
obtained from a database), but not insert (note that I use Basic).


aloizio wrote:


Hi

I am able to store a document like a stream into database using BLOB, but I
am not able to merge the documents that are in stream format.

 


--
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]