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

ie_exp_DocRangeListener.h

Go to the documentation of this file.
00001 /* AbiWord
00002  * Copyright (C) 2010 Martin Sevior
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017  * 02110-1301 USA.
00018  */
00019 
00020 
00021 #ifndef IE_EXP_PDOCRANGELISTENER_H
00022 #define  IE_EXP_PDOCRANGELISTENER_H
00023 
00024 #include "ut_types.h"
00025 #include "pt_Types.h"
00026 #include "pd_Document.h"
00027 class PX_ChangeRecord;
00028 
00029 #ifdef __sgi
00030 // <sys/signal.h> may #define signal, leaving PL_Listener::signal() pure
00031 // virtual if subclasses don't include the same header files.
00032 // Please keep the "/**/" to stop MSVC dependency generator complaining.
00033 #include  <sys/signal.h>
00034 #endif
00035 
00036 // PL_Listener -- A layout registers a listener with the
00037 //                PD_Document in order to be notified of
00038 //                any changes to the document as they
00039 //                occur.  The document will notify each
00040 //                registered listener (in an undefined
00041 //                order).  When the listener registers,
00042 //                it is provided an ID which may be used
00043 //                later to refer to it.
00044 
00045 class ABI_EXPORT IE_Exp_DocRangeListener: public PL_Listener
00046 {
00047 public:
00048   IE_Exp_DocRangeListener( PD_DocumentRange * pDocRange, PD_Document * pOutDoc);
00049   virtual ~IE_Exp_DocRangeListener(){}
00050 
00051   virtual bool      populate(fl_ContainerLayout* sfh,
00052                  const PX_ChangeRecord * pcr);
00053 
00054   virtual bool      populateStrux(pf_Frag_Strux* sdh,
00055                       const PX_ChangeRecord * pcr,
00056                       fl_ContainerLayout* * psfh);
00057 
00058   virtual bool      change(fl_ContainerLayout* /*sfh*/,
00059                    const PX_ChangeRecord * /*pcr*/)
00060         {return true;}
00061 
00062   virtual bool      insertStrux(fl_ContainerLayout* /*sfh*/,
00063                     const PX_ChangeRecord * /*pcr*/,
00064                     pf_Frag_Strux* /*sdhNew*/,
00065                     PL_ListenerId /*lid*/,
00066                     void (* /*pfnBindHandles*/)(pf_Frag_Strux* sdhNew,
00067                                 PL_ListenerId lid,
00068                                 fl_ContainerLayout* sfhNew))
00069   { return true;}
00070 
00071     virtual bool        signal(UT_uint32 /*iSignal*/)
00072         { return true;}
00073     virtual PLListenerType getType() const
00074         {
00075             return PTL_UNKNOWN;
00076         }
00077     static void  assembleAtts(const PP_PropertyVector & inAtts, const PP_PropertyVector & inProps, PP_PropertyVector & outAtts);
00078 
00079 private:
00080     PD_Document *     getDoc(void) const;
00081     PD_Document *     m_pOutDocument;
00082     bool              m_bFirstSection;
00083     bool              m_bFirstBlock;
00084     PD_Document *     m_pSourceDoc;
00085     PT_AttrPropIndex   m_iLastAP;
00086 };
00087 #endif  /* IE_EXP_PDOCRANGELISTENER_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1