public XGraphic setGraphic(XControl xImageControl, String sImageUrl){
XGraphic xGraphic = null;
try{
Object oGraphicProvider = m_xContext.getServiceManager().createInstanceWithContext("com.sun.star.graphic.GraphicProvider", m_xContext);
XGraphicProvider xGraphicProvider = (XGraphicProvider) UnoRuntime.queryInterface(XGraphicProvider.class, oGraphicProvider);
PropertyValue[] aPropertyValues = new PropertyValue[1];
PropertyValue aPropertyValue = new PropertyValue();
aPropertyValue.Name = "URL";
if(!sImageUrl.equals(""))
aPropertyValue.Value = getPackageLocation() + sImageUrl;
else
aPropertyValue.Value = "";
aPropertyValues[0] = aPropertyValue;
xGraphic = xGraphicProvider.queryGraphic(aPropertyValues);
XPropertySet xProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xImageControl.getModel());
xProps.setPropertyValue("Graphic", xGraphic);
} catch (UnknownPropertyException ex) {
System.err.println(ex.getLocalizedMessage());
} catch (PropertyVetoException ex) {