LibreOffice Module writerfilter (master) 1
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
writerfilter::ooxml::OOXMLFastContextHandlerLinear Class Referenceabstract

A class that converts from XFastParser/XFastContextHandler usage to a liner XML stream of data. More...

#include <OOXMLFastContextHandler.hxx>

Inheritance diagram for writerfilter::ooxml::OOXMLFastContextHandlerLinear:
[legend]
Collaboration diagram for writerfilter::ooxml::OOXMLFastContextHandlerLinear:
[legend]

Public Member Functions

 OOXMLFastContextHandlerLinear (OOXMLFastContextHandler *pContext)
 
virtual std::string getType () const override=0
 Return the type of the class, as written in model.xml . More...
 
- Public Member Functions inherited from writerfilter::ooxml::OOXMLFastContextHandlerProperties
 OOXMLFastContextHandlerProperties (OOXMLFastContextHandler *pContext)
 
virtual ~OOXMLFastContextHandlerProperties () override
 
virtual OOXMLValue::Pointer_t getValue () const override
 Return value of this context(element). More...
 
virtual ResourceEnum_t getResource () const override
 
virtual void newProperty (Id nId, const OOXMLValue::Pointer_t &pVal) override
 
void handleXNotes ()
 
void handleHdrFtr ()
 
void handleComment ()
 
void handlePicture ()
 
void handleBreak ()
 
void handleOutOfOrderBreak ()
 
void handleOLE ()
 
void handleFontRel ()
 
void handleHyperlinkURL ()
 
void handleAltChunk ()
 
virtual void setPropertySet (const OOXMLPropertySet::Pointer_t &pPropertySet) override
 
virtual OOXMLPropertySet::Pointer_t getPropertySet () const override
 
- Public Member Functions inherited from writerfilter::ooxml::OOXMLFastContextHandler
 OOXMLFastContextHandler (css::uno::Reference< css::uno::XComponentContext > const &context)
 
 OOXMLFastContextHandler (OOXMLFastContextHandler *pContext)
 
 OOXMLFastContextHandler (OOXMLFastContextHandler const &)=default
 
virtual ~OOXMLFastContextHandler () override
 
