summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtfexport
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-12-20 16:07:00 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-12-20 17:56:44 +0100
commit989043b0644354b92fd17e4194897c2eb0935031 (patch)
tree7130776e30519eb3f2f362ca564fbf75d98ffbd3 /sw/qa/extras/rtfexport
parent270facec104ed1e0e4503de9391a29ae4c8b7dfd (diff)
tdf#129513: drop incorrect and redundant erasure of paragraph sprm
It was introduced in commit 2499397cb39330dabeb8b7b3e0d7eb6213a0d8f4 "avoid sending duplicated paragraph flags", and supposedly was meant to avoid having duplicating sprms in the collected properties, when new properties were pushed back at that time. Using specific sprm id was likely a mistake (nParam should have been used instead). Now the new sprm is added using RTFSprms::set with eOverwrite having default value of RTFOverwrite::YES, which takes care to avoid dupes, so the call to erase is redundant. This reverts commit 2499397cb39330dabeb8b7b3e0d7eb6213a0d8f4. Change-Id: Ied19f6feb41bd17ef317812d4d295ca0542a5843 Reviewed-on: https://gerrit.libreoffice.org/85602 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/qa/extras/rtfexport')
-rw-r--r--sw/qa/extras/rtfexport/data/tdf129513.rtf4
-rw-r--r--sw/qa/extras/rtfexport/rtfexport5.cxx11
2 files changed, 15 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/data/tdf129513.rtf b/sw/qa/extras/rtfexport/data/tdf129513.rtf
new file mode 100644
index 000000000000..cc39953491d9
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/tdf129513.rtf
@@ -0,0 +1,4 @@
+{\rtf1
+\trowd\cellx2000\pard\intbl\pagebb
+In table
+\cell\row\pard\par } \ No newline at end of file
diff --git a/sw/qa/extras/rtfexport/rtfexport5.cxx b/sw/qa/extras/rtfexport/rtfexport5.cxx
index 3b6af8c6801f..24553a0c2538 100644
--- a/sw/qa/extras/rtfexport/rtfexport5.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport5.cxx
@@ -1164,6 +1164,17 @@ DECLARE_RTFEXPORT_TEST(testTdf128320, "tdf128320.odt")
CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), nPos);
}
+DECLARE_RTFEXPORT_TEST(testTdf129513, "tdf129513.rtf")
+{
+ // \pagebb after \intbl must not reset the "in table" flag
+ CPPUNIT_ASSERT_EQUAL(2, getParagraphs());
+ // Make sure the first paragraph is imported in table
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable->getCellNames().getLength());
+ uno::Reference<text::XText> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(OUString("In table"), xCell->getString());
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */