Hello Fernand,

On Tuesday 16 June 2009, 09:48, Fernand Vanrie wrote:
> 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)

this is what I'd call the the old work-around/bad way
http://api.openoffice.org/servlets/ReadMsg?list=dev&msgNo=20941
Now just use the Graphic property, instead of the GraphicURL.

Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org

Reply via email to