Kaydet (Commit) 5deceaba authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud Kaydeden (comit) Miklos Vajna

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/555Reviewed-by: 's avatarMiklos Vajna <vmiklos@suse.cz>
Tested-by: 's avatarMiklos Vajna <vmiklos@suse.cz>
üst c1c12bd1
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment