PageSpan.h
1/* PageSpan: Stores (and writes) page-based information (e.g.: margins,
2 * headers/footers)
3 *
4 * Copyright (C) 2002-2004 William Lachance (william.lachance@sympatico.ca)
5 *
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.
10 *
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.
15 *
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., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20 *
21 * For further information visit http://libwpd.sourceforge.net
22 *
23 */
24
25/* "This product is not manufactured, approved, or supported by
26 * Corel Corporation or Corel Corporation Limited."
27 */
28#ifndef _PAGESPAN_H
29#define _PAGESPAN_H
30#include <libwpd/libwpd.h>
31#include <vector>
32#include "shared_headers.h"
33
34class DocumentElement;
35class DocumentHandler;
36
37class PageSpan
38{
39public:
40 PageSpan(const _SH_PropertyList &xPropList);
41 virtual ~PageSpan();
42 void writePageMaster(const int iNum, DocumentHandler &xHandler) const;
43 void writeMasterPages(const int iStartingNum, const int iPageMasterNum, const bool bLastPageSpan, DocumentHandler &xHandler) const;
44 int getSpan() const;
45#if 0
46 float getFormLength() { return mfFormLength; }
47 float getFormWidth() { return mfFormWidth; }
48 WPXFormQt::Orientation getFormQt::Orientation() { return mfFormQt::Orientation; }
49#endif
50 float getMarginLeft() const;
51 float getMarginRight() const;
52
53 const std::vector<DocumentElement *> * getHeaderContent() const { return mpHeaderContent; }
54 void setHeaderContent(std::vector<DocumentElement *> * pHeaderContent) { mpHeaderContent = pHeaderContent; }
55 void setFooterContent(std::vector<DocumentElement *> * pFooterContent) { mpFooterContent = pFooterContent; }
56 void setHeaderLeftContent(std::vector<DocumentElement *> * pHeaderContent) { mpHeaderLeftContent = pHeaderContent; }
57 void setFooterLeftContent(std::vector<DocumentElement *> * pFooterContent) { mpFooterLeftContent = pFooterContent; }
58protected:
59 void _writeHeaderFooter(const char *headerFooterTagName, const std::vector<DocumentElement *> & headerFooterContent,
60 DocumentHandler &xHandler) const;
61private:
62 _SH_PropertyList mxPropList;
63 std::vector<DocumentElement *> * mpHeaderContent;
64 std::vector<DocumentElement *> * mpFooterContent;
65 std::vector<DocumentElement *> * mpHeaderLeftContent;
66 std::vector<DocumentElement *> * mpFooterLeftContent;
67};
68#endif