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")))
{
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 )
{
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)
{
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);