summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextdocument.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text/qtextdocument.cpp')
-rw-r--r--src/gui/text/qtextdocument.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index f50f771c07..febd5da488 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -2763,26 +2763,25 @@ void QTextHtmlExporter::emitBlockAttributes(const QTextBlock &block)
}
if (format.lineHeightType() != QTextBlockFormat::SingleHeight) {
+ html += QLatin1String(" line-height:")
+ + QString::number(format.lineHeight());
switch (format.lineHeightType()) {
case QTextBlockFormat::ProportionalHeight:
+ html += QLatin1String("%;");
+ break;
case QTextBlockFormat::FixedHeight:
- html += QLatin1String(" line-height:");
+ html += QLatin1String("; -qt-line-height-type: fixed;");
break;
case QTextBlockFormat::MinimumHeight:
- html += QLatin1String(" min-height:");
+ html += QLatin1String("px;");
break;
case QTextBlockFormat::LineDistanceHeight:
- html += QLatin1String(" line-spacing:");
+ html += QLatin1String("; -qt-line-height-type: line-distance;");
break;
- case QTextBlockFormat::SingleHeight:
default:
+ html += QLatin1String(";");
break; // Should never reach here
}
- html += QString::number(format.lineHeight());
- if (format.lineHeightType() == QTextBlockFormat::ProportionalHeight)
- html += QLatin1String("%;");
- else
- html += QLatin1String("px;");
}
emitPageBreakPolicy(format.pageBreakPolicy());