Hello everyone,

I'm working on a OpenOffice 3.0.1 extension to search & insert pictures from
a site, IDE is NetBeans 6.5.1 with OOo Plugin 2.0.4. As a base, I'm using an
extension that does the same using the Flickr REST API. I posted this very
question to the OOo forums but apparently nobody's interested since other
threads with similar questions also haven't received an answer. I've tried
the following resources without success:

* http://www.oooforum.org/forum/viewtopic.phtml?t=77031
*
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/GUI/Image_Control
* Code Snippets from:
http://languagetool.cvs.sourceforge.net/viewvc/languagetool/JLanguageTool/openoffice/Linguistic.xcu?revision=1.5&view=markup
* Asking in the OOoforums themselves.
* and several google queries...

This is the code snippet where I try to include the image without success:

XMultiPropertySet xICModelMPSet = (XMultiPropertySet)
UnoRuntime.queryInterface(XMultiPropertySet.class, oLogo);
        xICModelMPSet.setPropertyValues(
      new String[] {"Border", "Height", "ImageURL", "Name", "PositionX",
"PositionY", "ScaleImage", "Width"},
      new Object[] { new Short((short) 2), new Integer(39), "
http://url.goes/here.gif";, sName, new Integer(15), new Integer(25),
Boolean.FALSE, new Integer(200)});
        getNameContainer().insertByName(sName,oLogo);

So far I managed to get it working specifying a local filesystem path
(file://...) in the ImageURL value. Anybody got any clue on how to achieve
this for a picture in a website? The solution doesn't necessarily involve
ImageURL, constructing a Graphic or any other actually successful method
will also do the job.

Thanks in advance :)

Reply via email to