Class ExportFilterBase
java.lang.Object
org.openoffice.da.comp.w2lcommon.filter.ExportFilterBase
- All Implemented Interfaces:
com.sun.star.lang.XServiceInfo
,com.sun.star.lang.XServiceName
,com.sun.star.lang.XTypeProvider
,com.sun.star.uno.XInterface
,com.sun.star.xml.sax.XDocumentHandler
,com.sun.star.xml.XExportFilter
- Direct Known Subclasses:
W2LExportFilter
,W2XExportFilter
public abstract class ExportFilterBase
extends Object
implements com.sun.star.xml.XExportFilter, com.sun.star.lang.XServiceName, com.sun.star.lang.XServiceInfo, com.sun.star.xml.sax.XDocumentHandler, com.sun.star.lang.XTypeProvider
This class provides an abstract uno component which implements an XExportFilter.
The filter is actually generic and only then constructor and 3 strings needs
to changed by the subclass.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Filter name to include in error messagesstatic final String
Implementation name for the componentstatic final String
Service name for the componentprotected static com.sun.star.lang.XMultiServiceFactory
Fields inherited from interface com.sun.star.xml.sax.XDocumentHandler
UNOTYPEINFO
Fields inherited from interface com.sun.star.xml.XExportFilter
UNOTYPEINFO
Fields inherited from interface com.sun.star.lang.XServiceInfo
UNOTYPEINFO
Fields inherited from interface com.sun.star.lang.XServiceName
UNOTYPEINFO
Fields inherited from interface com.sun.star.lang.XTypeProvider
UNOTYPEINFO
-
Constructor Summary
ConstructorsConstructorDescriptionExportFilterBase
(com.sun.star.uno.XComponentContext xComponentContext1) We need to get the Service Manager from the Component context to instantiate certain services, hence this constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(String str) void
convert
(com.sun.star.io.XInputStream xml, com.sun.star.io.XOutputStream exportStream) void
void
endElement
(String str) boolean
byte[]
String[]
com.sun.star.uno.Type[]
getTypes()
void
void
processingInstruction
(String aTarget, String aData) void
setDocumentLocator
(com.sun.star.xml.sax.XLocator xLocator) void
void
startElement
(String str, com.sun.star.xml.sax.XAttributeList xattribs) boolean
supportsService
(String stringServiceName)
-
Field Details
-
__serviceName
Service name for the component- See Also:
-
__implementationName
Implementation name for the component- See Also:
-
__displayName
Filter name to include in error messages- See Also:
-
xMSF
protected static com.sun.star.lang.XMultiServiceFactory xMSF
-
-
Constructor Details
-
ExportFilterBase
public ExportFilterBase(com.sun.star.uno.XComponentContext xComponentContext1) We need to get the Service Manager from the Component context to instantiate certain services, hence this constructor. The subclass must override this to set xMSF properly from the reigstration class
-
-
Method Details
-
replace
-
needsMask
-
exporter
public boolean exporter(com.sun.star.beans.PropertyValue[] aSourceData, String[] msUserData) throws com.sun.star.uno.RuntimeException - Specified by:
exporter
in interfacecom.sun.star.xml.XExportFilter
- Throws:
com.sun.star.uno.RuntimeException
-
startDocument
public void startDocument()- Specified by:
startDocument
in interfacecom.sun.star.xml.sax.XDocumentHandler
-
endDocument
public void endDocument() throws com.sun.star.uno.RuntimeException- Specified by:
endDocument
in interfacecom.sun.star.xml.sax.XDocumentHandler
- Throws:
com.sun.star.uno.RuntimeException
-
startElement
- Specified by:
startElement
in interfacecom.sun.star.xml.sax.XDocumentHandler
-
endElement
- Specified by:
endElement
in interfacecom.sun.star.xml.sax.XDocumentHandler
-
characters
- Specified by:
characters
in interfacecom.sun.star.xml.sax.XDocumentHandler
-
ignorableWhitespace
- Specified by:
ignorableWhitespace
in interfacecom.sun.star.xml.sax.XDocumentHandler
-
processingInstruction
- Specified by:
processingInstruction
in interfacecom.sun.star.xml.sax.XDocumentHandler
-
setDocumentLocator
public void setDocumentLocator(com.sun.star.xml.sax.XLocator xLocator) - Specified by:
setDocumentLocator
in interfacecom.sun.star.xml.sax.XDocumentHandler
-
convert
public void convert(com.sun.star.io.XInputStream xml, com.sun.star.io.XOutputStream exportStream) throws com.sun.star.uno.RuntimeException, IOException - Throws:
com.sun.star.uno.RuntimeException
IOException
-
getTypes
public com.sun.star.uno.Type[] getTypes()- Specified by:
getTypes
in interfacecom.sun.star.lang.XTypeProvider
-
getImplementationId
public byte[] getImplementationId()- Specified by:
getImplementationId
in interfacecom.sun.star.lang.XTypeProvider
-
getServiceName
- Specified by:
getServiceName
in interfacecom.sun.star.lang.XServiceName
-
supportsService
- Specified by:
supportsService
in interfacecom.sun.star.lang.XServiceInfo
-
getImplementationName
- Specified by:
getImplementationName
in interfacecom.sun.star.lang.XServiceInfo
-
getSupportedServiceNames
- Specified by:
getSupportedServiceNames
in interfacecom.sun.star.lang.XServiceInfo
-