Public Member Functions | Private Member Functions | Private Attributes | Friends

OXML_Section Class Reference

#include <OXML_Section.h>

Inheritance diagram for OXML_Section:
OXML_ObjectWithAttrProp

List of all members.

Public Member Functions

 OXML_Section ()
 OXML_Section (const std::string &id)
virtual ~OXML_Section ()
const std::string & getId () const
OXML_SectionBreakType getBreakType () const
void setBreakType (OXML_SectionBreakType br)
const char * getHeaderId (OXML_HeaderFooterType type) const
const char * getFooterId (OXML_HeaderFooterType type) const
void setHeaderId (const char *id, OXML_HeaderFooterType type)
void setFooterId (const char *id, OXML_HeaderFooterType type)
bool operator== (const std::string &id)
OXML_SharedElement getElement (const std::string &id)
UT_Error appendElement (OXML_SharedElement obj)
void setChildren (OXML_ElementVector c)
UT_Error clearChildren ()
UT_Error serialize (IE_Exp_OpenXML *exporter)
 Writes the OpenXML section and all its content to a file on disk.
UT_Error serializeProperties (IE_Exp_OpenXML *exporter, OXML_Element_Paragraph *pParagraph)
void applyDocumentProperties ()
UT_Error serializeHeader (IE_Exp_OpenXML *exporter)
 Serialize the section as a header.
UT_Error serializeFooter (IE_Exp_OpenXML *exporter)
 Serialize the section as a footer.
UT_Error serializeFootnote (IE_Exp_OpenXML *exporter)
 Serialize the section as a footnote.
UT_Error serializeEndnote (IE_Exp_OpenXML *exporter)
 Serialize the section as a endnote.
UT_Error addToPT (PD_Document *pDocument)
 Appends this section and all its content to the Abiword Piecetable.
UT_Error addToPTAsHdrFtr (PD_Document *pDocument)
UT_Error addToPTAsFootnote (PD_Document *pDocument)
UT_Error addToPTAsEndnote (PD_Document *pDocument)
void setTarget (int target)
bool hasFirstPageHdrFtr () const
bool hasEvenPageHdrFtr () const
void setHandledHdrFtr (bool val)
bool getHandledHdrFtr () const
UT_Error setPageMargins (const std::string &top, const std::string &left, const std::string &right, const std::string &bottom)

Private Member Functions

UT_Error _setReferenceIds ()

Private Attributes

std::string m_id
OXML_SectionBreakType m_breakType
OXML_ElementVector m_children
OXML_Element_Paragraphm_lastParagraph
char * m_headerIds [3]
char * m_footerIds [3]
int m_target
bool m_handledHdrFtr

Friends

bool operator== (const OXML_SharedSection &lhs, const std::string &id)

Constructor & Destructor Documentation

OXML_Section::OXML_Section (  ) 

References m_children, m_footerIds, and m_headerIds.

OXML_Section::OXML_Section ( const std::string &  id  ) 

References m_children, m_footerIds, and m_headerIds.

OXML_Section::~OXML_Section (  )  [virtual]

Member Function Documentation

UT_Error OXML_Section::addToPT ( PD_Document pDocument  ) 

Appends this section and all its content to the Abiword Piecetable.

This method is used during the import process.

Parameters:
pDocument A valid reference to the PD_Document object.

References _setReferenceIds(), PD_Document::appendSpan(), PD_Document::appendStrux(), EVENPAGE_BREAK, gchar, OXML_ObjectWithAttrProp::getAttributesWithProps(), m_breakType, m_children, NEXTPAGE_BREAK, ODDPAGE_BREAK, PTX_Section, UT_OK, and UT_return_val_if_fail.

UT_Error OXML_Section::appendElement ( OXML_SharedElement  obj  ) 
UT_Error OXML_Section::clearChildren (  ) 

References m_children, and UT_OK.

Referenced by ~OXML_Section().

OXML_SectionBreakType OXML_Section::getBreakType (  )  const [inline]

References m_breakType.

OXML_SharedElement OXML_Section::getElement ( const std::string &  id  ) 

References m_children.

const char* OXML_Section::getFooterId ( OXML_HeaderFooterType  type  )  const [inline]

References m_footerIds.

bool OXML_Section::getHandledHdrFtr (  )  const [inline]

References m_handledHdrFtr.

const char* OXML_Section::getHeaderId ( OXML_HeaderFooterType  type  )  const [inline]

References m_headerIds.

const std::string& OXML_Section::getId (  )  const [inline]

References m_id.

bool OXML_Section::hasEvenPageHdrFtr (  )  const
bool OXML_Section::hasFirstPageHdrFtr (  )  const
bool OXML_Section::operator== ( const std::string &  id  ) 

References m_id.

UT_Error OXML_Section::serialize ( IE_Exp_OpenXML exporter  ) 

Writes the OpenXML section and all its content to a file on disk.

This method is used during the export process.

Parameters:
exporter the actual exporter which handles writing the files.

References applyDocumentProperties(), OXML_Document::getInstance(), OXML_Document::getLastSection(), m_children, m_lastParagraph, and UT_OK.

UT_Error OXML_Section::serializeEndnote ( IE_Exp_OpenXML exporter  ) 
UT_Error OXML_Section::serializeFootnote ( IE_Exp_OpenXML exporter  ) 
void OXML_Section::setBreakType ( OXML_SectionBreakType  br  )  [inline]

References m_breakType.

void OXML_Section::setChildren ( OXML_ElementVector  c  )  [inline]

References m_children.

void OXML_Section::setFooterId ( const char *  id,
OXML_HeaderFooterType  type 
) [inline]

References m_footerIds.

void OXML_Section::setHandledHdrFtr ( bool  val  )  [inline]

References m_handledHdrFtr.

void OXML_Section::setHeaderId ( const char *  id,
OXML_HeaderFooterType  type 
) [inline]

References m_headerIds.

UT_Error OXML_Section::setPageMargins ( const std::string &  top,
const std::string &  left,
const std::string &  right,
const std::string &  bottom 
)
void OXML_Section::setTarget ( int  target  ) 

Friends And Related Function Documentation

bool operator== ( const OXML_SharedSection lhs,
const std::string &  id 
) [friend]

Member Data Documentation

std::string OXML_Section::m_id [private]

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