Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _ODI_FRAME_LISTENERSTATE_H_
00023 #define _ODI_FRAME_LISTENERSTATE_H_
00024
00025
00026 #include "ODi_ListenerState.h"
00027
00028
00029 class ODi_Office_Styles;
00030 class ODi_Style_List;
00031 class ODi_Abi_Data;
00032
00033
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
00088
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_