Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
libetonyek::IWORKText Class Reference

`#include <IWORKText.h>`

## Public Member Functions
| IWORKText (const IWORKLanguageManager &langManager, bool discardEmptyContent, bool allowListInsertion)
| ~IWORKText ()
void | setRecorder (const std::shared_ptr< IWORKTextRecorder > &recorder)
const std::shared_ptr< IWORKTextRecorder > & | getRecorder () const
void | pushBaseLayoutStyle (const IWORKStylePtr_t &style)
| Set style used as base for all layout styles in this text. More...
void | pushBaseParagraphStyle (const IWORKStylePtr_t &style)
| Set style used as base for all paragraph styles in this text. More...
void | setLayoutStyle (const IWORKStylePtr_t &style)
| Set style used for the next layout. More...
void | flushLayout ()
| Flush the current layout. More...
IWORKStylePtr_t | getLayoutStyle ()
| returns the current layout style More...
void | setListStyle (const IWORKStylePtr_t &style)
| Set list style used for the next paragraph, if it is in a list. More...
void | setListLevel (const unsigned level)
| Set the list level of the next paragraph, 0 meaning no list. More...
void | flushList ()
| Flush the current list level(s). More...
void | setParagraphStyle (const IWORKStylePtr_t &style)
| Set style used for the next paragraph. More...
void | flushParagraph ()
| Flush the current paragraph. More...
void | setSpanStyle (const IWORKStylePtr_t &style)
| Set style used for the next span. More...
void | setLanguage (const IWORKStylePtr_t &style)
| Set language used for the next span. More...
void | flushSpan ()
| Flush the current span. More...
void | insertField (IWORKFieldType fieldType)
void | openLink (const std::string &url)
void | closeLink ()
void | insertText (const std::string &text)
void | insertTab ()
void | insertSpace ()
void | insertColumnBreak ()
void | insertLineBreak ()
void | insertPageBreak ()
void | insertInlineContent (const IWORKOutputElements &elements)
void | insertBlockContent (const IWORKOutputElements &elements)
bool | empty () const
void | draw (IWORKOutputElements &elements)

## Static Public Member Functions
static void | fillCharPropList (const IWORKStyleStack &style, const IWORKLanguageManager &langManager, librevenge::RVNGPropertyList &props)

## Private Member Functions
void | openSection ()
void | closeSection ()
bool | needsSection () const
void | handleListLevelChange (unsigned level)
void | openPara ()
void | closePara ()
void | fillParaPropList (librevenge::RVNGPropertyList &propList, bool realParagraph=true)
void | openSpan ()
void | closeSpan ()

## Private Attributes
const IWORKLanguageManager & | m_langManager
IWORKStyleStack | m_layoutStyleStack
IWORKStyleStack | m_paraStyleStack
IWORKOutputElements | m_elements
bool | m_hasContent
IWORKStylePtr_t | m_layoutStyle
bool | m_inSection
librevenge::RVNGPropertyList | m_sectionProps
bool | m_checkedSection
IWORKStylePtr_t | m_listStyle
IWORKStylePtr_t | m_previousListStyle
| the previous list style More...
bool | m_listAllowed
bool | m_listHasLevel0
| flag to know if the list level 0 is defined More...
unsigned | m_listLevel
unsigned | m_inListLevel
std::stack< bool > | m_isOrderedStack
| Saves info about the currently opened list levels being ordered or unordered. More...
IWORKStylePtr_t | m_paraStyle
IWORKBreakType | m_breakDelayed
bool | m_inPara
bool | m_inListElement
bool | m_ignoreEmptyPara
bool | m_inLink
IWORKStylePtr_t | m_spanStyle
IWORKStylePtr_t | m_langStyle
bool | m_spanStyleChanged
bool | m_inSpan
IWORKStylePtr_t | m_oldSpanStyle
std::shared_ptr< IWORKTextRecorder > | m_recorder

## Constructor & Destructor Documentation

## ◆ IWORKText()

libetonyek::IWORKText::IWORKText | ( | const IWORKLanguageManager & | langManager,
|  | bool | discardEmptyContent,
|  | bool | allowListInsertion
| ) |  |

## ◆ ~IWORKText()

libetonyek::IWORKText::~IWORKText | ( |  | ) |

## Member Function Documentation

## ◆ closeLink()

void libetonyek::IWORKText::closeLink | ( |  | ) |

