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

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1