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

ODi_Table_ListenerState.h

Go to the documentation of this file.
00001 /* AbiSource
00002  *
00003  * Copyright (C) 2002 Dom Lachowicz <cinamod@hotmail.com>
00004  * Copyright (C) 2004 Robert Staudinger <robsta@stereolyzer.net>
00005  * Copyright (C) 2005 Daniel d'Andrada T. de Carvalho
00006  * <daniel.carvalho@indt.org.br>
00007  *
00008  * This program is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU General Public License
00010  * as published by the Free Software Foundation; either version 2
00011  * of the License, or (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00021  * 02110-1301 USA.
00022  */
00023 
00024 #ifndef _ODI_TABLE_LISTENERSTATE_H_
00025 #define _ODI_TABLE_LISTENERSTATE_H_
00026 
00027 // Internal includes
00028 #include "ODi_ListenerState.h"
00029 
00030 // AbiWord includes
00031 #include <ut_types.h>
00032 
00033 // Internal classes
00034 class ODi_Office_Styles;
00035 
00036 // AbiWord classes
00037 class PD_Document;
00038 
00039 
00052 class ODi_Table_ListenerState : public ODi_ListenerState {
00053 
00054 public:
00055 
00056     ODi_Table_ListenerState (PD_Document* pDocument,
00057                             ODi_Office_Styles* pStyles,
00058                             ODi_ElementStack& rElementStack);
00059 
00060     virtual ~ODi_Table_ListenerState() {}
00061 
00062     void startElement (const gchar* pName, const gchar** ppAtts,
00063                        ODi_ListenerStateAction& rAction);
00064 
00065     void endElement (const gchar* pName, ODi_ListenerStateAction& rAction);
00066 
00067     void charData (const gchar* /*pBuffer*/, int /*length*/) {}
00068 
00069 private:
00070 
00071     void _parseTableStart(const gchar** ppAtts,
00072                           ODi_ListenerStateAction& rAction);
00073 
00074     void _parseColumnStart(const gchar** ppAtts,
00075                            ODi_ListenerStateAction& rAction);
00076 
00077     void _parseRowStart(const gchar** ppAtts,
00078                            ODi_ListenerStateAction& rAction);
00079 
00080     void _parseCellStart(const gchar** ppAtts,
00081                          ODi_ListenerStateAction& rAction);
00082 
00083     bool m_onContentStream;
00084 
00085     bool m_onFirstPass;
00086     UT_sint16 m_elementLevel;
00087 
00088     PD_Document* m_pAbiDocument;
00089     ODi_Office_Styles* m_pStyles;
00090 
00091     UT_sint16 m_row;
00092     UT_sint16 m_col;
00093 
00094     UT_sint32 m_rowsLeftToRepeat;
00095 
00096     std::string m_columnWidths;
00097     std::string m_rowHeights;
00098     std::string m_columnRelWidths;
00099 
00100     bool m_gotAllColumnWidths;
00101 
00102     std::string m_waitingEndElement;
00103 };
00104 
00105 #endif //_ODI_TABLE_LISTENERSTATE_H_

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1