summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qtextdocument.cpp4
-rw-r--r--src/gui/text/qtextlayout.cpp8
2 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index bb44c19557..3a751e64cc 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -1766,6 +1766,10 @@ QTextBlock QTextDocument::lastBlock() const
\property QTextDocument::pageSize
\brief the page size that should be used for laying out the document
+ The units are determined by the underlying paint device. The size is
+ measured in logical pixels when painting to the screen, and in points
+ (1/72 inch) when painting to a printer.
+
By default, for a newly-created, empty document, this property contains
an undefined size.
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index 3b1ee8ec03..b603ec7fc6 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -1902,11 +1902,15 @@ void QTextLine::layout_helper(int maxGlyphs)
++lbh.glyphCount;
if (lbh.checkFullOtherwiseExtend(line))
goto found;
- } else if (attributes[lbh.currentPosition].whiteSpace) {
+ } else if (attributes[lbh.currentPosition].whiteSpace
+ && eng->layoutData->string.at(lbh.currentPosition).decompositionTag() != QChar::NoBreak) {
lbh.whiteSpaceOrObject = true;
- while (lbh.currentPosition < end && attributes[lbh.currentPosition].whiteSpace)
+ while (lbh.currentPosition < end
+ && attributes[lbh.currentPosition].whiteSpace
+ && eng->layoutData->string.at(lbh.currentPosition).decompositionTag() != QChar::NoBreak) {
addNextCluster(lbh.currentPosition, end, lbh.spaceData, lbh.glyphCount,
current, lbh.logClusters, lbh.glyphs);
+ }
if (!lbh.manualWrap && lbh.spaceData.textWidth > line.width) {
lbh.spaceData.textWidth = line.width; // ignore spaces that fall out of the line.