• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ODe_Style_MasterPage.h

Go to the documentation of this file.
00001 /* AbiSource
00002  *
00003  * Copyright (C) 2005 INdT
00004  * Author: Daniel d'Andrada T. de Carvalho <daniel.carvalho@indt.org.br>
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00019  * 02110-1301 USA.
00020  */
00021 
00022 #ifndef _ODE_STYLE_MASTERPAGE_H_
00023 #define _ODE_STYLE_MASTERPAGE_H_
00024 
00025 // AbiWord includes
00026 #include <ut_string_class.h>
00027 
00028 // External includes
00029 #include <gsf/gsf-output.h>
00030 #include <stdio.h>
00031 
00032 // AbiWord classes
00033 class PP_AttrProp;
00034 
00038 class ODe_Style_MasterPage {
00039 public:
00040 
00041     ODe_Style_MasterPage (const gchar* pName, const gchar* pPageLayoutName);
00042 
00043     virtual ~ODe_Style_MasterPage();
00044 
00045     void fetchAttributesFromAbiSection(const PP_AttrProp* pAP);
00046 
00047     void setName(const UT_UTF8String& rName) {
00048         m_name = rName;
00049     }
00050 
00051     void setPageLayoutName(const UT_UTF8String& rPageLayoutName) {
00052         m_pageLayoutName = rPageLayoutName;
00053     }
00054 
00055     bool hasProperties() const {
00056         return !m_abiHeaderId.empty() ||
00057                !m_abiFooterId.empty();
00058     }
00059 
00060     // Write the <style:master-page> element.
00061     bool write(GsfOutput* pODT) const;
00062 
00063     GsfOutput* getHeaderContentTempFile() const {return m_pHeaderContentTemp;}
00064     GsfOutput* getHeaderEvenContentTempFile() const {return m_pHeaderEvenContentTemp;}
00065     GsfOutput* getFooterContentTempFile() const {return m_pFooterContentTemp;}
00066     GsfOutput* getFooterEvenContentTempFile() const {return m_pFooterEvenContentTemp;}
00067 
00068     const UT_UTF8String& getAbiHeaderId() const {return m_abiHeaderId;}
00069     const UT_UTF8String& getAbiHeaderEvenId() const {return m_abiHeaderEvenId;}
00070     const UT_UTF8String& getAbiFooterId() const {return m_abiFooterId;}
00071     const UT_UTF8String& getAbiFooterEvenId() const {return m_abiFooterEvenId;}
00072 
00073 private:
00074     UT_UTF8String m_name;           // style:name
00075     UT_UTF8String m_pageLayoutName; // style:page-layout-name
00076 
00077     // <section header="2" ... >
00078     UT_UTF8String m_abiHeaderId;
00079     // <section header-even="3" ... >
00080     UT_UTF8String m_abiHeaderEvenId;
00081 
00082     // <section footer="5" ... >
00083     UT_UTF8String m_abiFooterId;
00084     // <section footer-even="6" ... >
00085     UT_UTF8String m_abiFooterEvenId;
00086 
00087     // Temporary files that will hold header and footer content.
00088     GsfOutput* m_pHeaderContentTemp;
00089     GsfOutput* m_pHeaderEvenContentTemp;
00090     GsfOutput* m_pFooterContentTemp;
00091     GsfOutput* m_pFooterEvenContentTemp;
00092 };
00093 
00094 #endif //_ODE_STYLE_MASTERPAGE_H_

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1