diff options
author | Pierre-Eric Pelloux-Prayer <pierre-eric@lanedo.com> | 2012-11-06 13:49:27 +0100 |
---|---|---|
committer | Pierre-Eric Pelloux-Prayer <pierre-eric@lanedo.com> | 2012-11-06 16:15:46 +0100 |
commit | 7705a50ba330cd3fa08f5edfe6617d9acde8e8a5 (patch) | |
tree | cbc5f736dcc6a1ba961f0847a8b10d29417255a8 /writerfilter | |
parent | fdc76a03f50e1291a90035befac67b8205c7e770 (diff) |
docx import: round float value to int when computing cells width
Previously, truncating float to int was introducing accumulating
rounding errors, which lead to visible change in column widths.
Change-Id: I4557c716fba48dfd9a6c1c4d2cd0d0aa7aeae865
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapperTableManager.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index d3752c78998d..0038da2593d7 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -478,7 +478,7 @@ void DomainMapperTableManager::endOfRowAction() }while( --nGridCount ); sal_Int16 nRelPos = - sal::static_int_cast< sal_Int16 >(fGridWidth * nFullWidthRelative / nFullWidth ); + sal::static_int_cast< sal_Int16 >( round( fGridWidth * nFullWidthRelative / nFullWidth ) ); pSeparators[nBorder].Position = nRelPos + nLastRelPos; pSeparators[nBorder].IsVisible = sal_True; |