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< MWAWHeaderFooter > | m_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

enum MWAWPageSpan::FormOrientation

the page orientation

Enumerator
PORTRAIT |
LANDSCAPE |

enum MWAWPageSpan::PageNumberPosition

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

returns the page length (form width without margin )

Referenced by MWAWParser::getPageLength(), MSK3Parser::getTextHeight(), MSK4Zone::getTextHeight(), WPParser::getTextHeight(), and CWParser::getTextHeight().

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

Referenced by MWAWContentListener::_openPageSpan(), MWParser::createDocument(), MRWParser::createDocument(), and getPageProperty().

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

set the background color

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

void MWAWPageSpan::setFormLength | ( | const double | formLength | ) |

inline

set the total page length

Referenced by MCDParser::createZones(), MWProParser::readDocHeader(), CWParser::readDocHeader(), MSW1Parser::readDocInfo(), FWParser::readDocInfo(), LWParser::readDocument(), MORParser::readDocumentInfo(), MSWParser::readDocumentInfo(), MSK4Zone::readDOP(), MSWParser::readHeaderEndV3(), EDParser::readInfo(), NSParser::readPageLimit(), WPParser::readPrintInfo(), MWParser::readPrintInfo(), ACParser::readPrintInfo(), LWParser::readPrintInfo(), MDWParser::readPrintInfo(), BWParser::readPrintInfo(), NSParser::readPrintInfo(), MORParser::readPrintInfo(), GWParser::readPrintInfo(), MSWParser::readPrintInfo(), MSK3Parser::readPrintInfo(), CWParser::readPrintInfo(), FWParser::readPrintInfo(), WNParser::readPrintInfo(), MWProParser::readPrintInfo(), HMWJParser::readPrintInfo(), MRWParser::readPrintInfo(), HMWKParser::readPrintInfo(), and MSK4Zone::readPRNT().

void MWAWPageSpan::setFormOrientation | ( | const FormOrientation | formOrientation | ) |

inline

set the form orientation

Referenced by MSK4Zone::readDOP(), MSWParser::readHeaderEndV3(), NSParser::readPageLimit(), MSWParser::readPrintInfo(), and MSK4Zone::readPRNT().

void MWAWPageSpan::setFormWidth | ( | const double | formWidth | ) |

inline

set the total page width

Referenced by MCDParser::createZones(), MWProParser::readDocHeader(), CWParser::readDocHeader(), MSW1Parser::readDocInfo(), FWParser::readDocInfo(), LWParser::readDocument(), MORParser::readDocumentInfo(), MSWParser::readDocumentInfo(), MSK4Zone::readDOP(), MSWParser::readHeaderEndV3(), EDParser::readInfo(), NSParser::readPageLimit(), WPParser::readPrintInfo(), MWParser::readPrintInfo(), ACParser::readPrintInfo(), LWParser::readPrintInfo(), MDWParser::readPrintInfo(), BWParser::readPrintInfo(), NSParser::readPrintInfo(), MORParser::readPrintInfo(), GWParser::readPrintInfo(), MSWParser::readPrintInfo(), MSK3Parser::readPrintInfo(), CWParser::readPrintInfo(), FWParser::readPrintInfo(), WNParser::readPrintInfo(), MWProParser::readPrintInfo(), HMWJParser::readPrintInfo(), MRWParser::readPrintInfo(), HMWKParser::readPrintInfo(), and MSK4Zone::readPRNT().

void MWAWPageSpan::setHeaderFooter | ( | MWAWHeaderFooter const & | headerFooter | ) |

add a header/footer on some page

Referenced by BWParser::createDocument(), MSW1Parser::createDocument(), ACParser::createDocument(), LWParser::createDocument(), MDWParser::createDocument(), NSParser::createDocument(), GWParser::createDocument(), MWParser::createDocument(), MSK3Parser::createDocument(), WPParser::createDocument(), WNParser::createDocument(), MWProParser::createDocument(), MORParser::createDocument(), CWParser::createDocument(), ZWParser::createDocument(), MSWParser::createDocument(), HMWJParser::createDocument(), MRWParser::createDocument(), HMWKParser::createDocument(), MSK4Zone::createListener(), and DMText::updatePageSpanList().

