Hi All,
I am trying to save a chart.
Sub StoreDrawingOBjectAsImage
shape = ThisComponent.getSheets().getByIndex(0).getDrawPage().getByIndex(0)
Dim args(1) as new com.sun.star.beans.PropertyValue
args(0).Name = "URL"
args(0).Value = "file:///home/asuka/Downloads/foo.png"
args(1).Name = "MimeType"
args(1).Value = "image/png"
gef = CreateUnoService("com.sun.star.drawing.GraphicExportFilter")
gef.setSourceDocument(shape)
gef.filter(args)
End Sub
“shape” throws “Basic Runtime Error 12”. What I am doing wrong, this time?
Many thanks,
-T