diff options
author | Sebastian Geerken <devnull@localhost> | 2015-10-04 01:02:30 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2015-10-04 01:02:30 +0200 |
commit | a96891523304aa2b1ae38c683f3c85f343563d61 (patch) | |
tree | 4a2d4eeb19c9d22364f2255c3d4761362302bb8e /dw/textblock.cc | |
parent | 6dee44b7e0c1744fd9f6cd11f1419c8a29aebb86 (diff) |
SRDOP: correct usage of get*Border.
Diffstat (limited to 'dw/textblock.cc')
-rw-r--r-- | dw/textblock.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc index f910e2ff..bc6639da 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -3185,7 +3185,23 @@ int Textblock::getGeneratorX (int oofmIndex) if (findSizeRequestReference (oofmIndex, &xRef, NULL)) return xRef; else { - // Only called by by OOFFloatsMgr, so this should not happen: + // Only called for floats, so this should not happen: + assertNotReached (); + return 0; + } +} + +int Textblock::getGeneratorRest (int oofmIndex) +{ + int xRef; + OOFAwareWidget *container = oofContainer[oofmIndex]; + + if (container != NULL && findSizeRequestReference (container, &xRef, NULL)) + return misc::max (container->getGeneratorWidth () + - (xRef + getGeneratorWidth ()), + 0); + else { + // Only called for floats, so this should not happen: assertNotReached (); return 0; } |