]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/m_layout.cpp
fixed typo (no code changes)
[wxWidgets.git] / src / html / m_layout.cpp
index 46822c121a93a6dc75367cf9df42ff4fed6605ad..ee1e782205c6c00608f6664021ca8084d5d50f22 100644 (file)
@@ -4,7 +4,7 @@
 // Author:      Vaclav Slavik
 // RCS-ID:      $Id$
 // Copyright:   (c) 1999 Vaclav Slavik
-// Licence:     wxWindows Licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation
 
 FORCE_LINK_ME(m_layout)
 
-
-#include <stdlib.h> // bsearch()
+#ifdef __WXWINCE__
+    #include "wx/msw/wince/missing.h"       // for bsearch()
+#else
+    #include <stdlib.h>                     // bsearch()
+#endif
 
 //-----------------------------------------------------------------------------
 // wxHtmlPageBreakCell
@@ -77,7 +80,7 @@ public:
     void Draw(wxDC& WXUNUSED(dc),
               int WXUNUSED(x), int WXUNUSED(y),
               int WXUNUSED(view_y1), int WXUNUSED(view_y2),
-              wxHtmlRenderingState& WXUNUSED(state)) {}
+              wxHtmlRenderingInfo& WXUNUSED(info)) {}
 
 private:
     DECLARE_NO_COPY_CLASS(wxHtmlPageBreakCell)
@@ -260,11 +263,20 @@ TAG_HANDLER_BEGIN(DIV, "DIV")
             else
                 c->SetAlignHor(old);
 
-            return TRUE;
+            return true;
         }
         else
         {
-            return FALSE;
+            // Same as BR
+            int al = m_WParser->GetContainer()->GetAlignHor();
+            wxHtmlContainerCell *c;
+
+            m_WParser->CloseContainer();
+            c = m_WParser->OpenContainer();
+            c->SetAlignHor(al);
+            c->SetAlign(tag);
+            c->SetMinHeight(m_WParser->GetCharHeight());
+            return false;
         }
     }
 
@@ -283,9 +295,11 @@ TAG_HANDLER_BEGIN(TITLE, "TITLE")
             wxHtmlWindow *wfr = (wxHtmlWindow*)(m_WParser->GetWindow());
             if (wfr)
             {
-                const wxString& src = *m_WParser->GetSource();
-                wfr->OnSetTitle(src.Mid(tag.GetBeginPos(), 
-                                        tag.GetEndPos1()-tag.GetBeginPos()));
+                wxString title = m_WParser->GetSource()->Mid(
+                                        tag.GetBeginPos(), 
+                                        tag.GetEndPos1()-tag.GetBeginPos());
+                title = m_WParser->GetEntitiesParser()->Parse(title);
+                wfr->OnSetTitle(title);
             }
         }
         return TRUE;