|
LibreOffice Module shell (master) 1
|
#include <contentreader.hxx>
Public Member Functions | |
| virtual | ~CContentReader () override |
| destructor. More... | |
| CContentReader (const Filepath_t &DocumentName, LocaleSet_t const &DocumentLocale) | |
| constructor. More... | |
| CContentReader (StreamInterface *stream, LocaleSet_t const &DocumentLocale) | |
| ChunkBuffer_t const & | getChunkBuffer () const |
| Get the chunkbuffer. More... | |
Public Member Functions inherited from CBaseReader | |
| virtual | ~CBaseReader () override |
Public Member Functions inherited from i_xml_parser_event_handler | |
| virtual | ~i_xml_parser_event_handler () |
| virtual void | start_element (const string_t &raw_name, const string_t &local_name, const xml_tag_attribute_container_t &attributes)=0 |
| virtual void | end_element (const string_t &raw_name, const string_t &local_name)=0 |
| virtual void | characters (const string_t &character)=0 |
| virtual void | ignore_whitespace (const string_t &whitespaces)=0 |
| virtual void | comment (const string_t &comment)=0 |
Protected Member Functions | |
| virtual void | start_element (const string_t &raw_name, const string_t &local_name, const xml_tag_attribute_container_t &attributes) override |
| start_element occurs when a tag is start. More... | |
| virtual void | end_element (const string_t &raw_name, const string_t &local_name) override |
| end_element occurs when a tag is closed More... | |
| virtual void | characters (const string_t &character) override |
| characters occurs when receiving characters More... | |
| ITag * | chooseTagReader (const std::wstring &tag_name, const XmlTagAttributes_t &XmlAttributes) |
| choose an appropriate tag reader to handle the tag. More... | |
| StyleLocaleMap_t const & | getStyleMap () const |
| Get the list of style locale pair. More... | |
| ::std::wstring | getCurrentContentStyle () |
| get style of the current content. More... | |
| void | addChunk (LocaleSet_t const &Locale, Content_t const &Content) |
| add chunk into Chunk Buffer. More... | |
| LocaleSet_t const & | getLocale (const StyleName_t &Style) |
| get a style's locale field. More... | |
Protected Member Functions inherited from CBaseReader | |
| CBaseReader (const Filepath_t &DocumentName) | |
| constructor of CBaseReader. More... | |
| CBaseReader (StreamInterface *stream) | |
| virtual void | start_document () |
| virtual void | end_document () |
| virtual void | start_element (const string_t &raw_name, const string_t &local_name, const xml_tag_attribute_container_t &attributes) override=0 |
| virtual void | end_element (const string_t &raw_name, const string_t &local_name) override=0 |
| virtual void | characters (const string_t &character) override=0 |
| virtual void | ignore_whitespace (const string_t &) override |
| virtual void | processing_instruction (const std::wstring &, const std::wstring &) |
| virtual void | comment (const string_t &) override |
| void | Initialize (const std::string &) |
| Read interested tag content into respective structure then start parsing process. More... | |
Private Attributes | |
| std::stack< ITag * > | m_TagBuilderStack |
| ChunkBuffer_t | m_ChunkBuffer |
| StyleLocaleMap_t | m_StyleMap |
| LocaleSet_t | m_DefaultLocale |
Definition at line 30 of file contentreader.hxx.
|
overridevirtual |
destructor.
Definition at line 69 of file contentreader.cxx.
| CContentReader::CContentReader | ( | const Filepath_t & | DocumentName, |
| LocaleSet_t const & | DocumentLocale | ||
| ) |
constructor.
Definition at line 29 of file contentreader.cxx.
References DOC_CONTENT_NAME, CBaseReader::Initialize(), and m_DefaultLocale.
| CContentReader::CContentReader | ( | StreamInterface * | stream, |
| LocaleSet_t const & | DocumentLocale | ||
| ) |
Definition at line 47 of file contentreader.cxx.
References DOC_CONTENT_NAME, CBaseReader::Initialize(), m_DefaultLocale, and stream.
|
protected |
add chunk into Chunk Buffer.
Definition at line 119 of file contentreader.cxx.
References Content, EMPTY_STRING, LF, Locale, m_ChunkBuffer, and SPACE.
Referenced by characters(), and end_element().
|
overrideprotectedvirtual |
characters occurs when receiving characters
| character | content of the information received. |
Implements CBaseReader.
Definition at line 207 of file contentreader.cxx.
References ITag::addCharacters(), addChunk(), character, getCurrentContentStyle(), getLocale(), HasOnlySpaces(), and m_TagBuilderStack.
|
protected |
choose an appropriate tag reader to handle the tag.
choose an appropriate tag reader
| tag_name | the name of the tag. |
| XmlAttributes | attribute structure of the tag to save in. |
Definition at line 78 of file contentreader.cxx.
References ITag::addAttributes(), CONTENT_STYLE_PROPERTIES, CONTENT_STYLE_STYLE, CONTENT_STYLE_STYLE_NAME, CONTENT_TEXT_A, CONTENT_TEXT_BOOKMARK_REF, CONTENT_TEXT_H, CONTENT_TEXT_INDEX_TITLE_TEMPLATE, CONTENT_TEXT_P, CONTENT_TEXT_SEQUENCE, CONTENT_TEXT_SPAN, CONTENT_TEXT_STYLE_PROPERTIES, and m_TagBuilderStack.
Referenced by start_element().
|
overrideprotectedvirtual |
end_element occurs when a tag is closed
| raw_name | raw name of the tag. |
| local_name | local name of the tag. |
Implements CBaseReader.
Definition at line 178 of file contentreader.cxx.
References addChunk(), CONTENT_STYLE_STYLE, CONTENT_TEXT_A, CONTENT_TEXT_BOOKMARK_REF, CONTENT_TEXT_H, CONTENT_TEXT_INDEX_TITLE_TEMPLATE, CONTENT_TEXT_P, CONTENT_TEXT_SEQUENCE, CONTENT_TEXT_SPAN, EMPTY_STRING, ITag::endTag(), getCurrentContentStyle(), getLocale(), ITag::getTagContent(), LF, m_DefaultLocale, m_StyleMap, m_TagBuilderStack, and SPACE.
|
inline |
Get the chunkbuffer.
Definition at line 45 of file contentreader.hxx.
References m_ChunkBuffer.
|
protected |
get style of the current content.
Definition at line 109 of file contentreader.cxx.
References CONTENT_TEXT_STYLENAME, ITag::getTagAttribute(), and m_TagBuilderStack.
Referenced by characters(), and end_element().
|
protected |
get a style's locale field.
Definition at line 141 of file contentreader.cxx.
References m_DefaultLocale, m_StyleMap, and Style.
Referenced by characters(), and end_element().
|
inlineprotected |
Get the list of style locale pair.
Definition at line 96 of file contentreader.hxx.
References m_StyleMap.
|
overrideprotectedvirtual |
start_element occurs when a tag is start.
| raw_name | raw name of the tag. |
| local_name | local name of the tag. |
| attributes | attribute structure. |
Implements CBaseReader.
Definition at line 161 of file contentreader.cxx.
References chooseTagReader(), m_TagBuilderStack, and ITag::startTag().
|
private |
Definition at line 115 of file contentreader.hxx.
Referenced by addChunk(), and getChunkBuffer().
|
private |
Definition at line 117 of file contentreader.hxx.
Referenced by CContentReader(), end_element(), and getLocale().
|
private |
Definition at line 116 of file contentreader.hxx.
Referenced by end_element(), getLocale(), and getStyleMap().
|
private |
Definition at line 113 of file contentreader.hxx.
Referenced by characters(), chooseTagReader(), end_element(), getCurrentContentStyle(), and start_element().