Date: prev next · Thread: first prev next last
2017 Archives by date, by thread · List index


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>

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.