]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/m_layout.cpp
avoid unimplemented wx stubs being used
[wxWidgets.git] / src / html / m_layout.cpp
index aa9ea66ee1f6199cbf415a10722173a469d82741..1d3c5f675c42412d6335cb60943dc57fc47f4f2c 100644 (file)
@@ -4,7 +4,7 @@
 // Author:      Vaclav Slavik
 // RCS-ID:      $Id$
 // Copyright:   (c) 1999 Vaclav Slavik
 // 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
 /////////////////////////////////////////////////////////////////////////////
 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation
 
 FORCE_LINK_ME(m_layout)
 
 
 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
 
 //-----------------------------------------------------------------------------
 // wxHtmlPageBreakCell
@@ -260,11 +263,20 @@ TAG_HANDLER_BEGIN(DIV, "DIV")
             else
                 c->SetAlignHor(old);
 
             else
                 c->SetAlignHor(old);
 
-            return TRUE;
+            return true;
         }
         else
         {
         }
         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,15 @@ TAG_HANDLER_BEGIN(TITLE, "TITLE")
             wxHtmlWindow *wfr = (wxHtmlWindow*)(m_WParser->GetWindow());
             if (wfr)
             {
             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());
+#if !wxUSE_UNICODE
+                wxCSConv conv(m_WParser->GetInputEncoding());
+                title = wxString(title.wc_str(conv), wxConvLocal);
+#endif
+                title = m_WParser->GetEntitiesParser()->Parse(title);
+                wfr->OnSetTitle(title);
             }
         }
         return TRUE;
             }
         }
         return TRUE;