Class TeXImportFilter
java.lang.Object
com.sun.star.lib.uno.helper.WeakBase
org.openoffice.da.comp.writer2latex.TeXImportFilter
- All Implemented Interfaces:
com.sun.star.container.XNamed,com.sun.star.document.XFilter,com.sun.star.document.XImporter,com.sun.star.lang.XInitialization,com.sun.star.lang.XServiceInfo,com.sun.star.lang.XTypeProvider,com.sun.star.uno.XInterface,com.sun.star.uno.XWeak
public class TeXImportFilter
extends com.sun.star.lib.uno.helper.WeakBase
implements com.sun.star.lang.XInitialization, com.sun.star.container.XNamed, com.sun.star.document.XImporter, com.sun.star.document.XFilter, com.sun.star.lang.XServiceInfo
This class implements an import filter for TeX documents using TeX4ht
It is thus an implementation of the service com.sun.star.document.ImportFilter
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final intstatic final intstatic final intFields inherited from class com.sun.star.lib.uno.helper.WeakBase
_mapTypesFields inherited from interface com.sun.star.document.XFilter
UNOTYPEINFOFields inherited from interface com.sun.star.document.XImporter
UNOTYPEINFOFields inherited from interface com.sun.star.lang.XInitialization
UNOTYPEINFOFields inherited from interface com.sun.star.container.XNamed
UNOTYPEINFOFields inherited from interface com.sun.star.lang.XServiceInfo
UNOTYPEINFOFields inherited from interface com.sun.star.lang.XTypeProvider
UNOTYPEINFOFields inherited from interface com.sun.star.uno.XWeak
UNOTYPEINFO -
Constructor Summary
ConstructorsConstructorDescriptionTeXImportFilter(com.sun.star.uno.XComponentContext xContext) Construct a newTeXImportFilter -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Cancel the filtering process.booleanfilter(com.sun.star.beans.PropertyValue[] mediaDescriptor) Filter (import only) the document given by the media descriptor According to the service contract, we should understand either of the properties URL or InputStream, but currently we only use the former.getName()String[]booleanimportTeX(com.sun.star.text.XTextDocument xText, String sURL, com.sun.star.task.XStatusIndicator xStatus) Import a TeX document with TeX4htvoidinitialize(Object[] arguments) voidvoidsetTargetDocument(com.sun.star.lang.XComponent xDocument) booleansupportsService(String sService) Methods inherited from class com.sun.star.lib.uno.helper.WeakBase
finalize, getImplementationId, getTypes, queryAdapter
-
Field Details
-
__implementationName
-
__serviceName
- See Also:
-
FILTERPROC_RUNNING
public static final int FILTERPROC_RUNNING- See Also:
-
FILTERPROC_BREAKING
public static final int FILTERPROC_BREAKING- See Also:
-
FILTERPROC_STOPPED
public static final int FILTERPROC_STOPPED- See Also:
-
-
Constructor Details
-
TeXImportFilter
public TeXImportFilter(com.sun.star.uno.XComponentContext xContext) Construct a newTeXImportFilter- Parameters:
xContext- The Component Context
-
-
Method Details
-
getImplementationName
- Specified by:
getImplementationNamein interfacecom.sun.star.lang.XServiceInfo
-
supportsService
- Specified by:
supportsServicein interfacecom.sun.star.lang.XServiceInfo
-
getSupportedServiceNames
- Specified by:
getSupportedServiceNamesin interfacecom.sun.star.lang.XServiceInfo
-
initialize
- Specified by:
initializein interfacecom.sun.star.lang.XInitialization- Throws:
com.sun.star.uno.Exception
-
getName
- Specified by:
getNamein interfacecom.sun.star.container.XNamed
-
setName
- Specified by:
setNamein interfacecom.sun.star.container.XNamed
-
setTargetDocument
public void setTargetDocument(com.sun.star.lang.XComponent xDocument) throws com.sun.star.lang.IllegalArgumentException - Specified by:
setTargetDocumentin interfacecom.sun.star.document.XImporter- Throws:
com.sun.star.lang.IllegalArgumentException
-
filter
public boolean filter(com.sun.star.beans.PropertyValue[] mediaDescriptor) Filter (import only) the document given by the media descriptor According to the service contract, we should understand either of the properties URL or InputStream, but currently we only use the former. We also use the property StatusIndicator: OOo internally uses this to pass around an XStatusIndicator instance, and if it's available we use it to display a progress bar- Specified by:
filterin interfacecom.sun.star.document.XFilter- Parameters:
mediaDescriptor- the Media Descriptor
-
cancel
public void cancel()Cancel the filtering process. This will not only trigger cancellation, but also wait until it's finished- Specified by:
cancelin interfacecom.sun.star.document.XFilter
-
importTeX
public boolean importTeX(com.sun.star.text.XTextDocument xText, String sURL, com.sun.star.task.XStatusIndicator xStatus) Import a TeX document with TeX4ht- Parameters:
xText- into this documentsURL- from the TeX document given by this URL
-