LibreOffice Module writerfilter (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
writerfilter::rtftok::RTFTokenizer Class Referencefinal

RTF tokenizer that separates control words from text. More...

#include <rtftokenizer.hxx>

Inheritance diagram for writerfilter::rtftok::RTFTokenizer:
[legend]
Collaboration diagram for writerfilter::rtftok::RTFTokenizer:
[legend]

Public Member Functions

 RTFTokenizer (RTFListener &rImport, SvStream *pInStream, css::uno::Reference< css::task::XStatusIndicator > const &xStatusIndicator)
 
 ~RTFTokenizer () override
 
RTFError resolveParse ()
 
int getGroup () const
 Number of states on the stack. More...
 
void pushGroup ()
 To be invoked by the pushState() callback to signal when the importer enters a group. More...
 
void popGroup ()
 To be invoked by the popState() callback to signal when the importer leaves a group. More...
 
OUString getPosition ()
 
std::size_t getGroupStart () const
 
- Public Member Functions inherited from SvRefBase
 SvRefBase ()
 
 SvRefBase (const SvRefBase &)
 
SvRefBaseoperator= (const SvRefBase &)
 
void RestoreNoDelete ()
 
void AddNextRef ()
 
void AddFirstRef ()
 
void ReleaseRef ()
 
unsigned int GetRefCount () const
 

Static Public Member Functions

static bool lookupMathKeyword (RTFMathSymbol &rSymbol)
 To look up additional properties of a math symbol. More...
 

Private Member Functions

SvStreamStrm ()
 
RTFError resolveKeyword ()
 
RTFError dispatchKeyword (OString const &rKeyword, bool bParam, int nParam)
 

Private Attributes

RTFListenerm_rImport
 
SvStreamm_pInStream
 
css::uno::Reference< css::task::XStatusIndicator > const & m_xStatusIndicator
 
int m_nGroup
 Same as the size of the importer's states, except that this can be negative for invalid input. More...
 
sal_Int32 m_nLineNumber
 
std::size_t m_nLineStartPos
 
std::size_t m_nGroupStart
 

Static Private Attributes

static std::unordered_map< OString, RTFSymbols_aRTFControlWords
 
static bool s_bControlWordsInitialised
 
static std::vector< RTFMathSymbols_aRTFMathControlWords
 
static bool s_bMathControlWordsSorted
 

Additional Inherited Members

- Protected Member Functions inherited from SvRefBase
virtual ~SvRefBase () COVERITY_NOEXCEPT_FALSE
 

Detailed Description

RTF tokenizer that separates control words from text.

Definition at line 31 of file rtftokenizer.hxx.

Constructor & Destructor Documentation

◆ RTFTokenizer()

writerfilter::rtftok::RTFTokenizer::RTFTokenizer ( RTFListener rImport,
SvStream pInStream,
css::uno::Reference< css::task::XStatusIndicator > const &  xStatusIndicator 
)

◆ ~RTFTokenizer()

writerfilter::rtftok::RTFTokenizer::~RTFTokenizer ( )
overridedefault

Member Function Documentation

◆ dispatchKeyword()

RTFError writerfilter::rtftok::RTFTokenizer::dispatchKeyword ( OString const &  rKeyword,
bool  bParam,
int  nParam 
)
private

◆ getGroup()

int writerfilter::rtftok::RTFTokenizer::getGroup ( ) const
inline

Number of states on the stack.

Definition at line 40 of file rtftokenizer.hxx.

References m_nGroup.

◆ getGroupStart()

std::size_t writerfilter::rtftok::RTFTokenizer::getGroupStart ( ) const
inline

Definition at line 46 of file rtftokenizer.hxx.

References m_nGroupStart.

◆ getPosition()

OUString writerfilter::rtftok::RTFTokenizer::getPosition ( )

Definition at line 322 of file rtftokenizer.cxx.

References m_nLineNumber, m_nLineStartPos, and Strm().

◆ lookupMathKeyword()

bool writerfilter::rtftok::RTFTokenizer::lookupMathKeyword ( RTFMathSymbol rSymbol)
static

To look up additional properties of a math symbol.

Definition at line 251 of file rtftokenizer.cxx.

References s_aRTFMathControlWords.

Referenced by writerfilter::rtftok::RTFDocumentImpl::dispatchDestination().

◆ popGroup()

void writerfilter::rtftok::RTFTokenizer::popGroup ( )

To be invoked by the popState() callback to signal when the importer leaves a group.

Definition at line 182 of file rtftokenizer.cxx.

References m_nGroup.

◆ pushGroup()

void writerfilter::rtftok::RTFTokenizer::pushGroup ( )

To be invoked by the pushState() callback to signal when the importer enters a group.

Definition at line 180 of file rtftokenizer.cxx.

References m_nGroup.

◆ resolveKeyword()

RTFError writerfilter::rtftok::RTFTokenizer::resolveKeyword ( )
private

◆ resolveParse()

RTFError writerfilter::rtftok::RTFTokenizer::resolveParse ( )

◆ Strm()

SvStream & writerfilter::rtftok::RTFTokenizer::Strm ( )
inlineprivate

Definition at line 51 of file rtftokenizer.hxx.

References m_pInStream.

Referenced by dispatchKeyword(), getPosition(), resolveKeyword(), and resolveParse().

Member Data Documentation

◆ m_nGroup

int writerfilter::rtftok::RTFTokenizer::m_nGroup
private

Same as the size of the importer's states, except that this can be negative for invalid input.

Definition at line 65 of file rtftokenizer.hxx.

Referenced by getGroup(), popGroup(), pushGroup(), and resolveParse().

◆ m_nGroupStart

std::size_t writerfilter::rtftok::RTFTokenizer::m_nGroupStart
private

Definition at line 68 of file rtftokenizer.hxx.

Referenced by getGroupStart(), and resolveParse().

◆ m_nLineNumber

sal_Int32 writerfilter::rtftok::RTFTokenizer::m_nLineNumber
private

Definition at line 66 of file rtftokenizer.hxx.

Referenced by getPosition(), and resolveParse().

◆ m_nLineStartPos

std::size_t writerfilter::rtftok::RTFTokenizer::m_nLineStartPos
private

Definition at line 67 of file rtftokenizer.hxx.

Referenced by getPosition(), and resolveParse().

◆ m_pInStream

SvStream* writerfilter::rtftok::RTFTokenizer::m_pInStream
private

Definition at line 56 of file rtftokenizer.hxx.

Referenced by Strm().

◆ m_rImport

RTFListener& writerfilter::rtftok::RTFTokenizer::m_rImport
private

Definition at line 55 of file rtftokenizer.hxx.

Referenced by dispatchKeyword(), and resolveParse().

◆ m_xStatusIndicator

css::uno::Reference<css::task::XStatusIndicator> const& writerfilter::rtftok::RTFTokenizer::m_xStatusIndicator
private

Definition at line 57 of file rtftokenizer.hxx.

Referenced by resolveParse().

◆ s_aRTFControlWords

std::unordered_map< OString, RTFSymbol > writerfilter::rtftok::RTFTokenizer::s_aRTFControlWords
staticprivate

Definition at line 59 of file rtftokenizer.hxx.

Referenced by dispatchKeyword(), and RTFTokenizer().

◆ s_aRTFMathControlWords

std::vector< RTFMathSymbol > writerfilter::rtftok::RTFTokenizer::s_aRTFMathControlWords
staticprivate

Definition at line 62 of file rtftokenizer.hxx.

Referenced by lookupMathKeyword(), and RTFTokenizer().

◆ s_bControlWordsInitialised

bool writerfilter::rtftok::RTFTokenizer::s_bControlWordsInitialised
staticprivate

Definition at line 60 of file rtftokenizer.hxx.

Referenced by RTFTokenizer().

◆ s_bMathControlWordsSorted

bool writerfilter::rtftok::RTFTokenizer::s_bMathControlWordsSorted
staticprivate

Definition at line 63 of file rtftokenizer.hxx.

Referenced by RTFTokenizer().


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