Exporting is not a feature of drawing documents. There is a separate service available from the global service manager for exporting, com.sun.star.drawing.GraphicExportFilter. It supports three interfaces: com.sun.star.document.XFilter, com.sun.star.document.XExporter and com.sun.star.document.XMimeTypeInfo.
Exporting is a simple process. After getting a
GraphicExportFilter from the
ServiceManager, use its
XExporter interface to inform the filter which draw page, shape or shape collection to export.
void setSourceDocument ( [in] com::sun::star::lang::XComponent xDoc)
The method name
setSourceDocument() may be confusing. Actually, the method would allow exporting entire documents, however, it is only possible to export draw pages, single shapes or shape collections from a drawing document. Since these objects support the XComponent interface, the method specification allows maximum flexibility.
Next, run the method
filter() at the
XFilter interface. To interrupt the exporting process, call
cancel() on the same interface.
boolean filter( [in] sequence< com::sun::star::beans::PropertyValue > aDescriptor) void cancel()
|Content on this page is licensed under the Public Documentation License (PDL).|