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