diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-05-18 09:04:40 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-05-18 10:20:13 +0000 |
commit | ceaa06bc7153387238eead0a69d874ed35241793 (patch) | |
tree | 4e08dd31327480e5cfc0fe12274c4f4e9c10c23b /sw | |
parent | 1dec3cb29bd7ec028d6b2139d0199225b5cf5d67 (diff) |
tdf#82073 RTF import: handle \clcbpatraw
Quoting the RTF spec: "Same as \clcbpatN for use with table styles."
Change-Id: Icdb89bac5b41036dadb1901f18aeb21ef2512908
Reviewed-on: https://gerrit.libreoffice.org/25077
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtfimport/data/tdf82073.rtf | 9 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 8 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/tdf82073.rtf b/sw/qa/extras/rtfimport/data/tdf82073.rtf new file mode 100644 index 000000000000..79d9734de76c --- /dev/null +++ b/sw/qa/extras/rtfimport/data/tdf82073.rtf @@ -0,0 +1,9 @@ +{\rtf1 +{\colortbl;\red0\green0\blue0;} +\pard\plain first line\par +\pard\plain\trowd \clcbpatraw1 \cellx5490\clcbpatraw1 \cellx9360\pard\plain +{A1 \cell} +{A2 \cell} +\row +\pard\plain last line\par +} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 21ce04cca4ad..309f79a2cc97 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -2599,6 +2599,14 @@ DECLARE_RTFIMPORT_TEST(testTdf96275, "tdf96275.rtf") CPPUNIT_ASSERT_EQUAL(OUString("Frame"), getProperty<OUString>(getRun(xParagraph, 1), "TextPortionType")); } +DECLARE_RTFIMPORT_TEST(testTdf82073, "tdf82073.rtf") +{ + uno::Reference<text::XTextTable> xTable(getParagraphOrTable(2), uno::UNO_QUERY); + uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY); + // This was -1: the background color was automatic, not black. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(xCell, "BackColor")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |