sw/qa/extras/rtfexport/data/tdf129513.rtf | 4 ++++ sw/qa/extras/rtfexport/rtfexport5.cxx | 11 +++++++++++ writerfilter/source/rtftok/rtfdispatchflag.cxx | 1 - 3 files changed, 15 insertions(+), 1 deletion(-)
New commits: commit 1a4ede180585531f0bbabb877677b0e3b0319ee3 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Fri Dec 20 16:07:00 2019 +0300 Commit: Xisco Faulí <xiscofa...@libreoffice.org> CommitDate: Thu Jan 9 10:01:48 2020 +0100 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. Reviewed-on: https://gerrit.libreoffice.org/85602 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> (cherry picked from commit 989043b0644354b92fd17e4194897c2eb0935031) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85742 Reviewed-by: Xisco Faulí <xiscofa...@libreoffice.org> Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org> Change-Id: Ied19f6feb41bd17ef317812d4d295ca0542a5843 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86418 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofa...@libreoffice.org> 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 7c734c42a932..2143d5868cdd 100644 --- a/sw/qa/extras/rtfexport/rtfexport5.cxx +++ b/sw/qa/extras/rtfexport/rtfexport5.cxx @@ -1143,6 +1143,17 @@ DECLARE_RTFEXPORT_TEST(testTdf116371, "tdf116371.odt") CPPUNIT_ASSERT_DOUBLES_EQUAL(4700.0, getProperty<double>(xShape, "RotateAngle"), 10); } +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: */ diff --git a/writerfilter/source/rtftok/rtfdispatchflag.cxx b/writerfilter/source/rtftok/rtfdispatchflag.cxx index 3ea7872d52a1..f495db2b82d5 100644 --- a/writerfilter/source/rtftok/rtfdispatchflag.cxx +++ b/writerfilter/source/rtftok/rtfdispatchflag.cxx @@ -435,7 +435,6 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) if (nParam >= 0) { auto pValue = new RTFValue(1); - m_aStates.top().getParagraphSprms().erase(NS_ooxml::LN_inTbl); m_aStates.top().getParagraphSprms().set(nParam, pValue); return RTFError::OK; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits