RVHTMLImporter and Strikeout Font Attribute
Posted: Thu Apr 27, 2006 2:16 pm
The LoadHTML method of the RVHTMLImporter class has a bug in its implementation of the strikeout font attribute. In addtion, RichView exports this attribute with the <s> tag, not the <strike> tag. Finally, both tags have been deprecated in favor of the <del> tag. So, I made the following modification to the LoadHTML method to address these issues:
else if (s = 'strike') or (s = 's') or (s = 'del') then //dkm
begin
WriteTSCR;
CF.Style := Cf.Style + [fsStrikeout];
FindFont(True, CurrLink <> '');
end
else if (s = '/strike') or (s='/s') or (s='/del') then //dkm
begin
WriteTSCR;
CF.Style := Cf.Style - [fsStrikeOut];
FindFont(False, CurrLink <> ''); //dkm - Changed True to False
end
else if (s = 'strike') or (s = 's') or (s = 'del') then //dkm
begin
WriteTSCR;
CF.Style := Cf.Style + [fsStrikeout];
FindFont(True, CurrLink <> '');
end
else if (s = '/strike') or (s='/s') or (s='/del') then //dkm
begin
WriteTSCR;
CF.Style := Cf.Style - [fsStrikeOut];
FindFont(False, CurrLink <> ''); //dkm - Changed True to False
end