MWAWPageSpan Class Reference

A structure used to defined the page properties. More...

#include <MWAWPageSpan.hxx>

Public Types

enum  FormOrientation { PORTRAIT, LANDSCAPE }
 
enum  HeaderFooterType { HEADER, FOOTER }
 
enum  HeaderFooterOccurence { ODD, EVEN, ALL, NEVER }
 
enum  PageNumberPosition {
  None = 0, TopLeft, TopCenter, TopRight,
  TopLeftAndRight, TopInsideLeftAndRight, BottomLeft, BottomCenter,
  BottomRight, BottomLeftAndRight, BottomInsideLeftAndRight
}
 

Public Member Functions

 MWAWPageSpan ()
 constructor More...
 
virtual ~MWAWPageSpan ()
 destructor More...
 
double getFormLength () const
 returns the page length More...
 
double getFormWidth () const
 returns the page width More...
 
FormOrientation getFormOrientation () const
 returns the page orientation More...
 
double getMarginLeft () const
 returns the left margin More...
 
double getMarginRight () const
 returns the right margin More...
 
double getMarginTop () const
 returns the top margin More...
 
double getMarginBottom () const
 returns the bottom margin More...
 
MWAWColor backgroundColor () const
 returns the background color More...
 
PageNumberPosition getPageNumberPosition () const
 
int getPageNumber () const
 
libmwaw::NumberingType getPageNumberingType () const
 
double getPageNumberingFontSize () const
 
WPXString getPageNumberingFontName () const
 
int getPageSpan () const
 
const std::vector
< MWAWPageSpanInternal::HeaderFooterPtr > & 
getHeaderFooterList () const
 
void setHeaderFooter (const HeaderFooterType type, const HeaderFooterOccurence occurence, MWAWSubDocumentPtr &subDocument)
 add a header/footer on some page More...
 
void setFormLength (const double formLength)
 set the total page length More...
 
void setFormWidth (const double formWidth)
 set the total page width More...
 
void setFormOrientation (const FormOrientation formOrientation)
 set the form orientation More...
 
void setMarginLeft (const double marginLeft)
 set the page left margin More...
 
void setMarginRight (const double marginRight)
 set the page right margin More...
 
void setMarginTop (const double marginTop)
 set the page top margin More...
 
void setMarginBottom (const double marginBottom)
 set the page bottom margin More...
 
void checkMargins ()
 check if the page margins are consistent with the page dimension, if not update them More...
 
void setBackgroundColor (MWAWColor color=MWAWColor::white())
 set the background color More...
 
void setPageNumberPosition (const PageNumberPosition pageNumberPosition)
 
void setPageNumber (const int pageNumber)
 
void setPageNumberingType (const libmwaw::NumberingType pageNumberingType)
 
void setPageNumberingFontSize (const double pageNumberingFontSize)
 
void setPageNumberingFontName (const WPXString &pageNumberingFontName)
 
void setPageSpan (const int pageSpan)
 
bool operator== (shared_ptr< MWAWPageSpan > const &pageSpan) const
 
bool operator!= (shared_ptr< MWAWPageSpan > const &pageSpan) const
 

Protected Member Functions

void getPageProperty (WPXPropertyList &pList) const
 
void sendHeaderFooters (MWAWContentListener *listener, WPXDocumentInterface *documentInterface)
 
int _getHeaderFooterPosition (HeaderFooterType type, HeaderFooterOccurence occurence)
 
void _setHeaderFooter (HeaderFooterType type, HeaderFooterOccurence occurence, MWAWSubDocumentPtr &doc)
 
void _removeHeaderFooter (HeaderFooterType type, HeaderFooterOccurence occurence)
 
bool _containsHeaderFooter (HeaderFooterType type, HeaderFooterOccurence occurence)
 
void _insertPageNumberParagraph (WPXDocumentInterface *documentInterface)
 

Private Attributes

double m_formLength
 
double m_formWidth
 
FormOrientation m_formOrientation
 
double m_marginLeft
 
double m_marginRight
 
double m_marginTop
 
double m_marginBottom
 
MWAWColor m_backgroundColor
 
PageNumberPosition m_pageNumberPosition
 
int m_pageNumber
 
libmwaw::NumberingType m_pageNumberingType
 
WPXString m_pageNumberingFontName
 
double m_pageNumberingFontSize
 
std::vector
< MWAWPageSpanInternal::HeaderFooterPtr
m_headerFooterList
 
int m_pageSpan
 

Friends

class MWAWContentListener
 

Detailed Description

A structure used to defined the page properties.

Member Enumeration Documentation

Enumerator
PORTRAIT 
LANDSCAPE 
Enumerator
ODD 
EVEN 
ALL 
NEVER 
Enumerator
HEADER 
FOOTER 
Enumerator
None 
TopLeft 
TopCenter 
TopRight 
TopLeftAndRight 
TopInsideLeftAndRight 
BottomLeft 
BottomCenter 
BottomRight 
BottomLeftAndRight 
BottomInsideLeftAndRight 

