summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-11-07 10:13:08 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-11-07 10:25:56 +0100
commit29cbbad64088354425c606f9eb6c267bdf7731dc (patch)
tree4b3ca6a0e6af96c895b7ba32547ad917b9c985e6 /writerfilter
parent8b8b0dfa1ce9015f0514feaa64234831972a5f1d (diff)
DOCX import: fix rounding error in table cell widths
Change-Id: I733fd4b998ba4d0bde2f91f2b3d76205f0dc8020
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 0caba6530041..15f439791582 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -34,6 +34,7 @@
#include <ooxml/resourceids.hxx>
#include <dmapperLoggers.hxx>
#include <dmapper/DomainMapper.hxx>
+#include <rtl/math.hxx>
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;