diff options
author | Sebastian Geerken <devnull@localhost> | 2015-10-03 19:28:50 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2015-10-03 19:28:50 +0200 |
commit | d8571c047c7e8599d3c53916ec8e335311b98c70 (patch) | |
tree | 132fd1ee57ac8890f6a37f9b7e4c91cda190a5a4 /dw/textblock.cc | |
parent | c1c494441f1bcf3a2ae70186cbf1eaed08cf6882 (diff) |
SRDOP: Simplifications related to OOFFloatsMgr::calcClearPosition.
Diffstat (limited to 'dw/textblock.cc')
-rw-r--r-- | dw/textblock.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc index 77672449..1dbe3ab7 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -3193,7 +3193,13 @@ int Textblock::getGeneratorX (int oofmIndex) int Textblock::getGeneratorWidth () { - return lineBreakWidth; + // Cf. sizeRequestImpl. + if (mustBeWidenedToAvailWidth ()) + return lineBreakWidth; + else { + int w = lines->size () > 0 ? lines->getLastRef()->maxLineWidth : 0; + return min (w + leftInnerPadding + boxDiffWidth (), lineBreakWidth); + } } bool Textblock::isPossibleContainer (int oofmIndex) |