summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextodfwriter.cpp
diff options
context:
space:
mode:
authorNils Jeisecke <jeisecke@saltation.de>2009-05-12 12:47:49 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-07-13 15:19:49 (GMT)
commite15d415acbd426e58fb1e967eb331fe41488dfff (patch)
tree848a5a3fcdaee0a0fa1f1a1ccf1a3dc4a9a1afe0 /src/gui/text/qtextodfwriter.cpp
parentf629c9caddb7ca921ad5af1c8607e059c30e39b0 (diff)
downloadQt-e15d415acbd426e58fb1e967eb331fe41488dfff.zip
Qt-e15d415acbd426e58fb1e967eb331fe41488dfff.tar.gz
Qt-e15d415acbd426e58fb1e967eb331fe41488dfff.tar.bz2
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/qtextodfwriter.cpp')
-rw-r--r--src/gui/text/qtextodfwriter.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp
index b0c16ee..883cf80 100644
--- a/src/gui/text/qtextodfwriter.cpp
+++ b/src/gui/text/qtextodfwriter.cpp
@@ -174,6 +174,10 @@ static QString bulletChar(QTextListFormat::Style style)
return QString::fromLatin1("a");
case QTextListFormat::ListUpperAlpha:
return QString::fromLatin1("A");
+ case QTextListFormat::ListLowerRoman:
+ return QString::fromLatin1("i");
+ case QTextListFormat::ListUpperRoman:
+ return QString::fromLatin1("I");
default:
case QTextListFormat::ListStyleUndefined:
return QString();
@@ -619,7 +623,9 @@ void QTextOdfWriter::writeListFormat(QXmlStreamWriter &writer, QTextListFormat f
QTextListFormat::Style style = format.style();
if (style == QTextListFormat::ListDecimal || style == QTextListFormat::ListLowerAlpha
- || style == QTextListFormat::ListUpperAlpha) {
+ || style == QTextListFormat::ListUpperAlpha
+ || style == QTextListFormat::ListLowerRoman
+ || style == QTextListFormat::ListUpperRoman) {
writer.writeStartElement(textNS, QString::fromLatin1("list-level-style-number"));
writer.writeAttribute(styleNS, QString::fromLatin1("num-format"), bulletChar(style));
writer.writeAttribute(styleNS, QString::fromLatin1("num-suffix"), QString::fromLatin1("."));