[dev] Re: Problems using %origin% in Setup.xcu

2010-06-10 Thread Michael Stahl
On 10/06/2010 06:25, David Tardon wrote:
 On Wed, Jun 09, 2010 at 02:48:03PM +0200, Michael Stahl wrote:
 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?

 
 I suppose you speak about his extension UCP:
 http://api.openoffice.org/servlets/ReadMsg?list=devmsgNo=22475 . It was
 integrated into DEV300_m81. The code is in ucb/source/ucp/ext .

vnd.sun.star.extension:// URLs providing access to content within
deployed extensions

thanks, that was exactly what i meant.
[but i only looked on the interface-announce list, not on the api-dev
list, so i didn't find it.]

i guess that should be the recommended way to refer to files in extensions.

-- 
Q: What will the scientific programming language of 2050 look like?
A: No one knows, but it will be called FORTRAN.


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



[dev] Re: Problems using %origin% in Setup.xcu

2010-06-09 Thread Michael Stahl
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: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Re: Problems using %origin% in Setup.xcu

2010-06-09 Thread David Tardon
On Wed, Jun 09, 2010 at 02:48:03PM +0200, Michael Stahl wrote:
 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?
 

I suppose you speak about his extension UCP:
http://api.openoffice.org/servlets/ReadMsg?list=devmsgNo=22475 . It was
integrated into DEV300_m81. The code is in ucb/source/ucp/ext .

D.

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org