diff options
author | Pierre-Eric Pelloux-Prayer <pierre-eric@lanedo.com> | 2012-11-06 13:49:27 +0100 |
---|---|---|
committer | Pierre-Eric Pelloux-Prayer <pierre-eric@lanedo.com> | 2012-11-06 16:15:46 +0100 |
commit | 7705a50ba330cd3fa08f5edfe6617d9acde8e8a5 (patch) | |
tree | cbc5f736dcc6a1ba961f0847a8b10d29417255a8 /sw | |
parent | fdc76a03f50e1291a90035befac67b8205c7e770 (diff) |
docx import: round float value to int when computing cells width
Previously, truncating float to int was introducing accumulating
rounding errors, which lead to visible change in column widths.
Change-Id: I4557c716fba48dfd9a6c1c4d2cd0d0aa7aeae865
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index d19760fc823b..33112d4e7ed0 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1013,8 +1013,8 @@ void Test::testN785767() uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY); uno::Reference<table::XTableRows> xTableRows(xTextTable->getRows(), uno::UNO_QUERY); // Check the A1 and B1 cells, the width of both of them was the default value (10000 / 9, as there were 9 cells in the row). - CPPUNIT_ASSERT_EQUAL(sal_Int16(36), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators")[0].Position); - CPPUNIT_ASSERT_EQUAL(sal_Int16(978), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(1), "TableColumnSeparators")[0].Position); + CPPUNIT_ASSERT_MESSAGE("A1 must not have default width", sal_Int16(10000 / 9) != getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators")[0].Position); + CPPUNIT_ASSERT_MESSAGE("B1 must not have default width", sal_Int16(10000 / 9) != getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(1), "TableColumnSeparators")[0].Position); } CPPUNIT_TEST_SUITE_REGISTRATION(Test); |