Constructor & Destructor Documentation

MWAWPageSpan::MWAWPageSpan ( )

constructor

MWAWPageSpan::~MWAWPageSpan ( )
virtual

destructor

Member Function Documentation

bool MWAWPageSpan::_containsHeaderFooter ( HeaderFooterType  type,
HeaderFooterOccurence  occurence 
)
protected

Referenced by setHeaderFooter().

int MWAWPageSpan::_getHeaderFooterPosition ( HeaderFooterType  type,
HeaderFooterOccurence  occurence 
)
protected
void MWAWPageSpan::_insertPageNumberParagraph ( WPXDocumentInterface *  documentInterface)
protected

Referenced by sendHeaderFooters().

void MWAWPageSpan::_removeHeaderFooter ( HeaderFooterType  type,
HeaderFooterOccurence  occurence 
)
protected

Referenced by setHeaderFooter().

void MWAWPageSpan::_setHeaderFooter ( HeaderFooterType  type,
HeaderFooterOccurence  occurence,
MWAWSubDocumentPtr doc 
)
protected

Referenced by setHeaderFooter().

MWAWColor MWAWPageSpan::backgroundColor ( ) const
inline

returns the background color

Referenced by operator==().

void MWAWPageSpan::checkMargins ( )

check if the page margins are consistent with the page dimension, if not update them

Referenced by MRWParser::readPrintInfo().

FormOrientation MWAWPageSpan::getFormOrientation ( ) const
inline

returns the page orientation

Referenced by MWAWContentListener::_openPageSpan(), and getPageProperty().

const std::vector<MWAWPageSpanInternal::HeaderFooterPtr>& MWAWPageSpan::getHeaderFooterList ( ) const
inline
int MWAWPageSpan::getPageNumber ( ) const
inline
WPXString MWAWPageSpan::getPageNumberingFontName ( ) const
inline

Referenced by operator==().

double MWAWPageSpan::getPageNumberingFontSize ( ) const
inline

Referenced by operator==().

libmwaw::NumberingType MWAWPageSpan::getPageNumberingType ( ) const
inline

Referenced by operator==().

PageNumberPosition MWAWPageSpan::getPageNumberPosition ( ) const
inline

Referenced by operator==().

void MWAWPageSpan::getPageProperty ( WPXPropertyList &  pList) const
protected
int MWAWPageSpan::getPageSpan ( ) const
inline
bool MWAWPageSpan::operator!= ( shared_ptr< MWAWPageSpan > const &  pageSpan) const
inline
bool MWAWPageSpan::operator== ( shared_ptr< MWAWPageSpan > const &  pageSpan) const

Referenced by operator!=().

void MWAWPageSpan::sendHeaderFooters ( MWAWContentListener listener,
WPXDocumentInterface *  documentInterface 
)
protected
void MWAWPageSpan::setBackgroundColor ( MWAWColor  color = MWAWColor::white())
inline

set the background color

Referenced by MRWParser::createDocument(), and DMText::updatePageSpanList().

void MWAWPageSpan::setFormOrientation ( const FormOrientation  formOrientation)
inline
void MWAWPageSpan::setPageNumber ( const int  pageNumber)
inline
void MWAWPageSpan::setPageNumberingFontName ( const WPXString &  pageNumberingFontName)
inline
void MWAWPageSpan::setPageNumberingFontSize ( const double  pageNumberingFontSize)
inline
void MWAWPageSpan::setPageNumberingType ( const libmwaw::NumberingType  pageNumberingType)
inline
void MWAWPageSpan::setPageNumberPosition ( const PageNumberPosition  pageNumberPosition)
inline
void MWAWPageSpan::setPageSpan ( const int  pageSpan)
inline

Friends And Related Function Documentation

friend class MWAWContentListener
friend

Member Data Documentation

MWAWColor MWAWPageSpan::m_backgroundColor
private
double MWAWPageSpan::m_formLength
private
FormOrientation MWAWPageSpan::m_formOrientation
private
double MWAWPageSpan::m_formWidth
private
double MWAWPageSpan::m_marginBottom
private
double MWAWPageSpan::m_marginLeft
private
double MWAWPageSpan::m_marginRight
private
double MWAWPageSpan::m_marginTop
private
int MWAWPageSpan::m_pageNumber
private

Referenced by getPageNumber(), and setPageNumber().

WPXString MWAWPageSpan::m_pageNumberingFontName
private
double MWAWPageSpan::m_pageNumberingFontSize
private
libmwaw::NumberingType MWAWPageSpan::m_pageNumberingType
private
int MWAWPageSpan::m_pageSpan
private

Referenced by getPageSpan(), and setPageSpan().


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

Generated on Sat May 4 2013 20:11:11 for libmwaw by doxygen 1.8.3.1