Type info
Title Customizable add-on toolbar title
Posted by [EMAIL PROTECTED]
Affected [EMAIL PROTECTED],
Effective from SRC680m168


Summary

The title of an add-on toolbar couldn't be changed due to technical limitations. To fix this problem the framework based layout manager uses a modified resource URL schema to address add-on toolbars.


Description
The title of an add-on toolbar couldn't be defined due to technical 
limitations. To fix this problem the framework based layout manager now
uses a modified resource URL schema to address add-on toolbars:

"private:resource/toolbar/addon_<name of the toolbar set node>

As the new schema uses a unique name which is known at installation
time, the toolbar name can be associated to this resource URL.

A add-on can define the toolbar title with the Addons.xcu and
Module>WindowState.xcu files.

EXAMPLE:
(Addons.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" oor:name="Addons"
oor:package="org.openoffice.Office">
<node oor:name="AddonUI">
<node oor:name="OfficeToolBar">
<node oor:name="com.sun.star.comp.framework.addon.
complextoolbarcontrols" oor:op="replace">
<node oor:name="m1" oor:op="replace">
<prop oor:name="URL" oor:type="xs:string">
<value>vnd.demo.complextoolbarcontrols.demoaddon:Command1</
value>
</prop>
...

The name of the toolbar set node is "com.sun.star.comp.framework.
addon.complextoolbarcontrols". Therefore the resource URL will be
"private:resource/toolbar/addon_com.sun.star.comp.framework.addon.
complextoolbarcontrols"
To set the title of the add-on toolbar for Writer the WriteWindowState.xcu
must be part of the add-on package.

(WriterWindowState.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" 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.sun.star.comp.
framework.addon.complextoolbarcontrols" oor:op="replace">
<prop oor:name="UIName" oor:type="xs:string">
<value xml:lang="en-US">Complex Toolbar Controls</value>
</prop>
...


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to