6 Using Writer2LaTeX from another application
6.3 Batch conversion with UNO
Writer2LaTeX also offers a uno service
org.openoffice.da.writer2xhtml.BatchConverter
providing batch conversion of a complete directory into another format (usually xhtml) with index pages. This service implements the interface org.openoffice.da.writer2xhtml.XBatchConverter, which provides a single method
// method
// org::openoffice::da::writer2xhtml::XBatchConverter::convert
void convert ( [in] string sSourceURL,
[in] string sTargetURL,
[in] sequence<com::sun::star::beans::PropertyValue> lArguments,
[in] XBatchHandler handler );
-
The sSourceURL specifies the URL of the source directory
-
The sTargetURL specifies the URL of the target directory
-
The handler is an implementation of the call back interface org.openoffice.da.writer2xhtml.XBatchHandler, which is used to provide user interaction during the conversion process. See the IDL definition for documentation. If you use the batch conversion from a Basic macro, the interface must be implemented using CreateUnoListener.
The available arguments (for the parameter lArguments) are specified in this table
Argument |
Description |
Recurse |
Set to true (default) if you want to convert subdirectories |
Uplink |
You can set this to an URL, which will be used as an uplink on the index page for the top level directory |
DirectoryIcon |
You can set this to an URL pointing to an image that represents a directory |
DocumentIcon |
You can set this to an URL pointing to an image that represents a document |
TemplateURL |
You can set this to an URL pointing to an XHTML template that should be used to generate the index page(s). Note that if you want to provide an XHTML template for the documents as well, this must be done using the FilterData (and the templates may be different). |
IndcludePdf |
Set this to true (default) if you want to include a pdf version of each file in addition to the XHTML version |
UseTitle |
Set this to true (default) if you want to use the document title in the index page rather than the file name |
UseDescription |
Set this to true (default) if you want to include the description of the document in the index page. |
WriterFilterName |
You can set this to the name of any Writer export filter you have available in your OOo installation. The default is the XHTML export filter provided by Writer2xhtml (org.openoffice.da.writer2xhtml). |
WriterFilterData |
The structure of this argument depends on the filter, but for the default filter it is a sequence of PropertyValues to pass options to the filter (see above). |
CalcFilterName |
You can set this to the name of any Calc export filter you have available in your OOo installation. The default is the XHTML export filter provided by Writer2xhtml (org.openoffice.da.calc2xhtml). |
CalcFilterData |
The structure of this argument depends on the filter, but for the default filter it is a sequence of PropertyValues to pass options to the filter (see above). |