summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorBakos Attila <bakos.attilakaroly@nisz.hu>2019-11-05 15:30:22 +0100
committerLászló Németh <nemeth@numbertext.org>2019-11-09 18:20:27 +0100
commitc401aa9f632758157021c2c45c5cc4d00ee12dab (patch)
tree4f09134cb701f283a7c16695c476fb8184abd8c6 /writerfilter
parent6070ef641f56cb826df884fdd846882c39a01342 (diff)
tdf124367 DOCX import: fix rounding error in table cell widths
Follow-up of commit 29cbbad64088354425c606f9eb6c267bdf7731dc (DOCX import: fix rounding error in table cell widths), its revert in commit e502463fa9a601963aa9f5a8783eb1318de36c13 (tdf#123104 DOCX import: fix lack of vertical merge due to rounding) and commit 44e44239de35c1548809c96e13bfa9d64c7ca441 (tdf#120315 DOCX import: fix cells merged vertically). Change-Id: Id85e8fd25dba26af77fe2fd3024db2ae834b5052 Reviewed-on: https://gerrit.libreoffice.org/82072 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org> Tested-by: Jenkins
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index e09dd45f1642..e29637583631 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -666,9 +666,9 @@ void DomainMapperTableManager::endOfRowAction()
for ( sal_Int32 nGridCount = *aSpansIter; nGridCount > 0; --nGridCount )
fGridWidth += (*pTableGrid)[nBorderGridIndex++];
- double nRelPos = static_cast<double>((fGridWidth * 10000) / nFullWidthRelative);
+ double nRelPos = (fGridWidth * 10000) / nFullWidthRelative;
- pSeparators[nBorder].Position = sal::static_int_cast< sal_Int16 >( nRelPos + nLastRelPos );
+ pSeparators[nBorder].Position = rtl::math::round(nRelPos + nLastRelPos);
pSeparators[nBorder].IsVisible = true;
nLastRelPos = nLastRelPos + nRelPos;
++aSpansIter;