diff options
-rw-r--r-- | dw/oofpositionedmgr.cc | 4 | ||||
-rw-r--r-- | dw/textblock_linebreaking.cc | 11 |
2 files changed, 8 insertions, 7 deletions
diff --git a/dw/oofpositionedmgr.cc b/dw/oofpositionedmgr.cc index 949965b2..3efb5002 100644 --- a/dw/oofpositionedmgr.cc +++ b/dw/oofpositionedmgr.cc @@ -495,7 +495,7 @@ void OOFPositionedMgr::calcPosAndSizeChildOfChild (Child *child, int refWidth, left, right, *width, widthDefined ? "true" : "false"); if (left == -1 && right == -1) - *x = 0; + *x = child->generator->getAllocation()->x + child->x; else if (left == -1 && right != -1) *x = refWidth - *width - right; else if (left != -1 && right == -1) @@ -539,7 +539,7 @@ void OOFPositionedMgr::calcPosAndSizeChildOfChild (Child *child, int refWidth, heightDefined ? "true" : "false"); if (top == -1 && bottom == -1) - *y = 0; + *y = child->generator->getAllocation()->y + child->y; else if (top == -1 && bottom != -1) *y = refHeight - (*ascent + *descent) - bottom; else if (top != -1 && bottom == -1) diff --git a/dw/textblock_linebreaking.cc b/dw/textblock_linebreaking.cc index dbce505e..2d67cf4e 100644 --- a/dw/textblock_linebreaking.cc +++ b/dw/textblock_linebreaking.cc @@ -753,14 +753,15 @@ int Textblock::wrapWordInFlow (int wordIndex, bool wrapAll) // Step 2: position the float and re-calculate the line. - // TODO "x = 0" is not quite correct, but this does not - // matter (currently?). + // TODO "x" is not quite correct, but this does not matter + // (currently?). lastFloatPos = newFloatPos; for (int i = 0; i < NUM_OOFM; i++) searchOutOfFlowMgr(i)->tellPosition - (words->getRef(lastFloatPos)->content.widget, 0, yNewLine); + (words->getRef(lastFloatPos)->content.widget, + boxOffsetX (), yNewLine); balanceBreakPosAndHeight (wordIndex, firstIndex, &searchUntil, tempNewLine, penaltyIndex, false, @@ -853,8 +854,8 @@ int Textblock::wrapWordOofRef (int wordIndex, bool wrapAll) DBG_OBJ_MSGF ("construct.word", 1, "parentRef = %d, oofm = %p", widget->parentRef, oofm); if (oofm && !oofm->mayAffectBordersAtAll ()) - // TODO Again, "x = 0" is not correct (see above). - oofm->tellPosition (widget, 0, yNewLine); + // TODO Again, "x" is not correct (see above). + oofm->tellPosition (widget, boxOffsetX (), yNewLine); DBG_OBJ_LEAVE (); |