summaryrefslogtreecommitdiff
path: root/dw/ooffloatsmgr.cc
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2016-05-27 13:47:14 +0200
committerSebastian Geerken <devnull@localhost>2016-05-27 13:47:14 +0200
commit91e3b71937b30e0c0ec38de7b5a0a099edf7ce32 (patch)
tree483ec252707cd54b138bd3ae779616a08cc3e1b6 /dw/ooffloatsmgr.cc
parentc3291c7a8d3f5f7df51e24bdeed82a2f72cb097b (diff)
Textblock::getGeneratorWidth() may use caller information to adjust return value. This fixes too small return values of getGeneratorRest().
Diffstat (limited to 'dw/ooffloatsmgr.cc')
-rw-r--r--dw/ooffloatsmgr.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/dw/ooffloatsmgr.cc b/dw/ooffloatsmgr.cc
index 2ec73bf3..84b2f6ff 100644
--- a/dw/ooffloatsmgr.cc
+++ b/dw/ooffloatsmgr.cc
@@ -473,7 +473,7 @@ int OOFFloatsMgr::calcFloatX (Float *vloat)
// (ii) If there is more than one line, the line break will already be
// exceeded, and so be smaller that GB width + float width.
effGeneratorWidth =
- min (vloat->generator->getGeneratorWidth () + vloat->size.width,
+ min (vloat->generator->getGeneratorWidth (0, 0) + vloat->size.width,
vloat->generator->getMaxGeneratorWidth ());
x = max (generator->getGeneratorX (oofmIndex) + effGeneratorWidth
@@ -857,7 +857,7 @@ bool OOFFloatsMgr::collidesH (Float *vloat, Float *other)
if (vloat->generator == other->generator)
collidesH = vloat->size.width + other->size.width
+ vloat->generator->boxDiffWidth()
- > vloat->generator->getGeneratorWidth ();
+ > vloat->generator->getGeneratorWidth (0, 0);
else {
// Again, if the other float is not allocated, there is no
// collision. Compare to collidesV. (But vloat->size is used
@@ -1025,8 +1025,8 @@ void OOFFloatsMgr::getFloatsExtremes (Extremes *cbExtr, Side side,
*maxWidth = max (*maxWidth,
extr.maxWidth
+ vloat->generator->getStyle()->boxDiffWidth(),
- + max (container->getGeneratorWidth ()
- - vloat->generator->getGeneratorWidth (),
+ + max (container->getGeneratorWidth (0, 0)
+ - vloat->generator->getGeneratorWidth (0, 0),
0));
DBG_OBJ_MSGF ("resize.oofm", 1, "%d / %d => %d / %d",