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 _IE_EXP_OPENXMLLISTENER_H_
00023 #define _IE_EXP_OPENXMLLISTENER_H_
00024
00025 #include "OXML_Document.h"
00026 #include "OXML_Element_Text.h"
00027 #include "OXML_Element_Run.h"
00028 #include "OXML_Element_Paragraph.h"
00029 #include "OXML_Element_Table.h"
00030 #include "OXML_Element_Row.h"
00031 #include "OXML_Element_Cell.h"
00032 #include "OXML_Element_List.h"
00033 #include "OXML_Element_Image.h"
00034 #include "OXML_Element_Hyperlink.h"
00035 #include "OXML_Element_Bookmark.h"
00036 #include "OXML_Element_Field.h"
00037 #include "OXML_Element_TextBox.h"
00038 #include "OXML_Element_Math.h"
00039 #include "OXML_List.h"
00040 #include "OXML_Image.h"
00041 #include "ie_Table.h"
00042
00043 class OXML_Document;
00044 class OXML_Element_Paragraph;
00045 class OXML_Element_Table;
00046 class OXML_Element_Row;
00047 class OXML_Element_Cell;
00048 class OXML_Element_List;
00049 class OXML_Element_Hyperlink;
00050 class OXML_Element_Bookmark;
00051 class OXML_Element_Field;
00052 class OXML_Element_TextBox;
00053 class OXML_Image;
00054
00059 class IE_Exp_OpenXML_Listener : public PL_Listener
00060 {
00061 public:
00062 IE_Exp_OpenXML_Listener(PD_Document* doc);
00063 ~IE_Exp_OpenXML_Listener();
00064
00065 virtual bool populate(fl_ContainerLayout* sfh, const PX_ChangeRecord * pcr);
00066 virtual bool populateStrux(pf_Frag_Strux* sdh, const PX_ChangeRecord * pcr, fl_ContainerLayout* * psfh);
00067 virtual bool change(fl_ContainerLayout* sfh, const PX_ChangeRecord * pcr);
00068 virtual bool insertStrux(fl_ContainerLayout* sfh, const PX_ChangeRecord * pcr, pf_Frag_Strux* sdhNew, PL_ListenerId lid,
00069 void (* pfnBindHandles)(pf_Frag_Strux* sdhNew, PL_ListenerId lid, fl_ContainerLayout* sfhNew));
00070 virtual bool signal(UT_uint32 iSignal);
00071
00072 OXML_Document* getDocument();
00073
00074 private:
00075 PD_Document* pdoc;
00076 ie_Table tableHelper;
00077 OXML_Document* document;
00078 OXML_Section* section;
00079 OXML_Section* savedSection;
00080 OXML_Element_Paragraph* paragraph;
00081 OXML_Element_Paragraph* savedParagraph;
00082
00083 std::stack<OXML_Element_Table*> m_tableStack;
00084 std::stack<OXML_Element_Row*> m_rowStack;
00085 std::stack<OXML_SharedElement_Cell> m_cellStack;
00086 OXML_Element_Hyperlink* hyperlink;
00087 OXML_Element_TextBox* textbox;
00088
00089 bool bInPositionedImage;
00090 bool bInHyperlink;
00091 bool bInTextbox;
00092 int idCount;
00093
00094 UT_Error addDocumentStyles();
00095 UT_Error addLists();
00096 UT_Error addImages();
00097 UT_Error setPageSize();
00098 std::string getNextId();
00099 };
00100
00101 #endif //_IE_EXP_OPENXMLLISTENER_H_