From 8cd7a4c4d26753499413b6223a9c0a51588a2a73 Mon Sep 17 00:00:00 2001 From: Sebastian Geerken Date: Mon, 18 Nov 2013 18:52:13 +0100 Subject: Fix related to recent "multiplyWithPerLength" change. --- dw/table.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'dw') diff --git a/dw/table.cc b/dw/table.cc index 59a725f9..dcbc4b4a 100644 --- a/dw/table.cc +++ b/dw/table.cc @@ -799,10 +799,14 @@ void Table::forceCalcColumnExtremes () curExtraW -= d_w; curAppW -= d_a; } else { - if (colPercents->get(i) > 0.0f) { + if (core::style::isPerLength (colPercents->get(i))) { + // multiplyWithPerLength would cause rounding errors, + // therefore the depricicated way, using perLengthVal: wMin = misc::max (colExtremes->getRef(i)->minWidth, - (int)(availSpanMinW - * colPercents->get(i)/cumSpanPercent)); + (int)(availSpanMinW * + core::style::perLengthVal + (colPercents->get (i)) + / cumSpanPercent)); colExtremes->getRef(i)->minWidth = wMin; } } @@ -1091,7 +1095,7 @@ void Table::apportion_percentages2(int totalWidth, int forceTotalWidth) #ifdef DBG MSG("APP_P, percent={"); for (int col = 0; col < numCols; col++) - MSG("%f ", core::dw::_getPerVal (colPercents->get(col))); + MSG("%f ", core::dw::perLengthVal (colPercents->get(col))); MSG("}\n"); MSG("APP_P, result ={ "); for (int col = 0; col < numCols; col++) -- cgit v1.2.3 From 4d1af64ac56cf2a7c43e602269e4e02eeb29ab13 Mon Sep 17 00:00:00 2001 From: Sebastian Geerken Date: Mon, 18 Nov 2013 20:51:17 +0100 Subject: Typo. --- dw/table.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dw') diff --git a/dw/table.cc b/dw/table.cc index dcbc4b4a..8be39fc3 100644 --- a/dw/table.cc +++ b/dw/table.cc @@ -801,7 +801,7 @@ void Table::forceCalcColumnExtremes () } else { if (core::style::isPerLength (colPercents->get(i))) { // multiplyWithPerLength would cause rounding errors, - // therefore the depricicated way, using perLengthVal: + // therefore the deprecated way, using perLengthVal: wMin = misc::max (colExtremes->getRef(i)->minWidth, (int)(availSpanMinW * core::style::perLengthVal -- cgit v1.2.3