diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-03-11 21:40:44 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-03-12 08:43:22 +0100 |
commit | e502463fa9a601963aa9f5a8783eb1318de36c13 (patch) | |
tree | 5c24cbd991d6352e782557406c83a482ae956a8b /writerfilter | |
parent | af836fe33dd42c6043ef70f897c90c8b3ba826a7 (diff) |
tdf#123104 DOCX import: fix lack of vertical merge due to rounding
Regression from commit 29cbbad64088354425c606f9eb6c267bdf7731dc (DOCX
import: fix rounding error in table cell widths, 2014-11-07), which
changed truncation to rounding for the twips -> 1/10000th of relative
width conversion during import, but left export unchanged.
But adapting the export is not that easy: one part would be the
std::unique() call in
WW8TableNodeInfoInner::getColumnWidthsBasedOnAllRows() to not require
exact comparison, but doing so has it own side effects (multiple failing
tests).
So just revert the mentioned commit, as a minor rounding error is much
better than a broken vertical merge. And once it's clear how to adapt
export at the same time, this rounding on the import side can be
re-introduced.
Change-Id: I9e01ea5cc2c2f8aabe1e21cb8118c9c0e2c45494
Reviewed-on: https://gerrit.libreoffice.org/69065
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapperTableManager.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index 94cf9ca8f9f7..ffee824e6973 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -664,7 +664,8 @@ void DomainMapperTableManager::endOfRowAction() for ( sal_Int32 nGridCount = *aSpansIter; nGridCount > 0; --nGridCount ) fGridWidth += (*pTableGrid)[nBorderGridIndex++]; - sal_Int16 nRelPos = rtl::math::round((fGridWidth * 10000) / nFullWidthRelative); + sal_Int16 nRelPos = + sal::static_int_cast< sal_Int16 >((fGridWidth * 10000) / nFullWidthRelative); pSeparators[nBorder].Position = nRelPos + nLastRelPos; pSeparators[nBorder].IsVisible = true; |