void MWAWPageSpan::setMarginBottom | ( | const double | marginBottom | ) |

inline

set the page bottom margin

Referenced by CWParser::createDocument(), HMWKParser::init(), MWProParser::readDocHeader(), CWParser::readDocHeader(), FWParser::readDocInfo(), GWParser::readDocInfo(), MRWParser::readDocInfo(), LWParser::readDocument(), MORParser::readDocumentInfo(), MSWParser::readDocumentInfo(), MSK4Zone::readDOP(), MSWParser::readHeaderEndV3(), BWParser::readLastZone(), NSParser::readPageLimit(), WPParser::readPrintInfo(), MWParser::readPrintInfo(), ACParser::readPrintInfo(), LWParser::readPrintInfo(), MDWParser::readPrintInfo(), BWParser::readPrintInfo(), NSParser::readPrintInfo(), MORParser::readPrintInfo(), GWParser::readPrintInfo(), ZWParser::readPrintInfo(), MSWParser::readPrintInfo(), MSK3Parser::readPrintInfo(), CWParser::readPrintInfo(), FWParser::readPrintInfo(), WNParser::readPrintInfo(), MWProParser::readPrintInfo(), HMWJParser::readPrintInfo(), MRWParser::readPrintInfo(), HMWKParser::readPrintInfo(), MSK4Zone::readPRNT(), and DMText::updatePageSpanList().

void MWAWPageSpan::setMarginLeft | ( | const double | marginLeft | ) |

inline

set the page left margin

Referenced by HMWKParser::init(), MWProParser::readDocHeader(), CWParser::readDocHeader(), MSW1Parser::readDocInfo(), FWParser::readDocInfo(), GWParser::readDocInfo(), MRWParser::readDocInfo(), LWParser::readDocument(), MORParser::readDocumentInfo(), MSWParser::readDocumentInfo(), MSK4Zone::readDOP(), MSWParser::readHeaderEndV3(), BWParser::readLastZone(), NSParser::readPageLimit(), WPParser::readPrintInfo(), MWParser::readPrintInfo(), ACParser::readPrintInfo(), LWParser::readPrintInfo(), MDWParser::readPrintInfo(), BWParser::readPrintInfo(), NSParser::readPrintInfo(), MORParser::readPrintInfo(), GWParser::readPrintInfo(), ZWParser::readPrintInfo(), MSWParser::readPrintInfo(), CWParser::readPrintInfo(), MSK3Parser::readPrintInfo(), FWParser::readPrintInfo(), WNParser::readPrintInfo(), MWProParser::readPrintInfo(), HMWJParser::readPrintInfo(), MRWParser::readPrintInfo(), HMWKParser::readPrintInfo(), MSK4Zone::readPRNT(), and DMText::updatePageSpanList().

void MWAWPageSpan::setMarginRight | ( | const double | marginRight | ) |

inline

set the page right margin

Referenced by CWParser::createDocument(), HMWKParser::init(), MWProParser::readDocHeader(), CWParser::readDocHeader(), FWParser::readDocInfo(), GWParser::readDocInfo(), MRWParser::readDocInfo(), LWParser::readDocument(), MORParser::readDocumentInfo(), MSWParser::readDocumentInfo(), MSK4Zone::readDOP(), MSWParser::readHeaderEndV3(), BWParser::readLastZone(), NSParser::readPageLimit(), WPParser::readPrintInfo(), MWParser::readPrintInfo(), ACParser::readPrintInfo(), LWParser::readPrintInfo(), MDWParser::readPrintInfo(), BWParser::readPrintInfo(), NSParser::readPrintInfo(), MORParser::readPrintInfo(), GWParser::readPrintInfo(), ZWParser::readPrintInfo(), MSWParser::readPrintInfo(), MSK3Parser::readPrintInfo(), CWParser::readPrintInfo(), FWParser::readPrintInfo(), WNParser::readPrintInfo(), MWProParser::readPrintInfo(), HMWJParser::readPrintInfo(), MRWParser::readPrintInfo(), HMWKParser::readPrintInfo(), MSK4Zone::readPRNT(), and DMText::updatePageSpanList().

