On 09/06/2010 09:50, sponmonster wrote:
> Hi,
> I’m trying to deliver a template within an extension and directly set the
> template as default-template.
> The Setup.xcu code:
> 
> […]
>        <node oor:name="Office">
>               <node oor:name="Factories" >
>                       <node oor:name="com.sun.star.text.TextDocument">
>                               <prop oor:name="ooSetupFactoryTemplateFile" 
> oor:type="xs:string">
>                                       
> <value>%origin%/templates/standard.ott</value>
>                               </prop>
>                       </node>
>               </node>
>       </node>
> […]
> 
> The Problem is that everything works fine except of one thing, when I open a
> new file I get an error message. OpenOffice opens the correct default
> template from the extension and nothing seems to be wrong except of that
> message I get: (sorry it’s german – the message is: “general error”) 
> http://old.nabble.com/file/p28827026/allgemeiner_fehler.jpg 
> I really don’t know what to do.
> I’ve tried to change the template, or the location nothing worked
> 
> Everything works when I change the location of the template and use an
> absolute path, or another placeholder like $(user) but I need to deliver the
> template in the extension and use it from the extension
> 
> The only problem is the usage of %origin% to find my extension and the
> template in the extension.

i think i remember this problem:
it occurs when importing the RDF metadata.
the %origin% corresponds to a vnd.sun.star.expand: URI, and such URIs are
not hierarchical.
thus trying to use such an URI to create an absolute URI from a relative
URI fails.

[there are lots of other places in the import that need to do this, but in
contrast to the RDF metadata import they use some ancient deprecated crud
from the tools module to make URIs absolute, which apparently happily
performs this invalid operation]

i believe fs wanted to create some new mechanism to refer to extension
content that could be used in place of %origin% and would work in this use
case.

i wonder what is the status of that?

> Another thing is that %origin% works in other xcu files, for example in a
> toolbar I made, to find the icons I used %origin% and it works very well,
> only in Setup.xcu I get this “error”-message.

then i guess in those cases it's not used as a baseURI :)

> I’m using WinXP (SP3) and OpenOffice.org 3.2
> 
> Thanks for your help
> Yours sponmonster

-- 
"Within C++, there is a much smaller and cleaner language struggling
 to get out." -- Bjarne Stroustrup


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

Reply via email to