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

ODi_TableOfContent_ListenerState.h

Go to the documentation of this file.
00001 /* AbiSource
00002  *
00003  * Copyright (C) 2005 Daniel d'Andrada T. de Carvalho
00004  * <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 _ODI_TABLEOFCONTENT_LISTENERSTATE_H_
00023 #define _ODI_TABLEOFCONTENT_LISTENERSTATE_H_
00024 
00025 // Internal includes
00026 #include "ODi_ListenerState.h"
00027 
00028 // Internal classes
00029 class ODi_Office_Styles;
00030 
00031 // AbiWord classes
00032 class pf_Frag_Strux;
00033 class PD_Document;
00034 
00038 class ODi_TableOfContent_ListenerState : public ODi_ListenerState {
00039 
00040 public:
00041 
00042     ODi_TableOfContent_ListenerState (
00043         PD_Document* pDocument,
00044         ODi_Office_Styles* pStyles,
00045         ODi_ElementStack& rElementStack);
00046 
00047     virtual ~ODi_TableOfContent_ListenerState() {}
00048 
00049     void startElement (const gchar* pName, const gchar** ppAtts,
00050                        ODi_ListenerStateAction& rAction);
00051 
00052     void endElement (const gchar* pName, ODi_ListenerStateAction& rAction);
00053 
00054     void charData (const gchar* pBuffer, int length);
00055 
00056     pf_Frag_Strux* getTOCStrux() {return m_pTOCStrux;}
00057     const UT_UTF8String& getProps() const {return props;}
00058 
00059 private:
00060 
00061     PD_Document* m_pAbiDocument;
00062     ODi_Office_Styles* m_pStyles;
00063 
00064     pf_Frag_Strux* m_pTOCStrux;
00065 
00066     // The properties for the corresponding AbiWord <toc> strux.
00067     UT_UTF8String props;
00068 
00069     // Buffer that stores character data defined between start and end element
00070     // tags. e.g.: <bla>some char data</bla>
00071     UT_UTF8String m_charData;
00072     bool m_acceptingText;
00073 };
00074 
00075 #endif //_ODI_TABLEOFCONTENT_LISTENERSTATE_H_

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1