void MWAWPageSpan::setMargins | ( | double | margin,
|  | int | wh = `libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit`
| ) |  |

inline

set all the margins

Referenced by EDParser::init(), MCDParser::init(), TTParser::init(), BWParser::init(), MSW1Parser::init(), ACParser::init(), MWParser::init(), LWParser::init(), NSParser::init(), MDWParser::init(), GWParser::init(), MSK3Parser::init(), WPParser::init(), FWParser::init(), WNParser::init(), MWProParser::init(), MORParser::init(), ZWParser::init(), CWParser::init(), MSWParser::init(), HMWJParser::init(), and MRWParser::init().

void MWAWPageSpan::setMarginTop | ( | const double | marginTop | ) |

inline

set the page top margin

Referenced by HMWKParser::init(), MWProParser::readDocHeader(), CWParser::readDocHeader(), MSW1Parser::readDocInfo(), FWParser::readDocInfo(), GWParser::readDocInfo(), MRWParser::readDocInfo(), LWParser::readDocument(), MORParser::readDocumentInfo(), MSWParser::readDocumentInfo(), MSK4Zone::readDOP(), MSWParser::readHeaderEndV3(), BWParser::readLastZone(), NSParser::readPageLimit(), WPParser::readPrintInfo(), MWParser::readPrintInfo(), ACParser::readPrintInfo(), LWParser::readPrintInfo(), MDWParser::readPrintInfo(), BWParser::readPrintInfo(), NSParser::readPrintInfo(), MORParser::readPrintInfo(), GWParser::readPrintInfo(), ZWParser::readPrintInfo(), MSWParser::readPrintInfo(), CWParser::readPrintInfo(), MSK3Parser::readPrintInfo(), FWParser::readPrintInfo(), WNParser::readPrintInfo(), MWProParser::readPrintInfo(), HMWJParser::readPrintInfo(), MRWParser::readPrintInfo(), HMWKParser::readPrintInfo(), MSK4Zone::readPRNT(), and DMText::updatePageSpanList().

void MWAWPageSpan::setPageNumber | ( | const int | pageNumber | ) |

inline

set the page number

Referenced by DMText::updatePageSpanList().

void MWAWPageSpan::setPageSpan | ( | const int | pageSpan | ) |

inline

set the page span ( default 1)

Referenced by EDParser::createDocument(), MCDParser::createDocument(), TTParser::createDocument(), MSW1Parser::createDocument(), BWParser::createDocument(), ACParser::createDocument(), LWParser::createDocument(), NSParser::createDocument(), MDWParser::createDocument(), GWParser::createDocument(), MWParser::createDocument(), MSK3Parser::createDocument(), WPParser::createDocument(), FWParser::createDocument(), WNParser::createDocument(), MWProParser::createDocument(), MORParser::createDocument(), ZWParser::createDocument(), CWParser::createDocument(), MSWParser::createDocument(), HMWJParser::createDocument(), MRWParser::createDocument(), HMWKParser::createDocument(), and MSK4Zone::createListener().

## 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

the form length

Referenced by checkMargins(), getFormLength(), getPageLength(), operator==(), and setFormLength().

FormOrientation MWAWPageSpan::m_formOrientation

private

the form orientation

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

double MWAWPageSpan::m_formWidth

private

the form width

Referenced by checkMargins(), getFormWidth(), getPageWidth(), operator==(), and setFormWidth().

std::vector<MWAWHeaderFooter> MWAWPageSpan::m_headerFooterList

private

the list of header

Referenced by containsHeaderFooter(), getHeaderFooterPosition(), operator==(), removeHeaderFooter(), sendHeaderFooters(), and setHeaderFooter().

double MWAWPageSpan::m_margins[4]

private

the margins: libmwaw::Left, ...

Referenced by checkMargins(), getMarginBottom(), getMarginLeft(), getMarginRight(), getMarginTop(), getPageLength(), getPageWidth(), MWAWPageSpan(), setMarginBottom(), setMarginLeft(), setMarginRight(), setMargins(), and setMarginTop().

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:

- MWAWPageSpan.hxx
- MWAWPageSpan.cxx