Referenced by libetonyek::IWAText::parse().

## ◆ closePara()

void libetonyek::IWORKText::closePara | ( |  | ) |
| private

Referenced by closeSection(), draw(), flushList(), flushParagraph(), and handleListLevelChange().

## ◆ closeSection()

void libetonyek::IWORKText::closeSection | ( |  | ) |
| private

Referenced by flushLayout().

## ◆ closeSpan()

void libetonyek::IWORKText::closeSpan | ( |  | ) |
| private

Referenced by closeLink(), closePara(), flushParagraph(), flushSpan(), insertLineBreak(), insertSpace(), insertTab(), insertText(), and openLink().

## ◆ draw()

void libetonyek::IWORKText::draw | ( | IWORKOutputElements & | elements | ) |

## ◆ empty()

bool libetonyek::IWORKText::empty | ( |  | ) | const

## ◆ fillCharPropList()

void libetonyek::IWORKText::fillCharPropList | ( | const IWORKStyleStack & | style,
|  | const IWORKLanguageManager & | langManager,
|  | librevenge::RVNGPropertyList & | props
| ) |  |
| static

Referenced by libetonyek::IWORKTable::draw(), and openSpan().

## ◆ fillParaPropList()

void libetonyek::IWORKText::fillParaPropList | ( | librevenge::RVNGPropertyList & | propList,
|  | bool | realParagraph = `true`
| ) |  |
| private

Referenced by handleListLevelChange(), and openPara().

## ◆ flushLayout()

void libetonyek::IWORKText::flushLayout | ( |  | ) |

Flush the current layout.

Referenced by libetonyek::IWAText::parse().

## ◆ flushList()

void libetonyek::IWORKText::flushList | ( |  | ) |

Flush the current list level(s).

Referenced by draw(), flushLayout(), insertBlockContent(), and libetonyek::IWAText::parse().

## ◆ flushParagraph()

void libetonyek::IWORKText::flushParagraph | ( |  | ) |

Flush the current paragraph.

Referenced by libetonyek::IWAText::parse().

## ◆ flushSpan()

void libetonyek::IWORKText::flushSpan | ( |  | ) |

Flush the current span.

Referenced by libetonyek::IWAText::parse().

## ◆ getLayoutStyle()

IWORKStylePtr_t libetonyek::IWORKText::getLayoutStyle | ( |  | ) |

returns the current layout style

## ◆ getRecorder()

const std::shared_ptr< IWORKTextRecorder > & libetonyek::IWORKText::getRecorder | ( |  | ) | const

## ◆ handleListLevelChange()

void libetonyek::IWORKText::handleListLevelChange | ( | unsigned | level | ) |
| private

Referenced by closeSection(), flushList(), openPara(), and openSection().

## ◆ insertBlockContent()

void libetonyek::IWORKText::insertBlockContent | ( | const IWORKOutputElements & | elements | ) |

## ◆ insertColumnBreak()

void libetonyek::IWORKText::insertColumnBreak | ( |  | ) |

Referenced by libetonyek::IWAText::parse().

## ◆ insertField()

void libetonyek::IWORKText::insertField | ( | IWORKFieldType | fieldType | ) |

## ◆ insertInlineContent()

void libetonyek::IWORKText::insertInlineContent | ( | const IWORKOutputElements & | elements | ) |

## ◆ insertLineBreak()

void libetonyek::IWORKText::insertLineBreak | ( |  | ) |

Referenced by libetonyek::IWAText::parse().

## ◆ insertPageBreak()

void libetonyek::IWORKText::insertPageBreak | ( |  | ) |

Referenced by libetonyek::IWAText::parse().

## ◆ insertSpace()

void libetonyek::IWORKText::insertSpace | ( |  | ) |

Referenced by libetonyek::IWAText::parse().

## ◆ insertTab()

void libetonyek::IWORKText::insertTab | ( |  | ) |

Referenced by libetonyek::IWAText::parse().

## ◆ insertText()

void libetonyek::IWORKText::insertText | ( | const std::string & | text | ) |

## ◆ needsSection()

bool libetonyek::IWORKText::needsSection | ( |  | ) | const
| private

Referenced by insertBlockContent(), and openPara().

## ◆ openLink()

void libetonyek::IWORKText::openLink | ( | const std::string & | url | ) |

