Difference between revisions of "Documentation/DevGuide/Drawings/Exporting"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (FINAL VERSION FOR L10N)
m
 
Line 16: Line 16:
  
 
Method of <code>com.sun.star.document.XExporter</code>:
 
Method of <code>com.sun.star.document.XExporter</code>:
 
+
<syntaxhighlight lang="java">
   void setSourceDocument ( [in] com::sun::star::lang::XComponent xDoc)
+
   void setSourceDocument ( [in] com::sun::star::lang::XComponent xDoc)</syntaxhighlight>
  
 
The method name <code>setSourceDocument()</code> 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.
 
The method name <code>setSourceDocument()</code> 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.
Line 24: Line 24:
  
 
Methods of <code>com.sun.star.document.XFilter</code>:
 
Methods of <code>com.sun.star.document.XFilter</code>:
 
+
<syntaxhighlight lang="java">
 
   boolean filter( [in] sequence< com::sun::star::beans::PropertyValue > aDescriptor)
 
   boolean filter( [in] sequence< com::sun::star::beans::PropertyValue > aDescriptor)
   void cancel()
+
   void cancel()</syntaxhighlight>
  
 
{{PDL1}}
 
{{PDL1}}
  
 
[[Category:Documentation/Developer's Guide/Drawing Documents and Presentation Documents]]
 
[[Category:Documentation/Developer's Guide/Drawing Documents and Presentation Documents]]

Latest revision as of 14:12, 20 December 2020



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.

GraphicExportFilter

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.

Method of com.sun.star.document.XExporter:

  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.

Methods of com.sun.star.document.XFilter:

  boolean filter( [in] sequence< com::sun::star::beans::PropertyValue > aDescriptor)
  void cancel()
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages