if (tag.HasParam(wxT("WIDTH")))
{
- wxString param = tag.GetParam(wxT("WIDTH"));
- wxSscanf(param.c_str(), wxT("%i"), &w);
- if (param.EndsWith(wxT("%"))) {
- if (w < 0)
- w = 0;
- else if (w > 100)
- w = 100;
- wpercent = true;
+ if (tag.GetParamAsIntOrPercent(wxT("WIDTH"), &w, wpercent))
+ {
+ if (wpercent)
+ {
+ if (w < 0)
+ w = 0;
+ else if (w > 100)
+ w = 100;
+ }
}
-
}
if (tag.HasParam(wxT("HEIGHT")))
m_WParser->GetPixelScale(),
al, mn);
m_WParser->ApplyStateToCell(cel);
+ m_WParser->StopCollapsingSpaces();
cel->SetId(tag.GetParam(wxT("id"))); // may be empty
cel->SetAlt(tag.GetParam(wxT("alt")));
m_WParser->GetContainer()->InsertCell(cel);