Public Member Functions | Private Attributes

ODe_HeadingStyles Class Reference

All paragraph styles used to define the chapter levels of a document are called heading styles. More...

#include <ODe_AuxiliaryData.h>

List of all members.

Public Member Functions

virtual ~ODe_HeadingStyles ()
UT_uint8 getHeadingOutlineLevel (const UT_UTF8String &rStyleName) const
 Given a paragraph style name, this method returns its outline level.
void addStyleName (const gchar *pStyleName, UT_uint8 outlineLevel)

Private Attributes

UT_GenericVector< UT_UTF8String * > m_styleNames
UT_GenericVector< UT_uint8m_outlineLevels

Detailed Description

All paragraph styles used to define the chapter levels of a document are called heading styles.

Paragraphs that uses heading styles are the ones that appears on a table of contents.

This class stores the name and the respective outline level of all those styles. It's necessary to do this because, in an OpenDocument document, a standard paragraph is <text:p [...]>, but a heading paragraph is a <text:h text:outline-level="x" [...]>

So, when translating an AbiWord paragraph, we must know wheter it will map into an OpenDocument <text:p> or into a <text:h>.


Constructor & Destructor Documentation

ODe_HeadingStyles::~ODe_HeadingStyles (  )  [virtual]

References m_styleNames, and UT_VECTOR_PURGEALL.


Member Function Documentation

void ODe_HeadingStyles::addStyleName ( const gchar *  pStyleName,
UT_uint8  outlineLevel 
)
UT_uint8 ODe_HeadingStyles::getHeadingOutlineLevel ( const UT_UTF8String rStyleName  )  const

Given a paragraph style name, this method returns its outline level.

0 (zero) is returned it the style name is not used by heading paragraphs.

References UT_GenericVector< T >::getItemCount(), m_outlineLevels, m_styleNames, and UT_ASSERT.

Referenced by ODe_TOC_Listener::openBlock().


Member Data Documentation


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