Jörg Schmidt wrote:
Hello,

i know how i can register a new toolbar with a extension (i use
Addons.xcu-file in the extension).

But in this case the situation after the installation of the extension
is that the new toolbar is visible.

It is possible to register a user-defined toolbar with a extension which
ist not visible directly after the installation?
(the new toolbar should be only visible when i manually activate the
toolbar in the menu view-toolbars...)

i tried to use the file CalcWindowState.xcu (in the extension) with:

<?xml version="1.0" encoding="UTF-8"?>
<oor:component-data xmlns:oor="http://openoffice.org/2001/registry";
 xmlns:xs="http://www.w3.org/2001/XMLSchema";
 oor:name="CalcWindowState"
 oor:package="org.openoffice.Office.UI">
   <node oor:name="UIElements">
      <node oor:name="States">
         <node
oor:name="private:resource/toolbar/addon_jm.OfficeToolBar"
oor:op="replace">
            <prop oor:name="UIName" oor:type="xs:string">
               <value>jm toolbar</value>
            </prop>
            <prop oor:name="Visible" oor:type="xs:boolean">
               <value>false</value>
            </prop>
         </node>
      </node>
   </node>
</oor:component-data>


but that work not for me.
Hi Jörg,

You can define a user-defined toolbar with an extension but that must be done using the UI configuration API. This is not an easy way to create toolbars and I don't see any benefit for you to use a user-defined instead of an add-on toolbar (there is one exception as user-defined toolbars can be configured by a user, add-on toolbars not). You can influence the visibility of an add-on toolbar via separate <Module>WindowState.xcu files. There is one thing you have to keep in mind and that many people miss when they provide configuration files within their extension. The configuration uses different layers with priorities, that means the user-layer always have the highest priority and settings there overrule settings in the extension and shared layer. I think in your case is a CalcWindowState.xcu file in your user-layer which defines your add-on toolbar as visible. Just remove the whole CalcWindowState.xcu file and try again. It's possible to define more than one add-on toolbar for your extension and you can define the visibility for every toolbar separately.

Regards,
Carsten

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to