#include <ie_TOC.h>
Public Member Functions | |
IE_TOCHelper (PD_Document *doc) | |
~IE_TOCHelper () | |
bool | hasTOC () const |
bool | docHasTOC () const |
bool | isTOCStyle (const UT_UTF8String &styleName, int *out_level=NULL) const |
bool | isTOCStyle (const char *styleName, int *out_level=NULL) const |
int | getNumTOCEntries () const |
UT_UTF8String | getNthTOCEntry (int nth, int *out_level=NULL) const |
bool | getNthTOCEntryPos (int nth, PT_DocPosition &pos) const |
Private Member Functions | |
bool | _tocNameLevelHelper (const UT_UTF8String &styleName, const char *sLStyle) const |
void | _defineTOC (const UT_UTF8String &toc_text, int level, PT_DocPosition pos) |
IE_TOCHelper () | |
IE_TOCHelper (const IE_TOCHelper &rhs) | |
IE_TOCHelper & | operator= (const IE_TOCHelper &rhs) |
Private Attributes | |
UT_GenericVector< UT_UTF8String * > | mTOCStrings |
UT_GenericVector< int > | mTOCLevels |
UT_GenericVector< PT_DocPosition > | mTOCPositions |
bool | mHasTOC |
bool | mDocHasTOC |
PD_Document * | mDoc |
Friends | |
class | TOC_Listener |
IE_TOCHelper::IE_TOCHelper | ( | PD_Document * | doc | ) |
References PD_Document::tellListener().
IE_TOCHelper::~IE_TOCHelper | ( | ) |
References mTOCStrings, and UT_VECTOR_PURGEALL.
IE_TOCHelper::IE_TOCHelper | ( | ) | [private] |
IE_TOCHelper::IE_TOCHelper | ( | const IE_TOCHelper & | rhs | ) | [private] |
void IE_TOCHelper::_defineTOC | ( | const UT_UTF8String & | toc_text, | |
int | level, | |||
PT_DocPosition | pos | |||
) | [private] |
References UT_UTF8String::length(), mHasTOC, mTOCLevels, mTOCPositions, mTOCStrings, and UT_GenericVector< T >::push_back().
Referenced by TOC_Listener::_commitTOCData().
bool IE_TOCHelper::_tocNameLevelHelper | ( | const UT_UTF8String & | styleName, | |
const char * | sLStyle | |||
) | const [private] |
References PD_Style::getBasedOn(), PD_Style::getName(), PD_Document::getStyle(), mDoc, style, and UT_UTF8String::utf8_str().
Referenced by isTOCStyle().
bool IE_TOCHelper::docHasTOC | ( | ) | const |
References mDocHasTOC.
UT_UTF8String IE_TOCHelper::getNthTOCEntry | ( | int | nth, | |
int * | out_level = NULL | |||
) | const |
References UT_GenericVector< T >::getNthItem(), getNumTOCEntries(), mTOCLevels, mTOCStrings, and UT_return_val_if_fail.
Referenced by s_WML_Listener::_emitTOC(), IE_Exp_HTML_Listener::_insertTOC(), IE_Exp_HTML::_writeDocument(), IE_Exp_EPUB::EPUB2_writeNavigation(), IE_Exp_EPUB::EPUB3_writeNavigation(), IE_Exp_HTML_NavigationHelper::getFilenameByPosition(), and IE_Exp_HTML_NavigationHelper::IE_Exp_HTML_NavigationHelper().
bool IE_TOCHelper::getNthTOCEntryPos | ( | int | nth, | |
PT_DocPosition & | pos | |||
) | const |
int IE_TOCHelper::getNumTOCEntries | ( | ) | const |
References mTOCStrings, and UT_GenericVector< T >::size().
Referenced by s_WML_Listener::_emitTOC(), IE_Exp_HTML_Listener::_insertTOC(), IE_Exp_HTML::_writeDocument(), IE_Exp_EPUB::EPUB2_writeNavigation(), IE_Exp_EPUB::EPUB3_writeNavigation(), IE_Exp_HTML_NavigationHelper::getFilenameByPosition(), getNthTOCEntry(), getNthTOCEntryPos(), and IE_Exp_HTML_NavigationHelper::IE_Exp_HTML_NavigationHelper().
bool IE_TOCHelper::hasTOC | ( | ) | const |
bool IE_TOCHelper::isTOCStyle | ( | const char * | styleName, | |
int * | out_level = NULL | |||
) | const |
bool IE_TOCHelper::isTOCStyle | ( | const UT_UTF8String & | styleName, | |
int * | out_level = NULL | |||
) | const |
References _tocNameLevelHelper().
Referenced by TOC_Listener::populateStrux().
IE_TOCHelper& IE_TOCHelper::operator= | ( | const IE_TOCHelper & | rhs | ) | [private] |
friend class TOC_Listener [friend] |
PD_Document* IE_TOCHelper::mDoc [private] |
Referenced by _tocNameLevelHelper().
bool IE_TOCHelper::mDocHasTOC [private] |
Referenced by docHasTOC(), and TOC_Listener::populateStrux().
bool IE_TOCHelper::mHasTOC [private] |
Referenced by _defineTOC(), and hasTOC().
UT_GenericVector<int> IE_TOCHelper::mTOCLevels [private] |
Referenced by _defineTOC(), and getNthTOCEntry().
Referenced by _defineTOC(), and getNthTOCEntryPos().
UT_GenericVector<UT_UTF8String *> IE_TOCHelper::mTOCStrings [private] |
Referenced by _defineTOC(), getNthTOCEntry(), getNumTOCEntries(), and ~IE_TOCHelper().