Hi jorge

Hi, all! I am struggling to deploy a BASIC library including a dialog which, in
turn, should have ImageURLs (buttons and stuff) referencing files inside the
same package. I understand this is just one instance of a bigger problem,
namely handling resources not directly manipulated by OOo.

The problem is that, when I pkgchk a new package, it is inflated into
..\OpenOffice.org1.1.4\user\uno_packages\cache\uno_packages with a filename I
cannot predict (the original name plus some number). Therefore, although
loading the library and stuff works fine, I cannot correctly set my ImageURLs,
for example.

Any ideas? Thanks in advance. Cheers,

you may find a workaround inside OOoWikipedia
http://oooconv.free.fr/wikipedia/wikipedia_fr.html

here is a rough snapshot you may adapt, extend

HTH

Laurent
'-----------------------

function FindAddonDirectory(libraryName)

dim newSplit()
redim NewSplit(0)

if basiclibraries.isLibraryLink(libraryName) then

        thePath = basiclibraries.getLibraryLinkURL(libraryName)
        splitted = split(thePath,"/")
        newSplit() = splitted()
        redim preserve newSplit(0 to ubound(splitted)-2)
        theNewPath = join(NewSplit(),"/")+"/"+libraryName

else
        
        aService = CreateUnoService("com.sun.star.util.PathSubstitution")
theNewPath=aService.substituteVariables("$(user)/basic/" + libraryName, true)
        
endif

FindAddonDirectory = theNewPath

end function


--
Laurent Godard <[EMAIL PROTECTED]> - Ingénierie OpenOffice.org
Indesko >> http://www.indesko.com
Nuxeo CPS >> http://www.nuxeo.com - http://www.cps-project.org
Livre "Programmation OpenOffice.org", Eyrolles 2004

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to