]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/m_fonts.cpp
fixing RTTI
[wxWidgets.git] / src / html / m_fonts.cpp
index 48664c686dbc57c379a21c32a058518bbb8fddef..9b8380d06d9186881ecdaf4114ab14dc84a7f77a 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        m_fonts.cpp
+// Name:        src/html/m_fonts.cpp
 // Purpose:     wxHtml module for fonts & colors of fonts
 // Author:      Vaclav Slavik
 // RCS-ID:      $Id$
@@ -9,14 +9,13 @@
 
 #include "wx/wxprec.h"
 
-#include "wx/defs.h"
-#if wxUSE_HTML && wxUSE_STREAMS
-
 #ifdef __BORLANDC__
-#pragma hdrstop
+    #pragma hdrstop
 #endif
 
-#ifndef WXPRECOMP
+#if wxUSE_HTML && wxUSE_STREAMS
+
+#ifndef WX_PRECOMP
 #endif
 
 #include "wx/html/forcelnk.h"
@@ -52,10 +51,11 @@ TAG_HANDLER_BEGIN(FONT, "FONT" )
 
         if (tag.HasParam(wxT("SIZE")))
         {
-            int tmp = 0;
-            wxChar c = tag.GetParam(wxT("SIZE")).GetChar(0);
-            if (tag.GetParamAsInt(wxT("SIZE"), &tmp))
+            long tmp = 0;
+            const wxString sizeStr = tag.GetParam(wxT("SIZE"));
+            if (sizeStr.ToLong(&tmp))
             {
+                wxChar c = sizeStr[0];
                 if (c == wxT('+') || c == wxT('-'))
                     m_WParser->SetFontSize(oldsize+tmp);
                 else
@@ -68,13 +68,8 @@ TAG_HANDLER_BEGIN(FONT, "FONT" )
         if (tag.HasParam(wxT("FACE")))
         {
             if (m_Faces.GetCount() == 0)
-            {
-                wxFontEnumerator enu;
-                enu.EnumerateFacenames();
-                const wxArrayString *faces = enu.GetFacenames();
-                if ( faces )
-                    m_Faces = *faces;
-            }
+                m_Faces = wxFontEnumerator::GetFacenames();
+
             wxStringTokenizer tk(tag.GetParam(wxT("FACE")), wxT(","));
             int index;
 
@@ -112,7 +107,7 @@ TAG_HANDLER_BEGIN(FONT, "FONT" )
 TAG_HANDLER_END(FONT)
 
 
-TAG_HANDLER_BEGIN(FACES_U, "U,STRIKE")
+TAG_HANDLER_BEGIN(FACES_U, "U,STRIKE,DEL")
 
     TAG_HANDLER_CONSTR(FACES_U) { }