summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2016-07-28 02:31:50 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2016-09-27 16:22:04 +0200
commitd215d0003ce3c75a6c0b2e729b2fa7eab30b7762 (patch)
tree8e107d3cb83a86a0b962be08b609a3d0ba00333e
parent6d66c353fb7ea7d47af2404e7e66cef0f6a690c3 (diff)
Revert "tdf#59454 RTF import: handle section break right before a table"feature/cib_contract101
This reverts commit e57752170e604c85a6fe8aeaa38784796e00bab1. Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx Change-Id: Ifb8234338ed2854c1716d7690e9218792eb7730c
-rw-r--r--sw/qa/extras/rtfimport/data/tdf59454.rtf8
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx6
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx18
3 files changed, 0 insertions, 32 deletions
diff --git a/sw/qa/extras/rtfimport/data/tdf59454.rtf b/sw/qa/extras/rtfimport/data/tdf59454.rtf
deleted file mode 100644
index b10820ad979a..000000000000
--- a/sw/qa/extras/rtfimport/data/tdf59454.rtf
+++ /dev/null
@@ -1,8 +0,0 @@
-{\rtf1
-foo\par
-\sect\sectd
-\trowd\cellx980\cellx11480\cellx14000\pard\plain \intbl\itap1\s33\qj\hyphpar1 \fs24 \qc\hyphpar1 A1\cell
-\pard\plain \intbl\itap1\s33\qj\hyphpar1 \fs24 \qc\hyphpar1 B1\cell
-\pard\plain \intbl\itap1\s33\qj\hyphpar1 \fs24 \qc\hyphpar1 C1\cell
-\trowd\cellx980\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clvertalt\cellx11480\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clvertalt\cellx14000\row
-\pard\plain bar\par }
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 5242f85e5609..64e32551e18b 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -2394,12 +2394,6 @@ DECLARE_RTFIMPORT_TEST(testTdf94435, "tdf94435.rtf")
CPPUNIT_ASSERT_EQUAL(style::ParagraphAdjust_CENTER, static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(getParagraph(1), "ParaAdjust")));
}
-DECLARE_RTFIMPORT_TEST(testTdf59454, "tdf59454.rtf")
-{
- // This was 1, section break was ignored right before a table.
- CPPUNIT_ASSERT_EQUAL(2, getPages());
-}
-
DECLARE_RTFIMPORT_TEST(testLndscpsxn, "lndscpsxn.rtf")
{
// Check landscape flag.
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index a48577fc6c27..cc4591637108 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2192,15 +2192,6 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
{
parBreak();
// Not in table? Reset max width.
- if (m_nCellxMax)
- {
- // Was in table, but not anymore -> tblEnd.
- RTFSprms aAttributes;
- RTFSprms aSprms;
- aSprms.set(NS_ooxml::LN_tblEnd, std::make_shared<RTFValue>(1));
- writerfilter::Reference<Properties>::Pointer_t pProperties = std::make_shared<RTFReferenceProperties>(aAttributes, aSprms);
- Mapper().props(pProperties);
- }
m_nCellxMax = 0;
}
else if (m_aStates.top().eDestination != Destination::SHAPETEXT)
@@ -4333,15 +4324,6 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
m_aStates.top().aTableCellAttributes = m_aDefaultState.aTableCellAttributes;
// We assume text after a row definition always belongs to the table, to handle text before the real INTBL token
dispatchFlag(RTF_INTBL);
- if (!m_nCellxMax)
- {
- // Wasn't in table, but now is -> tblStart.
- RTFSprms aAttributes;
- RTFSprms aSprms;
- aSprms.set(NS_ooxml::LN_tblStart, std::make_shared<RTFValue>(1));
- writerfilter::Reference<Properties>::Pointer_t pProperties = std::make_shared<RTFReferenceProperties>(aAttributes, aSprms);
- Mapper().props(pProperties);
- }
m_nCellxMax = std::max(m_nCellxMax, nParam);
}
break;