diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/text/qtextdocument.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index 03602712cc..30e0f32547 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -2531,6 +2531,29 @@ void QTextHtmlExporter::emitBlockAttributes(const QTextBlock &block) html += QLatin1Char(';'); } + if (format.lineHeightType() != QTextBlockFormat::SingleHeight) { + switch (format.lineHeightType()) { + case QTextBlockFormat::ProportionalHeight: + case QTextBlockFormat::FixedHeight: + html += QLatin1String(" line-height:"); + break; + case QTextBlockFormat::MinimumHeight: + html += QLatin1String(" min-height:"); + break; + case QTextBlockFormat::LineDistanceHeight: + html += QLatin1String(" line-spacing:"); + break; + case QTextBlockFormat::SingleHeight: + default: + break; // Should never reach here + } + html += QString::number(format.lineHeight()); + if (format.lineHeightType() == QTextBlockFormat::ProportionalHeight) + html += QLatin1String("%;"); + else + html += QLatin1String("px;"); + } + emitPageBreakPolicy(format.pageBreakPolicy()); QTextCharFormat diff; |