Referenced by libetonyek::IWAText::parse().

## ◆ openPara()

void libetonyek::IWORKText::openPara | ( |  | ) |
| private

Referenced by flushParagraph(), openLink(), and openSpan().

## ◆ openSection()

void libetonyek::IWORKText::openSection | ( |  | ) |
| private

Referenced by insertBlockContent(), and openPara().

## ◆ openSpan()

void libetonyek::IWORKText::openSpan | ( |  | ) |
| private

Referenced by insertField(), insertInlineContent(), insertLineBreak(), insertSpace(), insertTab(), and insertText().

## ◆ pushBaseLayoutStyle()

void libetonyek::IWORKText::pushBaseLayoutStyle | ( | const IWORKStylePtr_t & | style | ) |

Set style used as base for all layout styles in this text.

## ◆ pushBaseParagraphStyle()

void libetonyek::IWORKText::pushBaseParagraphStyle | ( | const IWORKStylePtr_t & | style | ) |

Set style used as base for all paragraph styles in this text.

## ◆ setLanguage()

void libetonyek::IWORKText::setLanguage | ( | const IWORKStylePtr_t & | style | ) |

Set language used for the next span.

Referenced by libetonyek::IWAText::parse().

## ◆ setLayoutStyle()

void libetonyek::IWORKText::setLayoutStyle | ( | const IWORKStylePtr_t & | style | ) |

Set style used for the next layout.

Referenced by libetonyek::IWAText::parse().

## ◆ setListLevel()

void libetonyek::IWORKText::setListLevel | ( | const unsigned | level | ) |

Set the list level of the next paragraph, 0 meaning no list.

Referenced by libetonyek::IWAText::parse().

## ◆ setListStyle()

void libetonyek::IWORKText::setListStyle | ( | const IWORKStylePtr_t & | style | ) |

Set list style used for the next paragraph, if it is in a list.

Referenced by libetonyek::IWAText::parse().

## ◆ setParagraphStyle()

void libetonyek::IWORKText::setParagraphStyle | ( | const IWORKStylePtr_t & | style | ) |

Set style used for the next paragraph.

Referenced by libetonyek::IWAText::parse().

## ◆ setRecorder()

void libetonyek::IWORKText::setRecorder | ( | const std::shared_ptr< IWORKTextRecorder > & | recorder | ) |

## ◆ setSpanStyle()

void libetonyek::IWORKText::setSpanStyle | ( | const IWORKStylePtr_t & | style | ) |

Set style used for the next span.

Referenced by libetonyek::IWAText::parse().

## Member Data Documentation

## ◆ m_breakDelayed

IWORKBreakType libetonyek::IWORKText::m_breakDelayed
| private

Referenced by fillParaPropList(), insertColumnBreak(), and insertPageBreak().

## ◆ m_checkedSection

bool libetonyek::IWORKText::m_checkedSection
| mutable private

Referenced by needsSection(), and setLayoutStyle().

## ◆ m_elements

IWORKOutputElements libetonyek::IWORKText::m_elements
| private

Referenced by closeLink(), closePara(), closeSection(), closeSpan(), draw(), handleListLevelChange(), insertBlockContent(), insertField(), insertInlineContent(), insertLineBreak(), insertSpace(), insertTab(), insertText(), openLink(), openPara(), openSection(), and openSpan().

## ◆ m_hasContent

bool libetonyek::IWORKText::m_hasContent
| private

Referenced by empty(), insertBlockContent(), insertColumnBreak(), insertField(), insertInlineContent(), insertLineBreak(), insertPageBreak(), insertSpace(), insertTab(), insertText(), and openLink().

## ◆ m_ignoreEmptyPara

bool libetonyek::IWORKText::m_ignoreEmptyPara
| private

Referenced by flushParagraph(), and insertBlockContent().

## ◆ m_inLink

bool libetonyek::IWORKText::m_inLink
| private

Referenced by closeLink(), insertText(), and openLink().

## ◆ m_inListElement

bool libetonyek::IWORKText::m_inListElement
| private

Referenced by closePara(), handleListLevelChange(), and openPara().

## ◆ m_inListLevel

unsigned libetonyek::IWORKText::m_inListLevel
| private

Referenced by closePara(), handleListLevelChange(), and openPara().

## ◆ m_inPara

bool libetonyek::IWORKText::m_inPara
| private

