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

ie_exp_OpenXML_Listener.h

Go to the documentation of this file.
00001 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: t -*- */
00002 /* AbiSource
00003  *
00004  * Copyright (C) 2008 Firat Kiyak <firatkiyak@gmail.com>
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 _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_

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1