diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-04-07 08:49:15 +0200 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-04-07 08:49:15 +0200 |
commit | 74fa61e8d3181aad661869be13f8916aea61b59c (patch) | |
tree | 9fdc9e78645e3fd6a841f2c0b12e395575c4fe92 /svtools | |
parent | ea3188de3f10ca22f5b859ec1eeef6ea0d2db59b (diff) |
gridfixes: impl_ni_calculateColumnWidths: re-calculate the proper values for distributePixel/takeAwayPixel before finally using it to correct the rounding errors
Diffstat (limited to 'svtools')
-rwxr-xr-x | svtools/source/table/tablecontrol_impl.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 2983b6c667ea..870fef025ee7 100755 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -1072,6 +1072,7 @@ namespace svt { namespace table while ( startOver ); // are there pixels left (might be caused by rounding errors)? + distributePixel = gridWidthPixel - ::std::accumulate( o_newColWidthsPixel.begin(), o_newColWidthsPixel.end(), 0 ); while ( ( distributePixel > 0 ) && ( flexibleColumnCount > 0 ) ) { // yes => ignore relative flexibilities, and subsequently distribute single pixels to all flexible @@ -1146,6 +1147,7 @@ namespace svt { namespace table while ( startOver ); // are there pixels left (might be caused by rounding errors)? + takeAwayPixel = ::std::accumulate( o_newColWidthsPixel.begin(), o_newColWidthsPixel.end(), 0 ) - gridWidthPixel; while ( ( takeAwayPixel > 0 ) && ( flexibleColumnCount > 0 ) ) { // yes => ignore relative flexibilities, and subsequently take away pixels from all flexible |