Hello Jörg, On Wed, Oct 15, 2014 at 07:31:44AM +0200, Jörg Schmidt wrote: > Hello, > > With the StarBasic-Code: > > ThisComponent.GraphicObjects(0).GraphicURL > > I can read the internal URL of an embedded graphic in > a writer-document, for example > "vnd.sun.star.GraphicObject:10000000000003AC000000DC178CAB87" > > But can I use this URL as ".GraphicURL" for a graphic control of > a dialogue? If so, How?
Yes, you can. If the graphic inside the zip file is located in Pictures/10000201000001B10000019D1E3B87B7.png use vnd.sun.star.GraphicObject:10000201000001B10000019D1E3B87B7 that is the protocol vnd.sun.star.GraphicObject: and the file name without the extension (the image ID). > > What I mean is that > "vnd.sun.star.GraphicObject:10000000000003AC000000DC178CAB87" is not > the correct form of the URL what is needed for a graphics control, > because this would be, for example: > file:///C:/Users/xxx/Desktop/Hintergrund.png > > (or: "C:\Users\Internet\Desktop\Hintergrund.png") I guess you are using the Dialog Editor, I've tried the Property Browser, and it does not work well with this protocol: setting "Graphics" to vnd.sun.star.GraphicObject:10000201000001B10000019D1E3B87B7 is then converted to lower case, "graphicobject", which does not work. > please note: my document is unsaved, so I can not directly access the > pictures folder in the *.odt file. You can set the ImageURL property of the control model, it works with "vnd.sun.star.GraphicObject:" protocol. Regards -- Ariel Constenla-Haile La Plata, Argentina
signature.asc
Description: Digital signature