Referenced by closePara(), closeSection(), draw(), flushList(), flushParagraph(), handleListLevelChange(), openLink(), openPara(), openSection(), and openSpan().

## ◆ m_inSection

bool libetonyek::IWORKText::m_inSection
| private

Referenced by closeSection(), flushLayout(), insertBlockContent(), openPara(), and openSection().

## ◆ m_inSpan

bool libetonyek::IWORKText::m_inSpan
| private

Referenced by closeLink(), closePara(), closeSpan(), flushParagraph(), flushSpan(), insertField(), insertInlineContent(), insertLineBreak(), insertSpace(), insertTab(), insertText(), openLink(), and openSpan().

## ◆ m_isOrderedStack

std::stack<bool> libetonyek::IWORKText::m_isOrderedStack
| private

Saves info about the currently opened list levels being ordered or unordered.

Referenced by handleListLevelChange(), and ~IWORKText().

## ◆ m_langManager

const IWORKLanguageManager& libetonyek::IWORKText::m_langManager
| private

Referenced by openSpan().

## ◆ m_langStyle

IWORKStylePtr_t libetonyek::IWORKText::m_langStyle
| private

Referenced by openSpan(), and setLanguage().

## ◆ m_layoutStyle

IWORKStylePtr_t libetonyek::IWORKText::m_layoutStyle
| private

Referenced by getLayoutStyle(), needsSection(), and setLayoutStyle().

## ◆ m_layoutStyleStack

IWORKStyleStack libetonyek::IWORKText::m_layoutStyleStack
| private

Referenced by needsSection(), and pushBaseLayoutStyle().

## ◆ m_listAllowed

bool libetonyek::IWORKText::m_listAllowed
| private

Referenced by handleListLevelChange().

## ◆ m_listHasLevel0

bool libetonyek::IWORKText::m_listHasLevel0
| private

flag to know if the list level 0 is defined

Referenced by openPara(), and setListStyle().

## ◆ m_listLevel

unsigned libetonyek::IWORKText::m_listLevel
| private

Referenced by openPara(), and setListLevel().

## ◆ m_listStyle

IWORKStylePtr_t libetonyek::IWORKText::m_listStyle
| private

Referenced by handleListLevelChange(), and setListStyle().

## ◆ m_oldSpanStyle

IWORKStylePtr_t libetonyek::IWORKText::m_oldSpanStyle
| private

Referenced by closeLink(), and openLink().

## ◆ m_paraStyle

IWORKStylePtr_t libetonyek::IWORKText::m_paraStyle
| private

Referenced by fillParaPropList(), handleListLevelChange(), openSpan(), and setParagraphStyle().

## ◆ m_paraStyleStack

IWORKStyleStack libetonyek::IWORKText::m_paraStyleStack
| private

Referenced by fillParaPropList(), handleListLevelChange(), openSpan(), and pushBaseParagraphStyle().

## ◆ m_previousListStyle

IWORKStylePtr_t libetonyek::IWORKText::m_previousListStyle
| private

the previous list style

Referenced by handleListLevelChange().

## ◆ m_recorder

std::shared_ptr<IWORKTextRecorder> libetonyek::IWORKText::m_recorder
| private

Referenced by closeLink(), draw(), flushLayout(), flushList(), flushParagraph(), flushSpan(), getRecorder(), insertColumnBreak(), insertField(), insertLineBreak(), insertPageBreak(), insertSpace(), insertTab(), insertText(), openLink(), pushBaseLayoutStyle(), pushBaseParagraphStyle(), setLanguage(), setLayoutStyle(), setListLevel(), setListStyle(), setParagraphStyle(), setRecorder(), and setSpanStyle().

## ◆ m_sectionProps

librevenge::RVNGPropertyList libetonyek::IWORKText::m_sectionProps
| mutable private

Referenced by needsSection(), openSection(), and setLayoutStyle().

## ◆ m_spanStyle

IWORKStylePtr_t libetonyek::IWORKText::m_spanStyle
| private

Referenced by closeLink(), openLink(), openSpan(), and setSpanStyle().

## ◆ m_spanStyleChanged

bool libetonyek::IWORKText::m_spanStyleChanged
| private

Referenced by insertLineBreak(), insertSpace(), insertTab(), insertText(), openSpan(), setLanguage(), and setSpanStyle().

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

- IWORKText.h
- IWORKText.cpp