Julien Galand wrote:
Le 16 oct. 06, à 13:38, Carsten Driesner a écrit :
I checked my code and it works without any problem. OpenOffice.org
internally uses the same mechanism, if you customize the menubar with
Tools-Customize. Please check if you use the correct frame to
destroy/create the menubar.
Hi Carsten,
I have checked more thoroughly, and it seems that your sample code (with
destroyElement/createElement) does nothing if called too early during
the startup phase (even though the document and its frame is visually
complete). I have tried to call it later, and it works. Thank you again
for this.
Although your solution may work in most cases, a crash would leave
persistent changes. You should consider to use transient changes on
the user interface. The Basic code at the end of this message uses the
transient user interface feature to change the menu bar for a frame.
No other frame can see the changes and even a crash won't change any
file.
---------------------------------------------------------
Sample code to make transient changes on a frame menu bar
(...)
I agree perfectly that the persistant change made to the menu bar by my
add-on isn't satisfying.
I will try your alternative solution (transient modifications) as soon
as I can.
However, I fear a bit about using so many "unpublished" features, mostly
because we will sell our add-on to many customers who will upgrade OO
regularly but not necessarily our add-on.
Could you please tell me your feedback about the stability of this
"underdocumented" API in the future ?
(I mean, accessing the layout manager, retrieving the menu bar by its
element name, setting the 'Persistent' property, using the element
settings, browsing through the menu tree, etc.)
Can I be confident about its lifetime ?
Thank you anyway for your complete answer.
Hi Julien,
You're right that these APIs are not well documented, only the IDL files
have comments. That's one reason why they are currently not published.
We want to finalize them for OpenOffice.org 2.2 (a formal process) and
after finalization they cannot be changed in the future. As these
services/interfaces are more than two years old and no big issues have
been reported so far I would be very surprised, if there will be changes
during the finalization process. Therefore we want to encourage you to
use these services/interfaces to implement your add-on.
Regards,
Carsten
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]