Re: [api-dev] GraphicProvider and export of graphics

2006-09-07 Thread Jimmy
An Exception gets thrown, and I don't really know why since xMSF exists, since I can initiate other services with it but it doesn't seem to work for the GraphicProvider. Code: XMultiServiceFactory xMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(

Re: [api-dev] GraphicProvider and export of graphics

2006-09-07 Thread Mathias Bauer
Jimmy wrote: An Exception gets thrown, and I don't really know why since xMSF exists, since I can initiate other services with it but it doesn't seem to work for the GraphicProvider. Code: XMultiServiceFactory xMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(

Re: [api-dev] GraphicProvider and export of graphics

2006-09-07 Thread Jimmy
I'm sorry, missed that code in the last e-mail. But which one are you talking about? This is my component initialisation and all I get is the xMCF but no xMSF which I need. It's only possible to create the xMSF with an XTextDocument, isn't it? public Editor(XComponentContext xCompContext) {

Re: [api-dev] GraphicProvider and export of graphics

2006-09-07 Thread Jimmy
Ah I got it, I was wrong of course. I had to initiate the MSF with the MCF: XMultiServiceFactory xMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, ElementController.getXMCF()); Thanks for the hint Mathias Jimmy schrieb: I'm sorry, missed that code in

Re: [api-dev] GraphicProvider and export of graphics

2006-09-07 Thread Mathias Bauer
Jimmy wrote: I'm sorry, missed that code in the last e-mail. But which one are you talking about? This is my component initialisation and all I get is the xMCF but no xMSF which I need. It's only possible to create the xMSF with an XTextDocument, isn't it? No, get the service manager

Re: [api-dev] GraphicProvider and export of graphics

2006-09-06 Thread Mathias Bauer
Jimmy wrote: That's exactly my problem, I can't translate it. It takes some more steps in Java to create a GraphicProvider, and I can't get it to work. Does that mean that XGraphicProvider xGraphicProvider = (XGraphicProvider) UnoRuntime.queryInterface(XGraphicProvider.class,

[api-dev] GraphicProvider and export of graphics

2006-09-04 Thread Jimmy
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)

Re: [api-dev] GraphicProvider and export of graphics

2006-09-04 Thread Stephan Wunderlich
Hi Jimmy, I'm trying to get hold of the GraphicProvider to store images of a Writer document. the code snippet ... http://codesnippets.services.openoffice.org/ Writer/Writer.ExtractGfx.snip ... seems to do what you want. Regards Stephan

Re: [api-dev] GraphicProvider and export of graphics

2006-09-04 Thread Jimmy
I've tried this already, but thought it would be nice to export the graphics out of the document not out of a zip file (the snippet does only work if the document has been saved). I can't get it to work in Java though and I don't really see why my code isn't working. Cheers Stephan

Re: [api-dev] GraphicProvider and export of graphics

2006-09-04 Thread Fernand Vanrie
Jimmy schreef: I've tried this already, but thought it would be nice to export the graphics out of the document not out of a zip file (the snippet does only work if the document has been saved). I can't get it to work in Java though and I don't really see why my code isn't working. Cheers

Re: [api-dev] GraphicProvider and export of graphics

2006-09-04 Thread Jimmy
No matter what I do it seems I'm always getting an Exception even when I'm trying to create a GraphicExportFilter. Object oUnoObject = xMSF.createInstance(com.sun.star.drawing.GraphicExportFilter); The xMSF is not null and does work for other things like for example:. XNamed xChildNamed =

Re: [api-dev] GraphicProvider and export of graphics

2006-09-04 Thread Rony G. Flatscher
Hi Jimmy, as no one stepped up as of yet, a very amateurish attempt (could be wrong altogether): No matter what I do it seems I'm always getting an Exception even when I'm trying to create a GraphicExportFilter. Object oUnoObject =