diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-05-25 12:30:18 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-05-25 14:45:20 +0000 |
commit | db1a4f8d1d44351ca65742d3d94371a0c0536ff2 (patch) | |
tree | 3d4b8806ac209f67844c8bb12bda06ae68fae65a /sw | |
parent | 401c2105be6d66e5c7ed436558a9a6c41cce4aae (diff) |
tdf#74795 RTF import: handle row-level default cell margins
Change-Id: I5bdd7b8624a9e2ac1aef963ccc5ed457ebda3f84
Reviewed-on: https://gerrit.libreoffice.org/25443
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtfimport/data/tdf74795.rtf | 13 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 12 |
2 files changed, 25 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/tdf74795.rtf b/sw/qa/extras/rtfimport/data/tdf74795.rtf new file mode 100644 index 000000000000..6db300890a7b --- /dev/null +++ b/sw/qa/extras/rtfimport/data/tdf74795.rtf @@ -0,0 +1,13 @@ +{\rtf1\ansi\deff4\adeflang1025 +\trowd\trpaddfl3\trpaddl360\cellx4819\cellx9638 +\pard\plain\intbl +{first cell} +\cell\pard\plain\intbl +{second cell} +\cell\row\pard +\trowd\cellx4819\cellx9638 +\pard\plain +\cell\pard\plain +\intbl +\cell\row\pard\plain after. +\par } diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 309f79a2cc97..2af36e6755ee 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -2607,6 +2607,18 @@ DECLARE_RTFIMPORT_TEST(testTdf82073, "tdf82073.rtf") CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(xCell, "BackColor")); } +DECLARE_RTFIMPORT_TEST(testTdf74795, "tdf74795.rtf") +{ + uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY); + uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY); + // This was 0, \trpaddl was ignored on import. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(635), getProperty<sal_Int32>(xCell, "LeftBorderDistance")); + + xCell.set(xTable->getCellByName("A2"), uno::UNO_QUERY); + // Make sure that the scope of the default is only one row. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(xCell, "LeftBorderDistance")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |