From 29cbbad64088354425c606f9eb6c267bdf7731dc Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 7 Nov 2014 10:13:08 +0100 Subject: DOCX import: fix rounding error in table cell widths Change-Id: I733fd4b998ba4d0bde2f91f2b3d76205f0dc8020 --- writerfilter/source/dmapper/DomainMapperTableManager.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'writerfilter') diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index 0caba6530041..15f439791582 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -34,6 +34,7 @@ #include #include #include +#include namespace writerfilter { namespace dmapper { @@ -745,8 +746,7 @@ void DomainMapperTableManager::endOfRowAction() for ( sal_Int32 nGridCount = *aSpansIter; nGridCount > 0; --nGridCount ) fGridWidth += (*pTableGrid.get())[nBorderGridIndex++]; - sal_Int16 nRelPos = - sal::static_int_cast< sal_Int16 >((fGridWidth * 10000) / nFullWidthRelative); + sal_Int16 nRelPos = rtl::math::round((fGridWidth * 10000) / nFullWidthRelative); pSeparators[nBorder].Position = nRelPos + nLastRelPos; pSeparators[nBorder].IsVisible = sal_True; -- cgit