LibreOffice Module oox (master)  1
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
oox::core::FilterDetectDocHandler Class Referencefinal

Document handler specifically designed for detecting OOXML file formats. More...

#include <filterdetect.hxx>

Inheritance diagram for oox::core::FilterDetectDocHandler:
[legend]
Collaboration diagram for oox::core::FilterDetectDocHandler:
[legend]

Public Member Functions

 FilterDetectDocHandler (const css::uno::Reference< css::uno::XComponentContext > &rxContext, OUString &rFilter, const OUString &rFileName)
 
virtual ~FilterDetectDocHandler () override
 
virtual void SAL_CALL startDocument () override
 
virtual void SAL_CALL endDocument () override
 
virtual void SAL_CALL processingInstruction (const OUString &rTarget, const OUString &rData) override
 
virtual void SAL_CALL setDocumentLocator (const css::uno::Reference< css::xml::sax::XLocator > &xLocator) override
 
virtual void SAL_CALL startFastElement (sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
 
virtual void SAL_CALL startUnknownElement (const OUString &Namespace, const OUString &Name, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
 
virtual void SAL_CALL endFastElement (sal_Int32 Element) override
 
virtual void SAL_CALL endUnknownElement (const OUString &Namespace, const OUString &Name) override
 
virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext (sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
 
virtual css::uno::Reference< XFastContextHandler > SAL_CALL createUnknownChildContext (const OUString &Namespace, const OUString &Name, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
 
virtual void SAL_CALL characters (const OUString &aChars) override
 

Private Types

typedef ::std::vector< sal_Int32 > ContextVector
 

Private Member Functions

void parseRelationship (const AttributeList &rAttribs)
 
OUString getFilterNameFromContentType (std::u16string_view rContentType, const OUString &rFileName)
 
void parseContentTypesDefault (const AttributeList &rAttribs)
 
void parseContentTypesOverride (const AttributeList &rAttribs)
 

Private Attributes

OUString & mrFilterName
 
OUString maFileName
 
ContextVector maContextStack
 
OUString maTargetPath
 
OOXMLVariant maOOXMLVariant
 
css::uno::Reference< css::uno::XComponentContext > mxContext
 

Detailed Description

Document handler specifically designed for detecting OOXML file formats.

It takes a reference to the filter string object via its constructor, and puts the name of the detected filter to it, if it successfully finds one.

Definition at line 63 of file filterdetect.hxx.

Member Typedef Documentation

typedef ::std::vector< sal_Int32 > oox::core::FilterDetectDocHandler::ContextVector
private

Definition at line 92 of file filterdetect.hxx.

Constructor & Destructor Documentation

oox::core::FilterDetectDocHandler::FilterDetectDocHandler ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
OUString &  rFilter,
const OUString &  rFileName 
)
explicit

Definition at line 54 of file filterdetect.cxx.

References oox::core::ECMA_Transitional, maContextStack, and mxContext.

oox::core::FilterDetectDocHandler::~FilterDetectDocHandler ( )
overridevirtual

Definition at line 63 of file filterdetect.cxx.

Member Function Documentation

void SAL_CALL oox::core::FilterDetectDocHandler::characters ( const OUString &  aChars)
overridevirtual

Definition at line 139 of file filterdetect.cxx.

Reference< XFastContextHandler > SAL_CALL oox::core::FilterDetectDocHandler::createFastChildContext ( sal_Int32  Element,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  Attribs 
)
overridevirtual

Definition at line 127 of file filterdetect.cxx.

Reference< XFastContextHandler > SAL_CALL oox::core::FilterDetectDocHandler::createUnknownChildContext ( const OUString &  Namespace,
const OUString &  Name,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  Attribs 
)
overridevirtual

Definition at line 133 of file filterdetect.cxx.

void SAL_CALL oox::core::FilterDetectDocHandler::endDocument ( )
overridevirtual

Definition at line 71 of file filterdetect.cxx.

void SAL_CALL oox::core::FilterDetectDocHandler::endFastElement ( sal_Int32  Element)
overridevirtual

Definition at line 117 of file filterdetect.cxx.

References maContextStack.

void SAL_CALL oox::core::FilterDetectDocHandler::endUnknownElement ( const OUString &  Namespace,
const OUString &  Name 
)
overridevirtual

Definition at line 122 of file filterdetect.cxx.

OUString oox::core::FilterDetectDocHandler::getFilterNameFromContentType ( std::u16string_view  rContentType,
const OUString &  rFileName 
)
private
void oox::core::FilterDetectDocHandler::parseContentTypesDefault ( const AttributeList rAttribs)
private
void oox::core::FilterDetectDocHandler::parseContentTypesOverride ( const AttributeList rAttribs)
private
void oox::core::FilterDetectDocHandler::parseRelationship ( const AttributeList rAttribs)
private
void SAL_CALL oox::core::FilterDetectDocHandler::processingInstruction ( const OUString &  rTarget,
const OUString &  rData 
)
overridevirtual

Definition at line 75 of file filterdetect.cxx.

void SAL_CALL oox::core::FilterDetectDocHandler::setDocumentLocator ( const css::uno::Reference< css::xml::sax::XLocator > &  xLocator)
overridevirtual

Definition at line 79 of file filterdetect.cxx.

void SAL_CALL oox::core::FilterDetectDocHandler::startDocument ( )
overridevirtual

Definition at line 67 of file filterdetect.cxx.

void SAL_CALL oox::core::FilterDetectDocHandler::startFastElement ( sal_Int32  nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  Attribs 
)
overridevirtual
void SAL_CALL oox::core::FilterDetectDocHandler::startUnknownElement ( const OUString &  Namespace,
const OUString &  Name,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  Attribs 
)
overridevirtual

Definition at line 112 of file filterdetect.cxx.

Member Data Documentation

ContextVector oox::core::FilterDetectDocHandler::maContextStack
private

Definition at line 96 of file filterdetect.hxx.

Referenced by endFastElement(), FilterDetectDocHandler(), and startFastElement().

OUString oox::core::FilterDetectDocHandler::maFileName
private

Definition at line 95 of file filterdetect.hxx.

Referenced by parseContentTypesDefault(), and parseContentTypesOverride().

OOXMLVariant oox::core::FilterDetectDocHandler::maOOXMLVariant
private

Definition at line 98 of file filterdetect.hxx.

Referenced by getFilterNameFromContentType(), and parseRelationship().

OUString oox::core::FilterDetectDocHandler::maTargetPath
private
OUString& oox::core::FilterDetectDocHandler::mrFilterName
private

Definition at line 94 of file filterdetect.hxx.

Referenced by parseContentTypesDefault(), and parseContentTypesOverride().

css::uno::Reference< css::uno::XComponentContext > oox::core::FilterDetectDocHandler::mxContext
private

Definition at line 99 of file filterdetect.hxx.

Referenced by parseRelationship().


The documentation for this class was generated from the following files: