]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/helpdata.cpp
Too quick a trigger finger first time. Compile error fixed.
[wxWidgets.git] / src / html / helpdata.cpp
index ca94e3feafc2f46fbdb8e52c0899ba2dcac200aa..e4a0adbdcea2b00e26b5f065efed7edf94f25dcc 100644 (file)
@@ -300,9 +300,6 @@ bool HP_TagHandler::HandleTag(const wxHtmlTag& tag)
     
                 ESCSEQ("yuml", ""),
 
-                ESCSEQ("#60", "<"),
-                ESCSEQ("#62", ">"),
-
                 /* this one should ALWAYS stay the last one!!! */
                 ESCSEQ("amp", "&"),
                 ESCSEQ("#38", "&"),
@@ -347,6 +344,16 @@ void HP_TagHandler::ReadIn(wxHtmlContentsItem* array, int size)
 // wxHtmlHelpData
 //-----------------------------------------------------------------------------
 
+wxString wxHtmlBookRecord::GetFullPath(const wxString &page) const
+{
+    if (wxIsAbsolutePath(page))
+        return page;
+    else
+        return m_BasePath + page;
+}
+
+
+
 IMPLEMENT_DYNAMIC_CLASS(wxHtmlHelpData, wxObject)
 
 wxHtmlHelpData::wxHtmlHelpData()
@@ -769,10 +776,10 @@ wxString wxHtmlHelpData::FindPageByName(const wxString& x)
     cnt = m_BookRecords.GetCount();
     for (i = 0; i < cnt; i++) 
     {
-        f = fsys.OpenFile(m_BookRecords[i].GetBasePath() + x);
+        f = fsys.OpenFile(m_BookRecords[i].GetFullPath(x));
         if (f) 
            {
-            url = m_BookRecords[i].GetBasePath() + x;
+            url = m_BookRecords[i].GetFullPath(x);
             delete f;
             return url;
         }
@@ -785,7 +792,7 @@ wxString wxHtmlHelpData::FindPageByName(const wxString& x)
     {
         if (m_BookRecords[i].GetTitle() == x) 
            {
-            url = m_BookRecords[i].GetBasePath() + m_BookRecords[i].GetStart();
+            url = m_BookRecords[i].GetFullPath(m_BookRecords[i].GetStart());
             return url;
         }
     }
@@ -797,7 +804,7 @@ wxString wxHtmlHelpData::FindPageByName(const wxString& x)
     {
         if (wxStrcmp(m_Contents[i].m_Name, x) == 0) 
            {
-            url = m_Contents[i].m_Book->GetBasePath() + m_Contents[i].m_Page;
+            url = m_Contents[i].GetFullPath();
             return url;
         }
     }
@@ -810,7 +817,7 @@ wxString wxHtmlHelpData::FindPageByName(const wxString& x)
     {
         if (wxStrcmp(m_Index[i].m_Name, x) == 0) 
            {
-            url = m_Index[i].m_Book->GetBasePath() + m_Index[i].m_Page;
+            url = m_Index[i].GetFullPath();
             return url;
         }
     }
@@ -827,7 +834,7 @@ wxString wxHtmlHelpData::FindPageById(int id)
     {
         if (m_Contents[i].m_ID == id) 
            {
-            url = m_Contents[i].m_Book->GetBasePath() + m_Contents[i].m_Page;
+            url = m_Contents[i].GetFullPath();
             return url;
         }
     }
@@ -906,10 +913,11 @@ bool wxHtmlSearchStatus::Search()
     else m_LastPage = thepage;
     
     wxFileSystem fsys;
-    file = fsys.OpenFile(m_Data->m_Contents[i].m_Book->GetBasePath() + thepage);
+    file = fsys.OpenFile(m_Data->m_Contents[i].m_Book->GetFullPath(thepage));
     if (file) 
     {
-        if (m_Engine.Scan(file->GetStream())) {
+        if (m_Engine.Scan(file->GetStream())) 
+        {
             m_Name = m_Data->m_Contents[i].m_Name;
             m_ContentsItem = m_Data->m_Contents + i;
             found = TRUE;
@@ -995,5 +1003,4 @@ bool wxSearchEngine::Scan(wxInputStream *stream)
 
 
 
-
 #endif