Jo wrote:
Ciao Paolo,
With your codesnippet package as an example I managed to append the
toolbar to my package. Molto grazie!
I found another typo while running your package:
We have already collected several code snippets and under the Code
Snippet Base you can see the for what the snippets are good for!
-> We have already collected several code snippets and under the Code
Snippet Base you can see for yourself what the snippets are good for!
sufficiant -> sufficient
I have another question:
The toolbar is floating at first. That's not a big issue, but it shows
a title "Add-on 1". Is it possible to change this title?
Hi Jo,
This will be possible with OOo 2.0.3 and later (supported from
SRC680m168). We already had several discussions about this missing
feature. You can find more information on the mailing list
[EMAIL PROTECTED] If you want to be up to date on
OpenOffice development you should subscribe:
[email protected]
[email protected]
[email protected]
I just copied the announcement for you:
*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.
An 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>
...
Regards,
Carsten
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]