Create toolbar that is docked by default

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Create toolbar that is docked by default

Hung Mark
Hi

I followed the wiki post to create configuration update file to update
window state:

https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/AddOns/Toolbars


<?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_org.openoffice.Office.addon.example"
oor:op="replace">
        <prop oor:name="UIName" oor:type="xs:string">
          <value xml:lang="en-US">My pretty bar</value>
        </prop>
      </node>
    </node>
  </node>
</oor:component-data>


It succeeded, except it is floating by default. I tried to insert
property "Docked", "DockingArea", "DockPos" and they didn't work at
all.

<prop oor:name="Docked" oor:type="xs:boolean">
<value>true</value>
</prop>
<prop oor:name="DockingArea" oor:type="xs:int">
<value>2</value>
</prop>
<prop oor:name="DockPos" oor:type="xs:string">
<value>0,0</value>
</prop>


Please suggest. Thanks.

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

Reply | Threaded
Open this post in threaded view
|

Re: Create toolbar that is docked by default

Ariel Constenla-Haile-2
Hi Mark,

On Thu, May 01, 2014 at 08:41:59PM +0800, Hung Mark wrote:

> Hi
>
> I followed the wiki post to create configuration update file to update
> window state:
>
> https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/AddOns/Toolbars
>
>
> <?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_org.openoffice.Office.addon.example"
> oor:op="replace">
>         <prop oor:name="UIName" oor:type="xs:string">
>           <value xml:lang="en-US">My pretty bar</value>
>         </prop>
>       </node>
>     </node>
>   </node>
> </oor:component-data>
>
>
> It succeeded, except it is floating by default. I tried to insert
> property "Docked", "DockingArea", "DockPos" and they didn't work at
> all.
>
> <prop oor:name="Docked" oor:type="xs:boolean">
> <value>true</value>
> </prop>
> <prop oor:name="DockingArea" oor:type="xs:int">
> <value>2</value>
> </prop>
> <prop oor:name="DockPos" oor:type="xs:string">
> <value>0,0</value>
> </prop>
>
>
> Please suggest. Thanks.
It's hard to tell without seeing the xcu file that does not work, next
time please make it available.

The following extensions has a working configuration:
http://people.apache.org/~arielch/extensions/ToolbarWithWindowState.oxt
try to look at its configuration files and adapt them to your needs.

Note that the LayoutManager code seems to be broken, and docked toolbar
are sometimes not visible, thought checked in View - Toolbars.


Regards
--
Ariel Constenla-Haile
La Plata, Argentina

attachment0 (836 bytes) Download Attachment