]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/helpdata.cpp
use wxART_MISSING_IMAGE in wxHTML
[wxWidgets.git] / src / html / helpdata.cpp
index 1864c907e5b91698a665d910ede016d2d5c15620..256664f3f35c755cfc796e9de276ae645a05d5ba 100644 (file)
@@ -114,6 +114,8 @@ class HP_TagHandler : public wxHtmlTagHandler
         bool HandleTag(const wxHtmlTag& tag);
         void WriteOut(wxHtmlContentsItem*& array, int& size);
         void ReadIn(wxHtmlContentsItem* array, int size);
+
+    DECLARE_NO_COPY_CLASS(HP_TagHandler)
 };
 
 
@@ -337,7 +339,12 @@ inline static wxChar* CacheReadString(wxInputStream *f)
 #endif
 }
 
-#define CURRENT_CACHED_BOOK_VERSION     3
+#define CURRENT_CACHED_BOOK_VERSION     4
+
+// Additional flags to detect incompatibilities of the runtime environment:
+#define CACHED_BOOK_FORMAT_FLAGS \
+                     (wxUSE_UNICODE << 0)
+
 
 bool wxHtmlHelpData::LoadCachedBook(wxHtmlBookRecord *book, wxInputStream *f)
 {
@@ -356,6 +363,9 @@ bool wxHtmlHelpData::LoadCachedBook(wxHtmlBookRecord *book, wxInputStream *f)
         return FALSE;
     }
 
+    if (CacheReadInt32(f) != CACHED_BOOK_FORMAT_FLAGS)
+        return FALSE;
+
     /* load contents : */
     st = m_ContentsCnt;
     m_ContentsCnt += CacheReadInt32(f);
@@ -393,6 +403,7 @@ bool wxHtmlHelpData::SaveCachedBook(wxHtmlBookRecord *book, wxOutputStream *f)
 
     /* save header - version info : */
     CacheWriteInt32(f, CURRENT_CACHED_BOOK_VERSION);
+    CacheWriteInt32(f, CACHED_BOOK_FORMAT_FLAGS);
 
     /* save contents : */
     for (cnt = 0, i = 0; i < m_ContentsCnt; i++)