Hi everybody,

I have written an add-on which inserts its menu in the "OfficeMenuBar" as a top-level menu. Instead of using a .xcu installed with the add-on package, it creates and inserts its menu dynamically, using the "com.sun.star.configuration" module to modify OO's configuration, at the "/org.openoffice.Office.Addons/AddonUI/OfficeMenuBar" node.

I have limited this menu to com.sun.star.text.TextDocument modules.

Then the changes made in the configuration are committed through XChangesBatch.commitChanges().

Everything works well, except that the menu bars of the currently opened documents are not refreshed.
The new menu will appear only for documents opened afterwards.

I have tried XUIConfigurationPersistence.reload() on a ModuleUIConfigurationManager service (itself retrieved by XModuleUIConfigurationManagerSupplier.getUIConfigurationManager("com.sun .star.text.TextDocument")), it doesn't seem to improve the behavior.

Does someone know a way to refresh the currently opened menu bars ?

Julien Galand

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

Reply via email to