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

ODi_Frame_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., 59 Temple Place - Suite 330, Boston, MA
00019  * 02111-1307, USA.
00020  */
00021 
00022 #ifndef _ODI_FRAME_LISTENERSTATE_H_
00023 #define _ODI_FRAME_LISTENERSTATE_H_
00024 
00025 // Internal includes
00026 #include "ODi_ListenerState.h"
00027 
00028 // Internal classes
00029 class ODi_Office_Styles;
00030 class ODi_Style_List;
00031 class ODi_Abi_Data;
00032 
00033 // AbiWord classes
00034 class PD_Document;
00035 
00036 
00040 class ODi_Frame_ListenerState : public ODi_ListenerState {
00041 
00042 public:
00043 
00044     ODi_Frame_ListenerState(PD_Document* pDocument,
00045         ODi_Office_Styles* pStyles,
00046         ODi_Abi_Data& rAbiData,
00047         ODi_ElementStack& rElementStack);
00048 
00049     virtual ~ODi_Frame_ListenerState() {}
00050 
00051     void startElement (const gchar* pName, const gchar** ppAtts,
00052                        ODi_ListenerStateAction& rAction);
00053 
00054     void endElement (const gchar* pName, ODi_ListenerStateAction& rAction);
00055 
00056     void charData (const gchar* pBuffer, int length);
00057 
00058 private:
00059 
00063     void _drawImage (const gchar** ppAtts, ODi_ListenerStateAction& rAction);
00064 
00065     void _drawInlineImage (const gchar** ppAtts);
00066 
00070     void _drawObject (const gchar** ppAtts, ODi_ListenerStateAction& rAction);
00071 
00076     void _drawTextBox (const gchar** ppAtts, ODi_ListenerStateAction& rAction);
00077 
00078     bool _getFrameProperties(UT_UTF8String& rProps, const gchar** ppAtts);
00079 
00080     PD_Document* m_pAbiDocument;
00081     ODi_Abi_Data& m_rAbiData;
00082     ODi_Office_Styles* m_pStyles;
00083 
00084     bool m_parsedFrameStartTag;
00085     bool m_bOnContentStream;
00086 
00087     // "true" if this frame has degenerated into an inlined <image>
00088     // on the AbiWord document.
00089     bool m_inlinedImage;
00090     UT_sint32 m_iFrameDepth;
00091 
00092     UT_ByteBuf* m_pMathBB;
00093     bool m_bInMath;
00094 
00095     bool m_bInlineImagePending;
00096     bool m_bPositionedImagePending;
00097     std::string m_sAltTitle;
00098     bool m_bInAltTitle;
00099     std::string m_sAltDesc;
00100     bool m_bInAltDesc;
00101     std::map<std::string, std::string> m_mPendingImgProps;
00102 };
00103 
00104 #endif //_ODI_FRAME_LISTENERSTATE_H_

Generated on Sat May 26 2012 for AbiWord by  doxygen 1.7.1