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 java.lang.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.XTypeProviderThis class provides an abstract UNO component which implements an XExportFilter. The filter is actually generic and only the constructor and 3 strings needs to be changed by the subclass.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.String__displayNameFilter name to include in error messagesstatic java.lang.String__implementationNameImplementation name for the componentstatic java.lang.String__serviceNameService name for the componentprotected static com.sun.star.lang.XMultiServiceFactoryxMSF
-
Constructor Summary
Constructors Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(java.lang.String sText)voidconvert(org.w3c.dom.Document dom, com.sun.star.io.XOutputStream exportStream)voidendDocument()voidendElement(java.lang.String sTagName)booleanexporter(com.sun.star.beans.PropertyValue[] aSourceData, java.lang.String[] msUserData)byte[]getImplementationId()java.lang.StringgetImplementationName()java.lang.StringgetServiceName()java.lang.String[]getSupportedServiceNames()com.sun.star.uno.Type[]getTypes()voidignorableWhitespace(java.lang.String str)voidprocessingInstruction(java.lang.String aTarget, java.lang.String aData)voidsetDocumentLocator(com.sun.star.xml.sax.XLocator xLocator)voidstartDocument()voidstartElement(java.lang.String sTagName, com.sun.star.xml.sax.XAttributeList xAttribs)booleansupportsService(java.lang.String stringServiceName)
-
-
-
Field Detail
-
__serviceName
public static final java.lang.String __serviceName
Service name for the component- See Also:
- Constant Field Values
-
__implementationName
public static final java.lang.String __implementationName
Implementation name for the component- See Also:
- Constant Field Values
-
__displayName
public java.lang.String __displayName
Filter name to include in error messages
-
xMSF
protected static com.sun.star.lang.XMultiServiceFactory xMSF
-
-
Constructor Detail
-
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 registration class
-
-
Method Detail
-
exporter
public boolean exporter(com.sun.star.beans.PropertyValue[] aSourceData, java.lang.String[] msUserData) throws com.sun.star.uno.RuntimeException- Specified by:
exporterin interfacecom.sun.star.xml.XExportFilter- Throws:
com.sun.star.uno.RuntimeException
-
startDocument
public void startDocument()
- Specified by:
startDocumentin interfacecom.sun.star.xml.sax.XDocumentHandler
-
endDocument
public void endDocument() throws com.sun.star.uno.RuntimeException- Specified by:
endDocumentin interfacecom.sun.star.xml.sax.XDocumentHandler- Throws:
com.sun.star.uno.RuntimeException
-
startElement
public void startElement(java.lang.String sTagName, com.sun.star.xml.sax.XAttributeList xAttribs)- Specified by:
startElementin interfacecom.sun.star.xml.sax.XDocumentHandler
-
endElement
public void endElement(java.lang.String sTagName)
- Specified by:
endElementin interfacecom.sun.star.xml.sax.XDocumentHandler
-
characters
public void characters(java.lang.String sText)
- Specified by:
charactersin interfacecom.sun.star.xml.sax.XDocumentHandler
-
ignorableWhitespace
public void ignorableWhitespace(java.lang.String str)
- Specified by:
ignorableWhitespacein interfacecom.sun.star.xml.sax.XDocumentHandler
-
processingInstruction
public void processingInstruction(java.lang.String aTarget, java.lang.String aData)- Specified by:
processingInstructionin interfacecom.sun.star.xml.sax.XDocumentHandler
-
setDocumentLocator
public void setDocumentLocator(com.sun.star.xml.sax.XLocator xLocator)
- Specified by:
setDocumentLocatorin interfacecom.sun.star.xml.sax.XDocumentHandler
-
convert
public void convert(org.w3c.dom.Document dom, com.sun.star.io.XOutputStream exportStream) throws com.sun.star.uno.RuntimeException, java.io.IOException- Throws:
com.sun.star.uno.RuntimeExceptionjava.io.IOException
-
getTypes
public com.sun.star.uno.Type[] getTypes()
- Specified by:
getTypesin interfacecom.sun.star.lang.XTypeProvider
-
getImplementationId
public byte[] getImplementationId()
- Specified by:
getImplementationIdin interfacecom.sun.star.lang.XTypeProvider
-
getServiceName
public java.lang.String getServiceName()
- Specified by:
getServiceNamein interfacecom.sun.star.lang.XServiceName
-
supportsService
public boolean supportsService(java.lang.String stringServiceName)
- Specified by:
supportsServicein interfacecom.sun.star.lang.XServiceInfo
-
getImplementationName
public java.lang.String getImplementationName()
- Specified by:
getImplementationNamein interfacecom.sun.star.lang.XServiceInfo
-
getSupportedServiceNames
public java.lang.String[] getSupportedServiceNames()
- Specified by:
getSupportedServiceNamesin interfacecom.sun.star.lang.XServiceInfo
-
-