diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-09-03 19:20:28 -0500 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-09-14 07:56:36 +0000 |
commit | 5deceabaa6859e136c1954f56556ee5d0cd599f8 (patch) | |
tree | 2fbfa1223f78ad49e22e8ddab1188871daa9d07e /svtools | |
parent | c1c12bd160099bb4061aad814368192e396adc3d (diff) |
gridfixes: impl_ni_calculateColumnWidths: re-calculate the proper values
for distributePixel/takeAwayPixel before finally using it to correct
the rounding errors
Change-Id: I6f3b178400db0696df0289331be94d69f1d4f0d2
Reviewed-on: https://gerrit.libreoffice.org/555
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
Diffstat (limited to 'svtools')
-rw-r--r-- | 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 17bf7716a64d..26ee5d00a298 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -1069,6 +1069,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 @@ -1143,6 +1144,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 |