diff options
author | Sebastian Geerken <devnull@localhost> | 2016-05-10 22:16:08 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2016-05-10 22:16:08 +0200 |
commit | 9afbae353b722209d63786366a175ae7386e7575 (patch) | |
tree | 3f073daa46a669e9799357f25b3d70ecfeca5163 /dw | |
parent | 4fcecb856a04d94bf82d0183e734430fb24295b8 (diff) |
Use border values only when ther is a border (float).
Diffstat (limited to 'dw')
-rw-r--r-- | dw/textblock_linebreaking.cc | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/dw/textblock_linebreaking.cc b/dw/textblock_linebreaking.cc index f4789619..fddfb44f 100644 --- a/dw/textblock_linebreaking.cc +++ b/dw/textblock_linebreaking.cc @@ -2112,27 +2112,29 @@ void Textblock::calcBorders (int lastOofRef, int height) newLineHasFloatLeft = newLineHasFloatLeft || thisHasLeft; thisHasRight = oofm->hasFloatRight (y, height, this, effOofRef); newLineHasFloatRight = newLineHasFloatRight || thisHasRight; - - newLineLeftBorder = - max (newLineLeftBorder, - oofm->getLeftBorder (y, height, this, effOofRef) - - getGeneratorX (i)); - newLineRightBorder = - max (newLineRightBorder, - oofm->getRightBorder (y, height, this, effOofRef) - - getGeneratorRest (i)); - + // TODO "max" is not really correct for the heights. (Does // not matter, since only one, the float manager, returns // meaningful values.) - if (thisHasLeft) + if (thisHasLeft) { + newLineLeftBorder = + max (newLineLeftBorder, + oofm->getLeftBorder (y, height, this, effOofRef) + - getGeneratorX (i)); newLineLeftFloatHeight = max (newLineLeftFloatHeight, oofm->getLeftFloatHeight (y, height, this, effOofRef)); - if (thisHasRight) + } + + if (thisHasRight) { + newLineRightBorder = + max (newLineRightBorder, + oofm->getRightBorder (y, height, this, effOofRef) + - getGeneratorRest (i)); newLineRightFloatHeight = max (newLineRightFloatHeight, oofm->getRightFloatHeight (y, height, this, effOofRef)); + } DBG_OBJ_MSGF ("construct.line", 1, "OOFM #%d: %d * %d (%s) / %d * %d (%s), at %d (%d), " |