aboutsummaryrefslogtreecommitdiff
path: root/dw
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2013-11-18 20:52:07 +0100
committerSebastian Geerken <devnull@localhost>2013-11-18 20:52:07 +0100
commit9025bdb70c7d204c592170c192bd7cab8c579c84 (patch)
treeca598ef59fc9ba453c4835781135b93e17439aff /dw
parent9ec54d30159139ef7e66eefd24fbe601d7544b99 (diff)
parent4d1af64ac56cf2a7c43e602269e4e02eeb29ab13 (diff)
Merge with main repo.
Diffstat (limited to 'dw')
-rw-r--r--dw/table.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/dw/table.cc b/dw/table.cc
index 59a725f9..8be39fc3 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 deprecated 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++)