diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-10-16 18:00:45 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-10-17 18:02:33 +0200 |
commit | 2c541ea901369f0267921e1e73de0d74dd2a8fc9 (patch) | |
tree | 79c79bf07982d3872632ee63c4b916ccb2f27d10 /sw/qa | |
parent | 7d17e8e1798b7120b9e8559d042de2afc0a078e3 (diff) |
tdf#119885: OOXML import: try to get cell paddings as Word does
Change-Id: I7abd715b6bb71d6e2e01939c4cf849d94eb6a103
Reviewed-on: https://gerrit.libreoffice.org/61843
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/61877
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 13 | ||||
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport.cxx | 2 |
2 files changed, 13 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx index fcfea4083551..2c12311ac0e7 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx @@ -1119,7 +1119,18 @@ DECLARE_OOXMLEXPORT_TEST( testTableCellMargin, "table-cell-margin.docx" ) cellLeftMarginFromOffice[i], aLeftMargin - 0.5 * aLeftBorderLine.LineWidth, 1 ); // The 'a' in the fourth table should not be partly hidden by the border if ( i == 3 ) - CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Incorrect cell padding", 0.5 * aLeftBorderLine.LineWidth, aLeftMargin, 1 ); + { + CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Incorrect cell left padding", + 0.5 * aLeftBorderLine.LineWidth, aLeftMargin, 1); + // tdf#119885: cell's edit area must touch right border + sal_Int32 aRightMargin = -1; + xPropSet->getPropertyValue("RightBorderDistance") >>= aRightMargin; + uno::Any aRightBorder = xPropSet->getPropertyValue("RightBorder"); + table::BorderLine2 aRightBorderLine; + aRightBorder >>= aRightBorderLine; + CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Incorrect cell right padding", + 0.5 * aRightBorderLine.LineWidth, aRightMargin, 1); + } } } diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index c69529438e30..d187138ce93b 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -778,7 +778,7 @@ DECLARE_RTFEXPORT_TEST(testTdf84832, "tdf84832.docx") { uno::Reference<table::XCell> xCell = getCell(getParagraphOrTable(2), "A1"); // This was 0, as left padding wasn't exported. - CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(113)), + CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(108)), getProperty<sal_Int32>(xCell, "LeftBorderDistance")); } |