]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/m_fonts.cpp
Applied #15226 wxRichTextCtrl: Implement setting properties with undo for objects...
[wxWidgets.git] / src / html / m_fonts.cpp
index 9e69afb79f037f409f2707c076d0e32c6b1d0891..117f8faca9d9fac1e90550ca055f689a9de880d4 100644 (file)
@@ -2,7 +2,6 @@
 // Name:        src/html/m_fonts.cpp
 // Purpose:     wxHtml module for fonts & colors of fonts
 // Author:      Vaclav Slavik
 // Name:        src/html/m_fonts.cpp
 // Purpose:     wxHtml module for fonts & colors of fonts
 // Author:      Vaclav Slavik
-// RCS-ID:      $Id$
 // Copyright:   (c) 1999 Vaclav Slavik
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 // Copyright:   (c) 1999 Vaclav Slavik
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -39,7 +38,6 @@ TAG_HANDLER_BEGIN(FONT, "FONT" )
         int oldsize = m_WParser->GetFontSize();
         wxString oldface = m_WParser->GetFontFace();
 
         int oldsize = m_WParser->GetFontSize();
         wxString oldface = m_WParser->GetFontFace();
 
-        if (tag.HasParam(wxT("COLOR")))
         {
             wxColour clr;
             if (tag.GetParamAsColour(wxT("COLOR"), &clr))
         {
             wxColour clr;
             if (tag.GetParamAsColour(wxT("COLOR"), &clr))
@@ -49,12 +47,12 @@ 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;
+            wxString sizeStr;
+            if (tag.GetParamAsString(wxT("SIZE"), &sizeStr) && sizeStr.ToLong(&tmp))
             {
             {
+                wxChar c = sizeStr[0];
                 if (c == wxT('+') || c == wxT('-'))
                     m_WParser->SetFontSize(oldsize+tmp);
                 else
                 if (c == wxT('+') || c == wxT('-'))
                     m_WParser->SetFontSize(oldsize+tmp);
                 else
@@ -64,12 +62,13 @@ TAG_HANDLER_BEGIN(FONT, "FONT" )
             }
         }
 
             }
         }
 
-        if (tag.HasParam(wxT("FACE")))
+        wxString faces;
+        if (tag.GetParamAsString(wxT("FACE"), &faces))
         {
             if (m_Faces.GetCount() == 0)
                 m_Faces = wxFontEnumerator::GetFacenames();
 
         {
             if (m_Faces.GetCount() == 0)
                 m_Faces = wxFontEnumerator::GetFacenames();
 
-            wxStringTokenizer tk(tag.GetParam(wxT("FACE")), wxT(","));
+            wxStringTokenizer tk(faces, wxT(","));
             int index;
 
             while (tk.HasMoreTokens())
             int index;
 
             while (tk.HasMoreTokens())
@@ -106,7 +105,7 @@ TAG_HANDLER_BEGIN(FONT, "FONT" )
 TAG_HANDLER_END(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) { }
 
 
     TAG_HANDLER_CONSTR(FACES_U) { }