1*b1cdbd2cSJim Jagielski /* PageSpan: Stores (and writes) page-based information (e.g.: margins,
2*b1cdbd2cSJim Jagielski  * headers/footers)
3*b1cdbd2cSJim Jagielski  *
4*b1cdbd2cSJim Jagielski  * Copyright (C) 2002-2004 William Lachance (william.lachance@sympatico.ca)
5*b1cdbd2cSJim Jagielski  *
6*b1cdbd2cSJim Jagielski  * This program is free software; you can redistribute it and/or
7*b1cdbd2cSJim Jagielski  * modify it under the terms of the GNU Lesser General Public
8*b1cdbd2cSJim Jagielski  * License as published by the Free Software Foundation; either
9*b1cdbd2cSJim Jagielski  * version 2 of the License, or (at your option) any later version.
10*b1cdbd2cSJim Jagielski  *
11*b1cdbd2cSJim Jagielski  * This program is distributed in the hope that it will be useful,
12*b1cdbd2cSJim Jagielski  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13*b1cdbd2cSJim Jagielski  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14*b1cdbd2cSJim Jagielski  * Library General Public License for more details.
15*b1cdbd2cSJim Jagielski  *
16*b1cdbd2cSJim Jagielski  * You should have received a copy of the GNU Library General Public
17*b1cdbd2cSJim Jagielski  * License along with this library; if not, write to the Free Software
18*b1cdbd2cSJim Jagielski  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19*b1cdbd2cSJim Jagielski  *
20*b1cdbd2cSJim Jagielski  * For further information visit http://libwpd.sourceforge.net
21*b1cdbd2cSJim Jagielski  *
22*b1cdbd2cSJim Jagielski  */
23*b1cdbd2cSJim Jagielski 
24*b1cdbd2cSJim Jagielski /* "This product is not manufactured, approved, or supported by
25*b1cdbd2cSJim Jagielski  * Corel Corporation or Corel Corporation Limited."
26*b1cdbd2cSJim Jagielski  */
27*b1cdbd2cSJim Jagielski #ifndef _PAGESPAN_H
28*b1cdbd2cSJim Jagielski #define _PAGESPAN_H
29*b1cdbd2cSJim Jagielski #if defined _MSC_VER
30*b1cdbd2cSJim Jagielski #pragma warning( push, 1 )
31*b1cdbd2cSJim Jagielski #endif
32*b1cdbd2cSJim Jagielski #include <libwpd/libwpd.h>
33*b1cdbd2cSJim Jagielski #if defined _MSC_VER
34*b1cdbd2cSJim Jagielski #pragma warning( pop )
35*b1cdbd2cSJim Jagielski #endif
36*b1cdbd2cSJim Jagielski #include <vector>
37*b1cdbd2cSJim Jagielski 
38*b1cdbd2cSJim Jagielski class DocumentElement;
39*b1cdbd2cSJim Jagielski class DocumentHandler;
40*b1cdbd2cSJim Jagielski 
41*b1cdbd2cSJim Jagielski class PageSpan
42*b1cdbd2cSJim Jagielski {
43*b1cdbd2cSJim Jagielski public:
44*b1cdbd2cSJim Jagielski 	PageSpan(const WPXPropertyList &xPropList);
45*b1cdbd2cSJim Jagielski 	virtual ~PageSpan();
46*b1cdbd2cSJim Jagielski 	void writePageMaster(const int iNum, DocumentHandler *pHandler) const;
47*b1cdbd2cSJim Jagielski 	void writeMasterPages(const int iStartingNum, const int iPageMasterNum, const bool bLastPageSpan, DocumentHandler *pHandler) const;
48*b1cdbd2cSJim Jagielski 	int getSpan() const;
49*b1cdbd2cSJim Jagielski 
getHeaderContent() const50*b1cdbd2cSJim Jagielski 	const std::vector<DocumentElement *> * getHeaderContent() const { return mpHeaderContent; }
setHeaderContent(std::vector<DocumentElement * > * pHeaderContent)51*b1cdbd2cSJim Jagielski 	void setHeaderContent(std::vector<DocumentElement *> * pHeaderContent) { mpHeaderContent = pHeaderContent; }
setFooterContent(std::vector<DocumentElement * > * pFooterContent)52*b1cdbd2cSJim Jagielski 	void setFooterContent(std::vector<DocumentElement *> * pFooterContent) { mpFooterContent = pFooterContent; }
setHeaderLeftContent(std::vector<DocumentElement * > * pHeaderContent)53*b1cdbd2cSJim Jagielski 	void setHeaderLeftContent(std::vector<DocumentElement *> * pHeaderContent) { mpHeaderLeftContent = pHeaderContent; }
setFooterLeftContent(std::vector<DocumentElement * > * pFooterContent)54*b1cdbd2cSJim Jagielski 	void setFooterLeftContent(std::vector<DocumentElement *> * pFooterContent) { mpFooterLeftContent = pFooterContent; }
55*b1cdbd2cSJim Jagielski protected:
56*b1cdbd2cSJim Jagielski 	void _writeHeaderFooter(const char *headerFooterTagName, const std::vector<DocumentElement *> & headerFooterContent,
57*b1cdbd2cSJim Jagielski 				DocumentHandler *pHandler) const;
58*b1cdbd2cSJim Jagielski private:
59*b1cdbd2cSJim Jagielski         WPXPropertyList mxPropList;
60*b1cdbd2cSJim Jagielski 	std::vector<DocumentElement *> * mpHeaderContent;
61*b1cdbd2cSJim Jagielski 	std::vector<DocumentElement *> * mpFooterContent;
62*b1cdbd2cSJim Jagielski 	std::vector<DocumentElement *> * mpHeaderLeftContent;
63*b1cdbd2cSJim Jagielski 	std::vector<DocumentElement *> * mpFooterLeftContent;
64*b1cdbd2cSJim Jagielski };
65*b1cdbd2cSJim Jagielski #endif
66