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

From Apache OpenOffice Wiki
Jump to: navigation, search
(Initial author Sun Microsystems, Inc.)
 
m
 
(3 intermediate revisions by 2 users not shown)
Line 6: Line 6:
 
|NextPage=Documentation/DevGuide/Drawings/Filter Options
 
|NextPage=Documentation/DevGuide/Drawings/Filter Options
 
}}
 
}}
{{DISPLAYTITLE:Exporting}}
+
{{Documentation/DevGuideLanguages|Documentation/DevGuide/Drawings/{{SUBPAGENAME}}}}
 +
{{DISPLAYTITLE:Exporting}}
 
<!--<idltopic>com.sun.star.drawing.GraphicExportFilter</idltopic>-->
 
<!--<idltopic>com.sun.star.drawing.GraphicExportFilter</idltopic>-->
 
Exporting is not a feature of drawing documents. There is a separate service available from the global service manager for exporting, <idl>com.sun.star.drawing.GraphicExportFilter</idl>. It supports three interfaces: <idl>com.sun.star.document.XFilter</idl>, <idl>com.sun.star.document.XExporter</idl> and <idl>com.sun.star.document.XMimeTypeInfo</idl>.
 
Exporting is not a feature of drawing documents. There is a separate service available from the global service manager for exporting, <idl>com.sun.star.drawing.GraphicExportFilter</idl>. It supports three interfaces: <idl>com.sun.star.document.XFilter</idl>, <idl>com.sun.star.document.XExporter</idl> and <idl>com.sun.star.document.XMimeTypeInfo</idl>.
Line 15: 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 23: 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: 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