Hi,
I asked for the samething a few week ago but no answer, ther is a
workaround using the "storage" the code below (i stolen someware) :-)
demonstarte how to do
oGraphics() = oDocument.GraphicObjects()
if oDocument.getDocumentStorage.hasbyname("Pictures") then
oPictures = oDocument.getDocumentStorage.getbyname("Pictures")
mFiles() = oPictures.getElementNames
' for all pictures in document ...
For i = 0 to oGraphics.getCount-1
sGraphicURL = oGraphics.getByIndex(i).GraphicURL
sTmp = sGraphicURL
' internal picture names start with "vnd.sun..."
oGraphic = oGraphics.getByIndex(i)
sGraphicName = sGraphicName = oGraphic.getName()
If InStr(1, sGraphicURL, "vnd.sun.star.GraphicObject:", 0) = 1 Then
' get the picture name (comes without the extension)
sGraphicURL = Mid(sGraphicURL, 28, Len(sGraphicURL))
' so search all files in pictures folder for the current
picture ...
' For j = 0 to uBound(mFiles())
For j = 0 to oGraphics.getcount-1
If InStr(1, mFiles(j), sGraphicURL, 0) Then
' create new name with extension ...
sGraphicName = oGraphic.getName() & Mid(mFiles(j),
Len(sGraphicURL)+1, Len(mFiles(j))
oOriginalGraphic =
getGraphDescritorFromStream(oPictures.getByName(mFiles(j)).getInputStream())
hope it helps a bit
Fernand
Peter Eberlein schreef:
Hi,
The MediaProperties allow private URLs with the syntax (e.g.)
"private:resource/projectshortname/imagelist/12345".
It seems, that this does not refer to the zip-archive, because (e.g.)
"private:resource/sw/imagelist/lc20556.png" or
"private:resource/sw/imglst/lc20556.png" are no valid URLs.
Do you have an example for that?
Regards
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]