Thanks Ariel and Oliver for your replies.

I'm doing all the things that you have mentioned in your mails, but still I don't see any progress. To check it out, I created a new project just for this purpose (with the help of OOo plugin on NB).

I'm attaching the Addons.xcu, WriterWindowState.xcu and the MANIFEST files with this mail. Can you see if there is any problem with this? Oliver I did delete all the files from the user\registry\cache and uninstalled the extensions and reinstalled the same. No luck !!

Regards,
Karthik

Ariel Constenla-Haile wrote:
Hi Karthik,

Karthik Sudarshan escribió:
Hi Ariel,
Thanks for the pointer. But as in the mail thread I have the same problem that the "Add-on 1" doesn't change even after adding the WindowState.xcu file. I just tested it with WriterWindowState.xcu example file that you had provided and still no change. I've ensured that the node:name value in Addons.xcu and the name in the WriterWindowState.xcu are the same and the entry has been added to the manifest file as well. Is there anything else that I need to be looking into?

your enumeration seems to be complete.
Just make sure that:

* if in Addons.xcu you have a toolbar

    <node oor:name="AddonUI">
        <node oor:name="OfficeToolBar">
<node oor:name="ar.com.arielconstenlahaile.demo" oor:op="replace">
        ...

in *WindowState.xcu yo have

    <node oor:name="UIElements">
        <node oor:name="States">
<node oor:name="private:resource/toolbar/addon_ar.com.arielconstenlahaile.demo" oor:op="replace">


that is: the name for the "States" node has the following schema

private:resource/toolbar/addon_[the name of the toolbar in Addons.xcu]


* *WindowState.xcu has the correct package name:
 for example, for OOo Calc's window state
<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">

* this is added to the manifest, and the entry really points to it:


<manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
                       manifest:full-path="WriterWindowState.xcu"/>
<manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
                       manifest:full-path="CalcWindowState.xcu"/>

means that WriterWindowState.xcu and CalcWindowState.xcu are in the extension's root directory.

Beside these, the feature works OK in DEV300_m38, and I'm not aware of any issue with it.

Also if I need this toolbar in all the OOo modules, should I add one WindowState.xcu file for each module??

sorry :-( but yes, you have to make a *WindowState.xcu for *every* OOo module (sounds like a non-sense, but that's how thing work now - you may try submitting a RFE).

Regards

<?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="WriterWindowState"
oor:package="org.openoffice.Office.UI">
     <node oor:name="UIElements">
         <node oor:name="States">
             <node oor:name="private:resource/toolbar/addon_com.example.toolbartest" oor:op="replace">
                 <prop oor:name="UIName" oor:type="xs:string">
                     <value xml:lang="en-US">Test Name</value>
                 </prop>
                 <prop oor:name="Visible" oor:type="xs:boolean">
                     <value>true</value>
                 </prop>
                 <prop oor:name="Docked" oor:type="xs:boolean">
                     <value>true</value>
                 </prop>
             </node>
         </node>
     </node>
</oor:component-data>
<?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="Addons" oor:package="org.openoffice.Office">
  <node oor:name="AddonUI">

    <node oor:name="OfficeToolBar">
      <node oor:name="com.example.toolbartest" oor:op="replace">
      <node oor:name="m1" oor:op="replace">
        <prop oor:name="URL" oor:type="xs:string">
          <value>com.example.toolbartest:Test1</value>
        </prop>
        <prop oor:name="ImageIdentifier" oor:type="xs:string">
          <value/>
        </prop>
        <prop oor:name="Target" oor:type="xs:string">
          <value>_self</value>
        </prop>
        <prop oor:name="Context" oor:type="xs:string">
          <value>com.sun.star.frame.Bibilography,com.sun.star.chart.ChartDocument,com.sun.star.drawing.DrawingDocument,com.sun.star.formula.FormulaProperties,com.sun.star.presentation.PresentationDocument,com.sun.star.sheet.SpreadsheetDocument,com.sun.star.text.TextDocument</value>
        </prop>
        <prop oor:name="Title" oor:type="xs:string">
          <value/>
          <value xml:lang="en">Command0</value>
        </prop>
      </node>
      </node>
    </node>
    <node oor:name="Images">
      <node oor:name="com.example.toolbartest.test1.images" oor:op="replace">
        <prop oor:name="URL" oor:type="xs:string">
          <value>com.example.toolbartest:Test1</value>
        </prop>
        <node oor:name="UserDefinedImages">
          <prop oor:name="ImageSmallURL">
            <value/>
          </prop>
          <prop oor:name="ImageBigURL">
            <value/>
          </prop>
          <prop oor:name="ImageSmallHCURL">
            <value/>
          </prop>
          <prop oor:name="ImageBigHCURL">
            <value/>
          </prop>
        </node>
      </node>
      </node>
  </node>
</oor:component-data>
<?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.uno-component;type=Java"
                       manifest:full-path="ToolbarTest.jar"/>
  <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
                       manifest:full-path="ProtocolHandler.xcu"/>
  <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
                       manifest:full-path="Addons.xcu"/>
  <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
                       manifest:full-path="WriterWindowState.xcu"/>
</manifest:manifest>

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

Reply via email to