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
Fields Modifier and Type Field Description static java.lang.String
__implementationName
static java.lang.String
__serviceName
static int
FILTERPROC_BREAKING
static int
FILTERPROC_RUNNING
static int
FILTERPROC_STOPPED
-
Constructor Summary
Constructors Constructor Description TeXImportFilter(com.sun.star.uno.XComponentContext xContext)
Construct a newTeXImportFilter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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.java.lang.String
getImplementationName()
java.lang.String
getName()
java.lang.String[]
getSupportedServiceNames()
boolean
importTeX(com.sun.star.text.XTextDocument xText, java.lang.String sURL, com.sun.star.task.XStatusIndicator xStatus)
Import a TeX document with TeX4htvoid
initialize(java.lang.Object[] arguments)
void
setName(java.lang.String sName)
void
setTargetDocument(com.sun.star.lang.XComponent xDocument)
boolean
supportsService(java.lang.String sService)
-
-
-
Field Detail
-
__implementationName
public static final java.lang.String __implementationName
-
__serviceName
public static final java.lang.String __serviceName
- See Also:
- Constant Field Values
-
FILTERPROC_RUNNING
public static final int FILTERPROC_RUNNING
- See Also:
- Constant Field Values
-
FILTERPROC_BREAKING
public static final int FILTERPROC_BREAKING
- See Also:
- Constant Field Values
-
FILTERPROC_STOPPED
public static final int FILTERPROC_STOPPED
- See Also:
- Constant Field Values
-
-
Method Detail
-
getImplementationName
public java.lang.String getImplementationName()
- Specified by:
getImplementationName
in interfacecom.sun.star.lang.XServiceInfo
-
supportsService
public boolean supportsService(java.lang.String sService)
- Specified by:
supportsService
in interfacecom.sun.star.lang.XServiceInfo
-
getSupportedServiceNames
public java.lang.String[] getSupportedServiceNames()
- Specified by:
getSupportedServiceNames
in interfacecom.sun.star.lang.XServiceInfo
-
initialize
public void initialize(java.lang.Object[] arguments) throws com.sun.star.uno.Exception
- Specified by:
initialize
in interfacecom.sun.star.lang.XInitialization
- Throws:
com.sun.star.uno.Exception
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfacecom.sun.star.container.XNamed
-
setName
public void setName(java.lang.String sName)
- 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, java.lang.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
-
-