+
+ // Try to parse any style parameters that can be handled simply by
+ // converting them to the equivalent HTML 3 attributes: this is a far cry
+ // from perfect but better than nothing.
+ static const struct EquivAttr
+ {
+ const char *style;
+ const char *attr;
+ } equivAttrs[] =
+ {
+ { "text-align", "ALIGN" },
+ { "width", "WIDTH" },
+ { "vertical-align", "VALIGN" },
+ { "background", "BGCOLOR" },
+ };
+
+ wxHtmlStyleParams styleParams(*this);
+ for ( unsigned n = 0; n < WXSIZEOF(equivAttrs); n++ )
+ {
+ const EquivAttr& ea = equivAttrs[n];
+ if ( styleParams.HasParam(ea.style) && !HasParam(ea.attr) )
+ {
+ m_ParamNames.Add(ea.attr);
+ m_ParamValues.Add(styleParams.GetParam(ea.style));
+ }
+ }