Frank Schönheit - Sun Microsystems Germany wrote:
Hi Fernand,

OK i now how to use the provider but : I have a Dialog with a ImageControlModel in it. How can i "show "(after loading with the Provider) the graphic in the Dialog or in the "mageControlModel ???

You shouldn't need to care for this. As soon as the dialog is executed,
it will automatically create an ImageControl, which internally refers to
the ImageControlModel, and displays the graphic as indicated by the model.
OK no I get this to work with a Xgraphic object as the property from the ImageControlModel but only when the Xgraphic object is obtained from a "proper URL"

so i use 2 functions one for proper URL's and one I have to use the "stream" when the Image is embeddend in a Writerdoc

function getGraphFromUrl(sFileUrl as String) as Object
 oProvider = createUnoService("com.sun.star.graphic.GraphicProvider")
 Dim oPropsIN(0)as new com.sun.star.beans.PropertyValue
 oPropsIN(0).Name  = "URL"
 oPropsIN(0).Value = sFileUrl
 getGraphFromUrl = oProvider.queryGraphic(oPropsIN())
end function
'-------------------------------------------------------------------

function getGraphFromStream(oInputStream as Object) as Object
 oProvider = createUnoService("com.sun.star.graphic.GraphicProvider")
 Dim oPropsIN(0)as new com.sun.star.beans.PropertyValue
 oPropsIN(0).Name  = "InputStream"
oPropsIN(0).Value = oInputStream getGraphFromStream = oProvider.queryGraphic(oPropsIN())
end function
'-------------------------------------------------------------------


The Xgrahpic object "getGraphFromUrl " optained from the first Function works as a property for the ImageControlModel

The Xgrahpic object "getGraphFromStream" optained from the Second Function gives no "Image" in the ImageControlModel

In both cases i found (with Xray) the object in the ImageControlModel but see no reason why the first shows up and the second do not shows up ?????

Thanks for any hint


If this doesn't work, it's a bug I'd say.

Ciao
Frank


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to