[Libreoffice] config & register toolbar controller in adddon

othman othmanelmoulat at gmail.com
Thu Oct 20 09:51:07 PDT 2011


i write the following controller.xcu

    <?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"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" oor:name="Controller"
oor:package="org.openoffice.Office.UI">
      <node oor:name="Registered">
        <node oor:name="ToolBar">
          <node oor:name="c10" oor:op="replace">
             <prop oor:name="Command">
                <value>.uno:LabelToolbar</value>
          </prop>
          <prop oor:name="Module">
                 <value></value>

          </prop>
          <prop oor:name="Controller">
                 
<value>com.sun.star.google.comp.StatusToolbarController</value>
          </prop>
          </node>
          <node oor:name="c11" oor:op="replace">
             <prop oor:name="Command">
                <value>.uno:ButtonToolbar</value>
          </prop>
          <prop oor:name="Module">
                 <value></value>

          </prop>
          <prop oor:name="Controller">
                 
<value>com.sun.star.google.comp.LoginToolbarController</value>
          </prop>
          </node>
         
        </node>
      </node>
    </oor:component-data>


then i register it in file uno-extension-manifest:

    <?xml version="1.0" encoding="UTF-8"?>
    <manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
      <manifest:file-entry
manifest:media-type="application/vnd.sun.star.configuration-data"
                          
manifest:full-path="registry/data/org/openoffice/Office/ProtocolHandler.xcu"/>
      <manifest:file-entry
manifest:media-type="application/vnd.sun.star.configuration-data"
                          
manifest:full-path="registry/data/org/openoffice/Office/Addons.xcu"/>
      <manifest:file-entry
manifest:media-type="application/vnd.sun.star.uno-component;type=Java"
                          
manifest:full-path="OpenOfficeGoogleConnect.jar"/>
      <manifest:file-entry
manifest:media-type="application/vnd.sun.star.configuration-data"
                           manifest:full-path="Controller.xcu"/>
    </manifest:manifest>


i also add this xml toolbar.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE toolbar:toolbar PUBLIC &quot;-//OpenOffice.org//DTD
OfficeDocument 1.0//EN&quot; &quot;toolbar.dtd&quot;>
    <toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar"
xmlns:xlink="http://www.w3.org/1999/xlink"
toolbar:uiname="custom_toolbar_1">
          <toolbar:toolbaritem xlink:href=".uno:.uno:LabelToolbar"/>
          <toolbar:toolbaritem xlink:href=".uno:ButtonToolbar"/>
    </toolbar:toolbar>



yet when i install the addon the two toolbar controleers don't show in
toolbar! i tried copying the toolbar.xml in the folder
"{installation}\OpenOffice.org3.3\user\config\soffice.cfg\modules\swriter\toolbar"
but yet the toolbar does'nt show!

why? is it impossible to configure a custom toolbar in addon using
controller.xcu ? and how to get it work in my addon?
 does OOO  provides an API to give advanced custom toolbar configuration in
a addon.

can someone help on this please?

thanks

--
View this message in context: http://nabble.documentfoundation.org/config-register-toolbar-controller-in-adddon-tp3438288p3438288.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list