summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextdocument.cpp
diff options
context:
space:
mode:
authorAndy Shaw <qt-info@nokia.com>2010-06-21 10:08:26 (GMT)
committerAndy Shaw <qt-info@nokia.com>2010-06-21 10:08:26 (GMT)
commit033fea2483945aa2ecb238751121098b594a1877 (patch)
treef8a2b28e95640dab0e801037722e73b4633d0296 /src/gui/text/qtextdocument.cpp
parent1fb24d6852e34bd58f35172dea4bfd4c41236689 (diff)
parent448dd8593f3e7e680ce3d0f92e279aad3c88d7d6 (diff)
downloadQt-033fea2483945aa2ecb238751121098b594a1877.zip
Qt-033fea2483945aa2ecb238751121098b594a1877.tar.gz
Qt-033fea2483945aa2ecb238751121098b594a1877.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'src/gui/text/qtextdocument.cpp')
-rw-r--r--src/gui/text/qtextdocument.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index 65e88ab..e0386f1 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -2498,13 +2498,10 @@ void QTextHtmlExporter::emitBlockAttributes(const QTextBlock &block)
QTextBlockFormat format = block.blockFormat();
emitAlignment(format.alignment());
- Qt::LayoutDirection dir = format.layoutDirection();
- if (dir == Qt::LeftToRight) {
- // assume default to not bloat the html too much
- // html += QLatin1String(" dir='ltr'");
- } else {
+ // assume default to not bloat the html too much
+ // html += QLatin1String(" dir='ltr'");
+ if (block.textDirection() == Qt::RightToLeft)
html += QLatin1String(" dir='rtl'");
- }
QLatin1String style(" style=\"");
html += style;