Ask Your Question
0

Error "bad root element <toolbar>" in extension to change toolbar

asked 2015-05-20 14:58:18 +0100

cornouws gravatar image

Hi,

Usually I get around with adding config stuff in extension. But I miss something here..

The error I get:

(com.sun.star.uno.RuntimeException) { { Message = "bad root element <toolbar> in file:///home/cono/.../uno_packages/cache/uno_packages/luvfe06d.tmp_/Adpt_Instellingen.oxt/soffice.cfg/modules/swriter/toolbar/standardbar.xml", Context = (com.sun.star.uno.XInterface) @0 } }

The soffice.cfg/modules/swriter/toolbar/standardbar.xml is the file that was created by manually changing the toolbar (hiding an item). The file is declared in the manifest.xml of the extension.

Part of the standardbar.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink">
 <toolbar:toolbaritem xlink:href=".uno:OpenUrl" toolbar:visible="false"/>
 <toolbar:toolbaritem xlink:href=".uno:AddDirect"/>
 <toolbar:toolbaritem xlink:href=".uno:NewDoc" toolbar:visible="false"/>
 <toolbar:toolbaritem xlink:href=".uno:OpenFromWriter"/>
 <toolbar:toolbaritem xlink:href=".uno:Save"/>
 <toolbar:toolbaritem xlink:href=".uno:SaveAs" toolbar:visible="false"/>
 <toolbar:toolbaritem xlink:href=".uno:SendMail" toolbar:visible="false"/>
 <toolbar:toolbarseparator/>

Hints very much appreciated, Cor

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2015-05-22 09:51:50 +0100

cornouws gravatar image

OK, Checked this with Stephan Bergman and we came to the conclusion that currently there is no possibility to change existing toolbars with an extension. The standardbar.xml cannot for example, be integrated in the addon.xcu.

So this question is 'solved', in any way answered.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-05-20 14:58:18 +0100

Seen: 298 times

Last updated: May 22 '15