|
|
|
|
@ -210,20 +210,21 @@ void HTMLDecoder::decodeLine(const Character* const characters, int count, LineP |
|
|
|
|
QString style; |
|
|
|
|
|
|
|
|
|
bool useBold; |
|
|
|
|
ColorEntry::FontWeight weight = characters[i].fontWeight(_colorTable); |
|
|
|
|
if (weight == ColorEntry::UseCurrentFormat) |
|
|
|
|
useBold = _lastRendition & RE_BOLD; |
|
|
|
|
else |
|
|
|
|
useBold = weight == ColorEntry::Bold; |
|
|
|
|
|
|
|
|
|
if (useBold) |
|
|
|
|
style.append("font-weight:bold;"); |
|
|
|
|
|
|
|
|
|
if (_lastRendition & RE_UNDERLINE) |
|
|
|
|
style.append("font-decoration:underline;"); |
|
|
|
|
|
|
|
|
|
//colors - a color table must have been defined first
|
|
|
|
|
if (_colorTable) { |
|
|
|
|
ColorEntry::FontWeight weight = characters[i].fontWeight(_colorTable); |
|
|
|
|
if (weight == ColorEntry::UseCurrentFormat) |
|
|
|
|
useBold = _lastRendition & RE_BOLD; |
|
|
|
|
else |
|
|
|
|
useBold = weight == ColorEntry::Bold; |
|
|
|
|
|
|
|
|
|
if (useBold) |
|
|
|
|
style.append("font-weight:bold;"); |
|
|
|
|
|
|
|
|
|
if (_lastRendition & RE_UNDERLINE) |
|
|
|
|
style.append("font-decoration:underline;"); |
|
|
|
|
|
|
|
|
|
style.append(QString("color:%1;").arg(_lastForeColor.color(_colorTable).name())); |
|
|
|
|
|
|
|
|
|
style.append(QString("background-color:%1;").arg(_lastBackColor.color(_colorTable).name())); |
|
|
|
|
|