diff options
author | Sebastian Geerken <devnull@localhost> | 2012-11-28 21:51:27 +0100 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2012-11-28 21:51:27 +0100 |
commit | 891e083d172ce40aec3d609ea5e0a4d3cd9df325 (patch) | |
tree | 7e7d14e739c68f235a2c6e32d493e4c1b511b1e6 /dw/textblock_linebreaking.cc | |
parent | e31e795e8587a40d75d997b16fc7bac66916218b (diff) |
Fixed wrong textblock (especially list item) size (overlapping borders in tables etc).
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); |