virtual void SAL_CALL startFastElement (sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override final
 
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< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext (sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
 
virtual css::uno::Reference< css::xml::sax::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
 
void setStream (Stream *pStream)
 
virtual OOXMLValue::Pointer_t getValue () const
 Return value of this context(element). More...
 
virtual std::string getType () const
 Returns a string describing the type of the context. More...
 
virtual ResourceEnum_t getResource () const
 
virtual void attributes (const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs)
 
virtual void newProperty (Id aId, const OOXMLValue::Pointer_t &pVal)
 
virtual void setPropertySet (const OOXMLPropertySet::Pointer_t &pPropertySet)
 
virtual OOXMLPropertySet::Pointer_t getPropertySet () const
 
virtual void setToken (Token_t nToken)
 
virtual Token_t getToken () const
 
void resolveFootnote (const sal_Int32 nId)
 
void resolveEndnote (const sal_Int32 nId)
 
void resolveComment (const sal_Int32 nId)
 
void resolvePicture (const OUString &rId)
 
void resolveHeader (const sal_Int32 type, const OUString &rId)
 
void resolveFooter (const sal_Int32 type, const OUString &rId)
 
void resolveData (const OUString &rId)
 
OUString getTargetForId (const OUString &rId)
 
void setDocument (OOXMLDocumentImpl *pDocument)
 
OOXMLDocumentImplgetDocument ()
 
void setXNoteId (const OOXMLValue::Pointer_t &pValue)
 
void setXNoteId (const sal_Int32 nId)
 
sal_Int32 getXNoteId () const
 
void setForwardEvents (bool bForwardEvents)
 
bool isForwardEvents () const
 
virtual void setId (Id nId)
 
virtual Id getId () const
 
void setDefine (Id nDefine)
 
Id getDefine () const
 
const OOXMLParserState::Pointer_tgetParserState () const
 
void sendTableDepth () const
 
void setHandle ()
 
void startSectionGroup ()
 
void setLastParagraphInSection ()
 
void setLastSectionGroup ()
 
void endSectionGroup ()
 
void startParagraphGroup ()
 
void endParagraphGroup ()
 
void startCharacterGroup ()
 
void endCharacterGroup ()
 
virtual void pushBiDiEmbedLevel ()
 
virtual void popBiDiEmbedLevel ()
 
void startSdt ()
 
void endSdt ()
 
void startSdtRun ()
 
void endSdtRun ()
 
void startField ()
 
void fieldSeparator ()
 
void endField ()
 
void lockField ()
 
void ftnednref ()
 
void ftnedncont ()
 
void ftnednsep ()
 
void pgNum ()
 
void tab ()
 
void symbol ()
 
void cr ()
 
void noBreakHyphen ()
 
void softHyphen ()
 
void handleLastParagraphInSection ()
 
void endOfParagraph ()
 
void text (const OUString &sText)
 
void positionOffset (const OUString &sText)
 
void alignH (const OUString &sText)
 
void alignV (const OUString &sText)
 
void positivePercentage (const OUString &rText)
 
void startGlossaryEntry ()
 
void endGlossaryEntry ()
 
void startTxbxContent ()
 
void endTxbxContent ()
 
void propagateCharacterProperties ()
 
void propagateTableProperties ()
 
void propagateRowProperties ()
 
void propagateCellProperties ()
 
void sendPropertiesWithId (Id nId)
 
void sendPropertiesToParent ()
 
void sendCellProperties ()
 
void sendRowProperties ()
 
void sendTableProperties ()
 
void clearTableProps ()
 
void clearProps ()
 
virtual void setDefaultBooleanValue ()
 
virtual void setDefaultIntegerValue ()
 
virtual void setDefaultHexValue ()
 
virtual void setDefaultStringValue ()
 
void sendPropertyToParent ()
 
OOXMLFastContextHandlergetParent () const
 
void setGridAfter (const OOXMLValue::Pointer_t &pGridAfter)
 

Protected Member Functions

virtual void process ()=0
 Called when the tokens for the element, its content and sub-elements have been linearized and should be processed. More...
 
virtual void lcl_startFastElement (Token_t Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
 
virtual void lcl_endFastElement (Token_t Element) override
 
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > lcl_createFastChildContext (Token_t Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
 
virtual void lcl_characters (const OUString &aChars) override
 
virtual void lcl_endFastElement (Token_t Element) override
 
- Protected Member Functions inherited from writerfilter::ooxml::OOXMLFastContextHandler
virtual void lcl_startFastElement (Token_t Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs)
 
virtual void lcl_endFastElement (Token_t Element)
 
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > lcl_createFastChildContext (Token_t Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs)
 
virtual void lcl_characters (const OUString &aChars)
 
void startAction ()
 
void endAction ()
 

Protected Attributes

oox::formulaimport::XmlStreamBuilder m_buffer
 
- Protected Attributes inherited from writerfilter::ooxml::OOXMLFastContextHandlerProperties
OOXMLPropertySet::Pointer_t mpPropertySet
 the properties More...
 
- Protected Attributes inherited from writerfilter::ooxml::OOXMLFastContextHandler
OOXMLFastContextHandlermpParent
 
Id mId
 
Id mnDefine
 
Token_t mnToken
 
sal_Int8 mnMathJcVal
 
bool mbIsMathPara
 
StreammpStream
 
OOXMLParserState::Pointer_t mpParserState
 
unsigned int mnTableDepth
 
bool m_inPositionV
 
bool mbAllowInCell
 
bool mbIsVMLfound
 
OOXMLValue::Pointer_t mpGridAfter
 

Private Attributes

int m_depthCount
 

Additional Inherited Members

- Public Types inherited from writerfilter::ooxml::OOXMLFastContextHandler
enum  ResourceEnum_t {
  UNKNOWN ,
  STREAM ,
  PROPERTIES ,
  TABLE ,
  SHAPE
}
 
typedef tools::SvRef< OOXMLFastContextHandlerPointer_t
 
- Static Public Member Functions inherited from writerfilter::ooxml::OOXMLFastContextHandler
static void ignore ()
 
- Protected Types inherited from writerfilter::ooxml::OOXMLFastContextHandler
enum  eMathParaJc {
  INLINE ,
  CENTER ,
  LEFT ,
  RIGHT
}
 

Detailed Description

A class that converts from XFastParser/XFastContextHandler usage to a liner XML stream of data.

The purpose of this class is to convert the rather complex XFastContextHandler-based XML processing that requires context subclasses, callbacks, etc. into a linear stream of XML tokens that can be handled simply by reading the tokens one by one and directly processing them. See the oox::formulaimport::XmlStream class documentation for more information.

Usage: Create a subclass of OOXMLFastContextHandlerLinear, reimplemented getType() to provide type of the subclass and process() to actually process the XML stream. Also make sure to add a line like the following to model.xml (for class OOXMLFastContextHandlerMath):

<resource name="CT_OMath" resource="Math">

Available since: \n 3.5

Definition at line 561 of file OOXMLFastContextHandler.hxx.

Constructor & Destructor Documentation

◆ OOXMLFastContextHandlerLinear()

writerfilter::ooxml::OOXMLFastContextHandlerLinear::OOXMLFastContextHandlerLinear ( OOXMLFastContextHandler pContext)
explicit

Definition at line 2255 of file OOXMLFastContextHandler.cxx.

Member Function Documentation

◆ getType()

virtual std::string writerfilter::ooxml::OOXMLFastContextHandlerLinear::getType ( ) const
overridepure virtual

Return the type of the class, as written in model.xml .

Reimplemented from writerfilter::ooxml::OOXMLFastContextHandler.

Implemented in writerfilter::ooxml::OOXMLFastContextHandlerMath.

◆ lcl_characters()

void writerfilter::ooxml::OOXMLFastContextHandlerLinear::lcl_characters ( const OUString &  aChars)
overrideprotectedvirtual
Exceptions
css::uno::RuntimeException
css::xml::sax::SAXException

Reimplemented from writerfilter::ooxml::OOXMLFastContextHandler.

Definition at line 2284 of file OOXMLFastContextHandler.cxx.

References oox::formulaimport::XmlStreamBuilder::appendCharacters(), and m_buffer.

◆ lcl_createFastChildContext()

uno::Reference< xml::sax::XFastContextHandler > writerfilter::ooxml::OOXMLFastContextHandlerLinear::lcl_createFastChildContext ( Token_t  Element,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  Attribs 
)
overrideprotectedvirtual
Exceptions
css::uno::RuntimeException
css::xml::sax::SAXException

Reimplemented from writerfilter::ooxml::OOXMLFastContextHandler.

Definition at line 2276 of file OOXMLFastContextHandler.cxx.

◆ lcl_endFastElement()

void writerfilter::ooxml::OOXMLFastContextHandlerLinear::lcl_endFastElement ( Token_t  Element)
overrideprotectedvirtual
Exceptions
css::uno::RuntimeException
css::xml::sax::SAXException

Reimplemented from writerfilter::ooxml::OOXMLFastContextHandlerProperties.

Definition at line 2268 of file OOXMLFastContextHandler.cxx.

References oox::formulaimport::XmlStreamBuilder::appendClosingTag(), m_buffer, m_depthCount, and process().

◆ lcl_startFastElement()

void writerfilter::ooxml::OOXMLFastContextHandlerLinear::lcl_startFastElement ( Token_t  Element,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  Attribs 
)
overrideprotectedvirtual
Exceptions
css::uno::RuntimeException
css::xml::sax::SAXException

Reimplemented from writerfilter::ooxml::OOXMLFastContextHandler.

Definition at line 2261 of file OOXMLFastContextHandler.cxx.

References oox::formulaimport::XmlStreamBuilder::appendOpeningTag(), m_buffer, and m_depthCount.

◆ process()

virtual void writerfilter::ooxml::OOXMLFastContextHandlerLinear::process ( )
protectedpure virtual

Called when the tokens for the element, its content and sub-elements have been linearized and should be processed.

The data member buffer contains the converted data.

Implemented in writerfilter::ooxml::OOXMLFastContextHandlerMath.

Referenced by lcl_endFastElement().

Member Data Documentation

◆ m_buffer

oox::formulaimport::XmlStreamBuilder writerfilter::ooxml::OOXMLFastContextHandlerLinear::m_buffer
protected

◆ m_depthCount

int writerfilter::ooxml::OOXMLFastContextHandlerLinear::m_depthCount
private

Definition at line 590 of file OOXMLFastContextHandler.hxx.

Referenced by lcl_endFastElement(), and lcl_startFastElement().


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