[long] Integrate an extension in the code at buildtime : what do with bitmaps ?

eric b <[email protected]>
Newsgroups gmane.comp.openoffice.devel.general
Message-ID <[email protected]>
Hi,

Happy New Year to all of you, and the best for 2011 !  :-)


I'm currently working on integrate a nice and existing C++ extension,  
but directly in the code, means at buildtime. To summarize, if I  
integrate the lib (written in C++) in the scp2 .. and so on system,  
there is no problem at all, the packaging is ok and it works fine in  
the install set.

In fact, everything works fine, but the icons are not seen, because  
simply not found  :-/


To explain more, the first point is, after tracing a bit, that the  
"NormalFileName" property is used to retrieve the right bitmap  
(please correct me if I'm wrong). As example, looking at the original  
name, we have (in the .xcu) :

<node oor:name="Background">
   <prop oor:name="NormalFileName">
	<value>bitmaps/Background.png</value>
   </prop>

And in the extension, it appears that the relative path is used,  
means the library is in :
extension/random_name/libThing.${DLL_EXTENSION}

... while the .png are in :
extension/random_name/bitmaps/*.png

This happens to work ok, of course. Am I correct to suppose that the  
relative path is used, or did I miss something ?


My tries now : using the other existing .xcu as example and trying to  
respect the schema ( .xcs file), I did the what follows:

<node oor:name="Background">
   <prop oor:name="NormalFileName">
	<value>"$(insturl)/share/config/bitmaps/Background.png"</value>
   </prop>
... and so on

It does not work, but the idea is

1) put the library using those icons in  $(insturl)/program (like all  
the other libs in fact ...)
2) use the path above to retrieve the icons.

I must say I tested absolute and relative paths, without success.

For example :
<value>xlink:href="$(insturl)/share/config/bitmaps/Background.png"</ 
value>

or :
<value>xlink:href="../share/config/bitmaps/Background.png"</value>


Last, the documentation I have read is :

http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ 
Extensions/Checklist_for_Writing_Extensions
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ 
Extensions/Example
+  a lot of .xcs / .xcu shipped in the OOO3.2.1 code base

Feel free to ask me if I forgot some information, and thanks in  
advance for any help  :-)

Eric Bachard

-- 
qɔᴉɹə
Education Project:
http://wiki.services.openoffice.org/wiki/Education_Project
Projet OOo4Kids : http://wiki.ooo4kids.org/index.php/Main_Page
L'association EducOOo : http://www.educoo.org
Blog : http://eric.bachard.org/news
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.