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_HTML_NAVIGATIONHELPER_H
00023 #define IE_EXP_HTML_NAVIGATIONHELPER_H
00024
00025 #include "ie_exp_HTML_util.h"
00026
00027
00028 #include <vector>
00029 #include <string>
00030 #include <gsf/gsf-output.h>
00031
00032
00033 #include <pd_Document.h>
00034 #include <pl_Listener.h>
00035 #include <px_ChangeRecord.h>
00036 #include <px_CR_Span.h>
00037 #include <px_CR_Strux.h>
00038 #include <px_CR_Object.h>
00039 #include <fd_Field.h>
00040 #include <fl_TOCLayout.h>
00041 #include <ie_Table.h>
00042 #include <ie_TOC.h>
00043 #include <ut_go_file.h>
00044
00045
00046 class ABI_EXPORT IE_Exp_HTML_NavigationHelper : public IE_TOCHelper {
00047 public:
00048 IE_Exp_HTML_NavigationHelper(PD_Document *pDocument,
00049 const UT_UTF8String &baseName);
00050 virtual ~IE_Exp_HTML_NavigationHelper();
00051
00052 UT_UTF8String getBookmarkFilename(const UT_UTF8String &id) const;
00053 UT_UTF8String getFilenameByPosition(PT_DocPosition position) const;
00054 inline int getMinTOCLevel() const { return m_minTOCLevel; }
00055 inline int getMinTOCIndex() const { return m_minTOCIndex; }
00056 inline std::map<UT_UTF8String, UT_UTF8String> & getBookmarks()
00057 { return m_bookmarks; }
00058 private:
00059 UT_UTF8String m_suffix;
00060 int m_minTOCLevel;
00061 int m_minTOCIndex;
00062 std::map<UT_UTF8String, UT_UTF8String> m_bookmarks;
00063 char* m_baseName;
00064 };
00065
00066 class ABI_EXPORT IE_Exp_HTML_BookmarkListener : public PL_Listener
00067 {
00068 public:
00069 IE_Exp_HTML_BookmarkListener(PD_Document* pDoc,
00070 IE_Exp_HTML_NavigationHelper *pNavigationHelper);
00071 bool populate(fl_ContainerLayout* sfh,
00072 const PX_ChangeRecord * pcr);
00073
00074
00075 bool populateStrux(pf_Frag_Strux* ,
00076 const PX_ChangeRecord * ,
00077 fl_ContainerLayout* * )
00078 {
00079 return true;
00080 }
00081
00082
00083 bool change(fl_ContainerLayout* ,
00084 const PX_ChangeRecord * )
00085 {
00086 return true;
00087 }
00088
00089
00090 bool insertStrux(fl_ContainerLayout* ,
00091 const PX_ChangeRecord * ,
00092 pf_Frag_Strux* ,
00093 PL_ListenerId ,
00094 void (* ) (pf_Frag_Strux* sdhNew,
00095 PL_ListenerId lid,
00096 fl_ContainerLayout* sfhNew))
00097 {
00098 return true;
00099 }
00100
00101
00102 bool signal(UT_uint32 )
00103 {
00104 return true;
00105 }
00106
00107 private:
00108 PD_Document * m_pDoc;
00109 IE_Exp_HTML_NavigationHelper *m_pNavigationHelper;
00110
00111 };
00112
00113 #endif
00114