Class TeXImportFilter
java.lang.Object
com.sun.star.lib.uno.helper.WeakBase
org.openoffice.da.comp.writer4latex.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 String
static final String
static final int
static final int
static final int
Fields inherited from class com.sun.star.lib.uno.helper.WeakBase
_mapTypes
Fields inherited from interface com.sun.star.document.XFilter
UNOTYPEINFO
Fields inherited from interface com.sun.star.document.XImporter
UNOTYPEINFO
Fields inherited from interface com.sun.star.lang.XInitialization
UNOTYPEINFO
Fields inherited from interface com.sun.star.container.XNamed
UNOTYPEINFO
Fields inherited from interface com.sun.star.lang.XServiceInfo
UNOTYPEINFO
Fields inherited from interface com.sun.star.lang.XTypeProvider
UNOTYPEINFO
Fields 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 TypeMethodDescriptionvoid
cancel()
Cancel the filtering process.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.getName()
String[]
boolean
importTeX
(com.sun.star.text.XTextDocument xText, String sURL, com.sun.star.task.XStatusIndicator xStatus) Import a TeX document with TeX4htvoid
initialize
(Object[] arguments) void
void
setTargetDocument
(com.sun.star.lang.XComponent xDocument) boolean
supportsService
(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:
getImplementationName
in interfacecom.sun.star.lang.XServiceInfo
-
supportsService
- Specified by:
supportsService
in interfacecom.sun.star.lang.XServiceInfo
-
getSupportedServiceNames
- Specified by:
getSupportedServiceNames
in interfacecom.sun.star.lang.XServiceInfo
-
initialize
- Specified by:
initialize
in interfacecom.sun.star.lang.XInitialization
- Throws:
com.sun.star.uno.Exception
-
getName
- Specified by:
getName
in interfacecom.sun.star.container.XNamed
-
setName
- Specified by:
setName
in interfacecom.sun.star.container.XNamed
-
setTargetDocument
public void setTargetDocument(com.sun.star.lang.XComponent xDocument) throws com.sun.star.lang.IllegalArgumentException - Specified by:
setTargetDocument
in 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:
filter
in 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:
cancel
in 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
-