diff options
author | László Németh <nemeth@numbertext.org> | 2020-01-14 12:56:54 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-01-15 22:26:32 +0100 |
commit | 62d084d50c0e6c90918f687251ffbb15264d7317 (patch) | |
tree | 73f7580bb61c2f7260f9d59fb420cf31305664a7 /sw/qa/extras/rtfimport/rtfimport.cxx | |
parent | 32c8e953662fa2cdbcf2a43f7c217f75b5a808c8 (diff) |
tdf#94801 DOCX import: fix table width loss by rounding
up the converted sum of table grid values. Small table
width loss (< 1/100 mm) could result big layout differences,
based on different line breaking etc.
When table width is calculated by sum of table grid widths,
now there is only a single conversion to 1/100 mm at the end,
with rounding up the width instead of rounding down.
Preventing regressions, both grid and cell width values are
stored in the original twip now, instead of converting them to
1/100 mm one by one.
Change-Id: I6f0755b6604f4976b8ecb25255c76fe6afd5e35b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86718
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa/extras/rtfimport/rtfimport.cxx')
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index a652b354dbe7..32ab5666ef0b 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -471,7 +471,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo55525) CPPUNIT_ASSERT_EQUAL(sal_Int32(-1877), getProperty<sal_Int32>(xTable, "LeftMargin")); // Cell width of A1 was 3332 (e.g. not set, 30% percent of total width) uno::Reference<table::XTableRows> xTableRows = xTable->getRows(); - CPPUNIT_ASSERT_EQUAL(sal_Int16(897), getProperty<uno::Sequence<text::TableColumnSeparator>>( + CPPUNIT_ASSERT_EQUAL(sal_Int16(896), getProperty<uno::Sequence<text::TableColumnSeparator>>( xTableRows->getByIndex(0), "TableColumnSeparators")[0] .Position); } |