I'm trying to get hold of the GraphicProvider to store images of a
Writer document.
Whatever I'm doing I don't seem to be able to create the GraphicProvider
with Java.
My approach, which doesn't work:
XGraphicProvider xGraphicProvider = (XGraphicProvider)
UnoRuntime.queryInterface(XGraphicProvider.class,
xMSF.createInstance("com.sun.star.graphic.GraphicProvider"));
How can I create the GraphicProvider, there's not much documentation on
that.
On the other hand I've got an image in my writer document, which I get
like this:
XTextGraphicObjectsSupplier xGraphicSupplier =
(XTextGraphicObjectsSupplier) UnoRuntime
.queryInterface(XTextGraphicObjectsSupplier.class,
xTextDocument);
XNameAccess xNamedGraphics = xGraphicSupplier.getGraphicObjects();
XIndexAccess xIndexedGraphics = (XIndexAccess) UnoRuntime
.queryInterface(XIndexAccess.class, xNamedGraphics);
Object oGraphic = xIndexedGraphics.getByIndex(0);
In the end I do need an XGraphic object to use the *storeGraphic*()
method of the GraphicProvider. How can I get there from my object (which
is an XTextContent)?
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]