diff options
Diffstat (limited to 'dw/textblock_linebreaking.cc')
-rw-r--r-- | dw/textblock_linebreaking.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dw/textblock_linebreaking.cc b/dw/textblock_linebreaking.cc index 63d482ee..401e1a88 100644 --- a/dw/textblock_linebreaking.cc +++ b/dw/textblock_linebreaking.cc @@ -298,6 +298,11 @@ Textblock::Line *Textblock::addLine (int firstWord, int lastWord, Word *lastWordOfLine = words->getRef(lastWord); // Word::totalWidth includes the hyphen (which is what we want here). int lineWidth = lastWordOfLine->totalWidth; + // "lineWidth" is relative to leftOffset, so we may have to add + // "line1OffsetEff" (remember: this is, for list items, negative). + if (lines->size () == 0) + lineWidth += line1OffsetEff; + int maxOfMinWidth, sumOfMaxWidth; accumulateWordExtremes (firstWord, lastWord, &maxOfMinWidth, &sumOfMaxWidth); |