diff options
author | Nils Jeisecke <jeisecke@saltation.de> | 2009-05-12 14:47:49 +0200 |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-13 17:19:49 +0200 |
commit | e15d415acbd426e58fb1e967eb331fe41488dfff (patch) | |
tree | 848a5a3fcdaee0a0fa1f1a1ccf1a3dc4a9a1afe0 /src/gui/text/qtexthtmlparser.cpp | |
parent | f629c9caddb7ca921ad5af1c8607e059c30e39b0 (diff) | |
download | qt4-tools-e15d415acbd426e58fb1e967eb331fe41488dfff.tar.gz |
Added QTextListFormat::ListUpperRoman and QTextListFormat::ListLowerRoman for roman numbering of lists as supported by HTML/ODF
Reviewed-by: Olivier Goffart
Merge-request: 681
Diffstat (limited to 'src/gui/text/qtexthtmlparser.cpp')
-rw-r--r-- | src/gui/text/qtexthtmlparser.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp index 1bff162a2e..a88cd17f07 100644 --- a/src/gui/text/qtexthtmlparser.cpp +++ b/src/gui/text/qtexthtmlparser.cpp @@ -1206,6 +1206,8 @@ void QTextHtmlParserNode::setListStyle(const QVector<QCss::Value> &cssValues) case QCss::Value_Decimal: hasOwnListStyle = true; listStyle = QTextListFormat::ListDecimal; break; case QCss::Value_LowerAlpha: hasOwnListStyle = true; listStyle = QTextListFormat::ListLowerAlpha; break; case QCss::Value_UpperAlpha: hasOwnListStyle = true; listStyle = QTextListFormat::ListUpperAlpha; break; + case QCss::Value_LowerRoman: hasOwnListStyle = true; listStyle = QTextListFormat::ListLowerRoman; break; + case QCss::Value_UpperRoman: hasOwnListStyle = true; listStyle = QTextListFormat::ListUpperRoman; break; default: break; } } @@ -1540,6 +1542,10 @@ void QTextHtmlParser::applyAttributes(const QStringList &attributes) node->listStyle = QTextListFormat::ListLowerAlpha; } else if (value == QLatin1String("A")) { node->listStyle = QTextListFormat::ListUpperAlpha; + } else if (value == QLatin1String("i")) { + node->listStyle = QTextListFormat::ListLowerRoman; + } else if (value == QLatin1String("I")) { + node->listStyle = QTextListFormat::ListUpperRoman; } else { value = value.toLower(); if (value == QLatin1String("square")) |