Emilio ,
you need first a shape who has a internal URL and then use these
internal URL for your embedded Graphic
us code like:
GraphicURL := ConvertirAURL(archivo);
oOriginalGraph = getGraphFromUrl(sGraphicURL)
oShape =
oDocument.createInstance("com.sun.star.drawing.GraphicObjectShape")
oGraphic1 = oDocument.createInstance("com.sun.star.text.GraphicObject")
oDocument.getDrawPage().add(oShape)
oShape.Graphic = oOriginalGraph
oGraphic1.GraphicUrl = oShape.GraphicUrl
' Insert at the current cursor location
oText.insertTextContent(oDocument.getCurrentController().getViewCursor(),
oGraphic1, false)
'We no longer require the shape object.
oDocument.getDrawPage().reMove(oShape)
Hello!
I am a spanish programmer and I have a problem.
I am doing an export to openoffice and try to insert a picture just makes me
so linked, and need to be embedded, how can I do that?
Using Delphi 7.0
The code I use for this is:
Imagen := Document.createInstance('com.sun.star.text.GraphicObject');
Imagen.GraphicURL := ConvertirAURL(archivo);
Imagen.Width := 3000;
Imagen.Height := 3000;
Imagen.setPropertyValue('GraphicURL',ConvertirAURL(archivo));
oText.InsertTextContent( oCursor, Imagen, false);
Thanks and best regards!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org