Placement of addon toolbar

Stephan Bergmann sbergman at redhat.com
Mon Sep 18 09:00:51 UTC 2017


On 09/17/2017 09:46 AM, Jan Rheinländer wrote:
> my Addon defines a toolbar with the following xml. The user can place
> this toolbar anywhere on the screen, e.g. on the side.
> 
> But after every update of the Addon ("unopkg add"), the toolbar is back
> at the top of the screen. Is there a way to prevent that?
> 
> <?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_de.gmx.rheinlaender.jan.imath"
> oor:op="replace">

If you use oor:op="fuse" instead of "replace", an already existing set 
element will not be replaced completely.  Only the props given 
explicitly here will take on their new values.  Any other props ("Pos", 
"Size", etc.) will keep the values already set (if any).  (The latter 
may or may not be a problem for your actual use case.  There's 
unfortunately no way to add the set element with the given props only if 
the set element does not yet exist, and otherwise leave it completely 
alone.)

>      <prop oor:name="ContextSensitive" oor:type="xs:boolean">
>       <value>false</value>
>      </prop>
>      <prop oor:name="UIName" oor:type="xs:string">
>       <value xml:lang="en-US">iMath</value>
>       <value xml:lang="de">iMath</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>


More information about the LibreOffice mailing list