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