]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/m_tables.cpp
Add wxControlWithItems::SendSelectionChangedEvent() helper.
[wxWidgets.git] / src / html / m_tables.cpp
index 078525080bbba56e276aa613503d1c7fe1e27095..825329b2ca0fbb911b3ae849a20debb17bced7af 100644 (file)
@@ -135,7 +135,7 @@ wxHtmlTableCell::wxHtmlTableCell(wxHtmlContainerCell *parent, const wxHtmlTag& t
     if (tag.HasParam(wxT("BGCOLOR")))
     {
         tag.GetParamAsColour(wxT("BGCOLOR"), &m_tBkg);
-        if (m_tBkg.Ok())
+        if (m_tBkg.IsOk())
             SetBackgroundColour(m_tBkg);
     }
     if (tag.HasParam(wxT("VALIGN")))
@@ -288,7 +288,7 @@ void wxHtmlTableCell::AddCell(wxHtmlContainerCell *cell, const wxHtmlTag& tag)
         {
             wxString wd = tag.GetParam(wxT("WIDTH"));
 
-            if (wd[wd.length()-1] == wxT('%'))
+            if (!wd.empty() && wd[wd.length()-1] == wxT('%'))
             {
                 if ( wxSscanf(wd.c_str(), wxT("%i%%"), &m_ColsInfo[c].width) == 1 )
                 {
@@ -344,7 +344,7 @@ void wxHtmlTableCell::AddCell(wxHtmlContainerCell *cell, const wxHtmlTag& tag)
         wxColour bk = m_rBkg;
         if (tag.HasParam(wxT("BGCOLOR")))
             tag.GetParamAsColour(wxT("BGCOLOR"), &bk);
-        if (bk.Ok())
+        if (bk.IsOk())
             cell->SetBackgroundColour(bk);
     }
     if (m_Border > 0)
@@ -704,7 +704,7 @@ TAG_HANDLER_BEGIN(TABLE, "TABLE,TR,TD,TH")
                 {
                     wxString wd = tag.GetParam(wxT("WIDTH"));
 
-                    if (wd[wd.length()-1] == wxT('%'))
+                    if (!wd.empty() && wd[wd.length()-1] == wxT('%'))
                     {
                         int width = 0;
                         wxSscanf(wd.c_str(), wxT("%i%%"), &width);