diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-04-20 09:12:36 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-04-20 10:43:42 +0200 |
commit | 41bc9d4d467495c9fbf05c920a41fa299ac0ace3 (patch) | |
tree | 16445e387a497aa51166aeb2e5a3c888cf98a1b8 /sw/qa/extras | |
parent | 7bcea5c8bae73d289c5203cbc51f70605c3a3599 (diff) |
Related: tdf#106690 DOCX import: don't reduce auto-space accross cells
As suggested at <https://gerrit.libreoffice.org/#/c/36142/>, and it
indeed matches the Word behavior.
Change-Id: I1ba5b70fc5a7acab52fa4baf816e9f6cd2f913ba
Reviewed-on: https://gerrit.libreoffice.org/36719
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf106690-cell.docx | bin | 0 -> 14385 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf106690-cell.docx b/sw/qa/extras/ooxmlexport/data/tdf106690-cell.docx Binary files differnew file mode 100644 index 000000000000..e2ea6f4b0931 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf106690-cell.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx index a7d53cf39661..3311f1b68184 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx @@ -70,6 +70,18 @@ DECLARE_OOXMLEXPORT_TEST(testTdf106690, "tdf106690.docx") CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(494), getProperty<sal_Int32>(getParagraph(2), "ParaTopMargin")); } +DECLARE_OOXMLEXPORT_TEST(testTdf106690Cell, "tdf106690-cell.docx") +{ + uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY); + uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY); + uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY); + // This was 0, bottom margin of the second paragraph in the A1 table cell + // had a reduced auto-space, just because of a next paragraph in the A2 + // cell. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(494), getProperty<sal_Int32>(getParagraphOfText(2, xCell->getText()), "ParaBottomMargin")); +} + DECLARE_OOXMLEXPORT_TEST(testTdf106970, "tdf106970.docx") { // The second paragraph (first numbered one) had 0 bottom margin: |