From 1db95177abded269fbc4071d59201b05423f04bf Mon Sep 17 00:00:00 2001 From: Jorge Arellano Cid Date: Sat, 4 Jun 2016 20:46:17 -0400 Subject: Revert an accidental commit of testing code (2 patches in the queue). --- dw/ooffloatsmgr.cc | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) (limited to 'dw/ooffloatsmgr.cc') diff --git a/dw/ooffloatsmgr.cc b/dw/ooffloatsmgr.cc index cadf980e..84b2f6ff 100644 --- a/dw/ooffloatsmgr.cc +++ b/dw/ooffloatsmgr.cc @@ -20,7 +20,6 @@ #include "ooffloatsmgr.hh" #include "oofawarewidget.hh" #include "../lout/debug.hh" -#include "../lout/msg.h" #include @@ -434,13 +433,12 @@ int OOFFloatsMgr::calcFloatX (Float *vloat) OOFAwareWidget *generator = vloat->generator; ensureFloatSize (vloat); - MSG("calcFloatX: "); switch (vloat->getWidget()->getStyle()->vloat) { case FLOAT_LEFT: // Left floats are always aligned on the left side of the generator // (content, not allocation) ... - x = generator->getC0RelX (oofmIndex) + x = generator->getGeneratorX (oofmIndex) + generator->getStyle()->boxOffsetX(); // ... but when the float exceeds the line break width of the container, @@ -475,27 +473,13 @@ 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 (0, 0), min (vloat->generator->getGeneratorWidth (0, 0) + vloat->size.width, vloat->generator->getMaxGeneratorWidth ()); - MSG("UsesMaxGenW=%d gen->MaxGenW()=%d genW00=%d effGenW=%d ", - vloat->generator->usesMaxGeneratorWidth(), - vloat->generator->getMaxGeneratorWidth (), - vloat->generator->getGeneratorWidth (0, 0), - effGeneratorWidth); - x = max (generator->getC0RelX (oofmIndex) + effGeneratorWidth + x = max (generator->getGeneratorX (oofmIndex) + effGeneratorWidth - vloat->size.width - generator->getStyle()->boxRestWidth(), - //- generator->getStyle()->boxRestWidth(), // Do not exceed container allocation: 0); - - //if (x == 356) x -= 34; - - MSG("vloatW=%d gen->getC0RelX()=%d g->boxRestWidth()=%d x=%d", - vloat->size.width, - generator->getC0RelX (oofmIndex), - generator->getStyle()->boxRestWidth(), x); break; default: @@ -503,8 +487,8 @@ int OOFFloatsMgr::calcFloatX (Float *vloat) x = 0; break; } + DBG_OBJ_LEAVE_VAL ("%d", x); - MSG("\n"); return x; } @@ -1122,7 +1106,7 @@ int OOFFloatsMgr::getBorder (Side side, int y, int h, OOFAwareWidget *lastGB, int d; switch (side) { case LEFT: - d = vloat->generator->getC0RelX (oofmIndex) + d = vloat->generator->getGeneratorX (oofmIndex) + vloat->generator->getStyle()->boxOffsetX (); break; @@ -1132,7 +1116,7 @@ int OOFFloatsMgr::getBorder (Side side, int y, int h, OOFAwareWidget *lastGB, // left border, see above). We have to calculate the difference // between the maximal widths. d = container->getMaxGeneratorWidth () - - (vloat->generator->getC0RelX (oofmIndex) + - (vloat->generator->getGeneratorX (oofmIndex) + vloat->generator->getMaxGeneratorWidth ()) + vloat->generator->getStyle()->boxRestWidth (); break; -- cgit v1.2.3