diff options
Diffstat (limited to 'dw/textblock.cc')
-rw-r--r-- | dw/textblock.cc | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc index ce93fd36..4fe19fdd 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -3067,9 +3067,9 @@ void Textblock::oofSizeChanged (bool extremesChanged) DBG_OBJ_LEAVE (); } -int Textblock::getC0RelX (int oofmIndex) +int Textblock::getGeneratorX (int oofmIndex) { - DBG_OBJ_ENTER ("resize", 0, "Textblock::getC0RelX", "%d", oofmIndex); + DBG_OBJ_ENTER ("resize", 0, "Textblock::getGeneratorX", "%d", oofmIndex); int x, xRef; if (findSizeRequestReference (oofmIndex, &xRef, NULL)) @@ -3119,7 +3119,7 @@ int Textblock::getGeneratorRest (int oofmIndex) int width = getGeneratorWidth (0, 0); rest = container->getGeneratorWidth (xRef, width) - (xRef + width); } else { - // Only called for floats, so this should not happen: + // Only callend for floats, so this should not happen: assertNotReached (); rest = 0; } @@ -3132,31 +3132,15 @@ int Textblock::getGeneratorWidth (int callerX, int callerWidth) { DBG_OBJ_ENTER ("resize", 0, "Textblock::getGeneratorWidth", "%d, %d", callerX, callerWidth); - - if (0 && lines->size () > 0) { - Word *lastWordOfLine, *lwol0; - lwol0 = words->getRef(lines->getRef(0)->lastWord); - lastWordOfLine = words->getRef(lines->getLastRef()->lastWord); - MSG("lww=%d lwol0=%d ", lastWordOfLine->totalWidth, lwol0->totalWidth); - MSG("lbw0=%d lbwl=%d\n", - calcLineBreakWidth(0), - calcLineBreakWidth(lines->size() - 1)); - } + // Cf. sizeRequestImpl. if (usesMaxGeneratorWidth ()) { DBG_OBJ_LEAVE_VAL ("%d", lineBreakWidth); return lineBreakWidth; } else { -#if 0 - int w0 = max (lines->size () > 0 ? lines->getLastRef()->maxLineWidth : 0, - callerX + callerWidth); - ... - w = min (w0 + leftInnerPadding + boxDiffWidth (), lineBreakWidth); -#else int w0 = max (lines->size () > 0 ? lines->getLastRef()->maxLineWidth : 0, callerX + callerWidth), w = min (w0 + leftInnerPadding + boxDiffWidth (), lineBreakWidth); -#endif DBG_OBJ_LEAVE_VAL ("min (%d + %d + %d, %d) = %d", w0, leftInnerPadding, boxDiffWidth (), lineBreakWidth, w); |