MWAWPageSpan Class Reference

A class which defines the page properties. More...

#include <MWAWPageSpan.hxx>

Public Types

enum  FormOrientation { PORTRAIT, LANDSCAPE }
 the page orientation More...
 
enum  PageNumberPosition {
  None = 0, TopLeft, TopCenter, TopRight,
  BottomLeft, BottomCenter, BottomRight
}
 a fixed page number position More...
 

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...
 
double getPageLength () const
 returns the page length (form width without margin ) More...
 
double getPageWidth () const
 returns the page width (form width without margin ) More...
 
MWAWColor backgroundColor () const
 returns the background color More...
 
int getPageNumber () const
 
int getPageSpan () const
 
void setHeaderFooter (MWAWHeaderFooter const &headerFooter)
 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 setMargins (double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
 set all the margins 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 setPageNumber (const int pageNumber)
 set the page number More...
 
void setPageSpan (const int pageSpan)
 set the page span ( default 1) More...
 
bool operator== (shared_ptr< MWAWPageSpan > const &pageSpan) const
 operator== More...
 
bool operator!= (shared_ptr< MWAWPageSpan > const &pageSpan) const
 operator!= More...
 

Protected Member Functions

void getPageProperty (WPXPropertyList &pList) const
 add the page properties in pList More...
 
void sendHeaderFooters (MWAWContentListener *listener) const
 send the page's headers/footers if some exists More...
 
int getHeaderFooterPosition (MWAWHeaderFooter::Type type, MWAWHeaderFooter::Occurence occurence)
 return the header footer positions in m_headerFooterList More...
 
void removeHeaderFooter (MWAWHeaderFooter::Type type, MWAWHeaderFooter::Occurence occurence)
 remove a header footer More...
 
bool containsHeaderFooter (MWAWHeaderFooter::Type type, MWAWHeaderFooter::Occurence occurence)
 return true if we have a header footer in this position More...
 

Private Attributes

double m_formLength
 the form length More...
 
double m_formWidth
 the form width More...
 
FormOrientation m_formOrientation
 the form orientation More...
 
double m_margins [4]
 the margins: libmwaw::Left, ... More...
 
MWAWColor m_backgroundColor
 the page background color: default white More...
 
int m_pageNumber
 the page number ( or -1) More...
 
std::vector< MWAWHeaderFooterm_headerFooterList
 the list of header More...
 
int m_pageSpan
 the number of page More...
 

Friends

class MWAWContentListener
 

Detailed Description

A class which defines the page properties.

Member Enumeration Documentation

the page orientation

Enumerator
PORTRAIT 
LANDSCAPE 

a fixed page number position

Enumerator
None 
TopLeft 
TopCenter 
TopRight 
BottomLeft 
BottomCenter 
BottomRight 

Constructor & Destructor Documentation

MWAWPageSpan::MWAWPageSpan ( )

constructor

MWAWPageSpan::~MWAWPageSpan ( )
virtual

destructor

Member Function Documentation

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().

bool MWAWPageSpan::containsHeaderFooter ( MWAWHeaderFooter::Type  type,
MWAWHeaderFooter::Occurence  occurence 
)
protected

return true if we have a header footer in this position

Referenced by setHeaderFooter().

double MWAWPageSpan::getFormLength ( ) const
inline

returns the page length

Referenced by MWAWParser::getFormLength(), and getPageProperty().

FormOrientation MWAWPageSpan::getFormOrientation ( ) const
inline

returns the page orientation

Referenced by getPageProperty().

double MWAWPageSpan::getFormWidth ( ) const
inline

returns the page width

Referenced by MWAWParser::getFormWidth(), and getPageProperty().

int MWAWPageSpan::getHeaderFooterPosition ( MWAWHeaderFooter::Type  type,
MWAWHeaderFooter::Occurence  occurence 
)
protected

return the header footer positions in m_headerFooterList

Referenced by containsHeaderFooter(), removeHeaderFooter(), and setHeaderFooter().

double MWAWPageSpan::getMarginBottom ( ) const
inline

returns the bottom margin

Referenced by CWParser::createDocument(), getPageProperty(), and operator==().

double MWAWPageSpan::getMarginLeft ( ) const
inline

returns the left margin

Referenced by getPageProperty(), WPParser::getParagraph(), and operator==().

double MWAWPageSpan::getMarginRight ( ) const
inline

returns the right margin

Referenced by CWParser::createDocument(), getPageProperty(), and operator==().

double MWAWPageSpan::getMarginTop ( ) const
inline

returns the top margin

Referenced by getPageProperty(), and operator==().

double MWAWPageSpan::getPageLength ( ) const
inline
int MWAWPageSpan::getPageNumber ( ) const
inline

Referenced by operator==().

void MWAWPageSpan::getPageProperty ( WPXPropertyList &  pList) const
protected

add the page properties in pList

Referenced by MWAWContentListener::_openPageSpan().

int MWAWPageSpan::getPageSpan ( ) const
inline
double MWAWPageSpan::getPageWidth ( ) const
inline

returns the page width (form width without margin )

Referenced by MWAWParser::getPageWidth().

bool MWAWPageSpan::operator!= ( shared_ptr< MWAWPageSpan > const &  pageSpan) const
inline

operator!=

bool MWAWPageSpan::operator== ( shared_ptr< MWAWPageSpan > const &  pageSpan) const

operator==

Referenced by operator!=().

void MWAWPageSpan::removeHeaderFooter ( MWAWHeaderFooter::Type  type,
MWAWHeaderFooter::Occurence  occurence 
)
protected

remove a header footer

Referenced by setHeaderFooter().

void MWAWPageSpan::sendHeaderFooters ( MWAWContentListener listener) const
protected

send the page's headers/footers if some exists

Referenced by MWAWContentListener::_openPageSpan().

void MWAWPageSpan::setBackgroundColor ( MWAWColor  color = MWAWColor::white())
inline
void MWAWPageSpan::setFormOrientation ( const FormOrientation  formOrientation)
inline
void MWAWPageSpan::setPageNumber ( const int  pageNumber)
inline

set the page number

Referenced by DMText::updatePageSpanList().

Friends And Related Function Documentation

friend class MWAWContentListener
friend

Member Data Documentation

MWAWColor MWAWPageSpan::m_backgroundColor
private

the page background color: default white

Referenced by backgroundColor(), getPageProperty(), and setBackgroundColor().

double MWAWPageSpan::m_formLength
private
FormOrientation MWAWPageSpan::m_formOrientation
private

the form orientation

Referenced by getFormOrientation(), operator==(), and setFormOrientation().

double MWAWPageSpan::m_formWidth
private
std::vector<MWAWHeaderFooter> MWAWPageSpan::m_headerFooterList
private
int MWAWPageSpan::m_pageNumber
private

the page number ( or -1)

Referenced by getPageNumber(), and setPageNumber().

int MWAWPageSpan::m_pageSpan
private

the number of page

Referenced by getPageSpan(), and setPageSpan().


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

Generated on Tue Mar 10 2015 17:32:10 for libmwaw by doxygen 1.8.5