diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-04-18 11:29:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-04-18 17:13:24 +0200 |
commit | 453e6fb7c1827d317dc775df32a6cf91b2bb5a67 (patch) | |
tree | 453000952f3294933ff88efc0f9d7ced933c4459 | |
parent | 228723ea962e33b472317b41f31b032421879093 (diff) |
forcepoint#79 FindStartEndOfRowSpanCell returning null
Change-Id: I85f5b17b7dc2d3c4dfef92f64451fab451f58112
Reviewed-on: https://gerrit.libreoffice.org/70927
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/qa/extras/layout/data/forcepoint79-1.doc | bin | 0 -> 32256 bytes | |||
-rw-r--r-- | sw/qa/extras/layout/layout.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/layout/findfrm.cxx | 10 |
3 files changed, 7 insertions, 6 deletions
diff --git a/sw/qa/extras/layout/data/forcepoint79-1.doc b/sw/qa/extras/layout/data/forcepoint79-1.doc Binary files differnew file mode 100644 index 000000000000..ba53db79f278 --- /dev/null +++ b/sw/qa/extras/layout/data/forcepoint79-1.doc diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx index e44acc8ba1c0..91705c8e18d9 100644 --- a/sw/qa/extras/layout/layout.cxx +++ b/sw/qa/extras/layout/layout.cxx @@ -2564,6 +2564,9 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint75) //just care it doesn't crash/assert CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint76) { createDoc("forcepoint76-1.rtf"); } +//just care it doesn't crash/assert +CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint79) { createDoc("forcepoint79-1.doc"); } + CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf118058) { SwDoc* pDoc = createDoc("tdf118058.fodt"); diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx index 7a411d549ba6..1e98e7549947 100644 --- a/sw/source/core/layout/findfrm.cxx +++ b/sw/source/core/layout/findfrm.cxx @@ -1668,8 +1668,6 @@ SwCellFrame* SwCellFrame::GetPreviousCell() const // --> NEW TABLES const SwCellFrame& SwCellFrame::FindStartEndOfRowSpanCell( bool bStart ) const { - const SwCellFrame* pRet = nullptr; - const SwTabFrame* pTableFrame = dynamic_cast<const SwTabFrame*>(GetUpper()->GetUpper()); if ( !bStart && pTableFrame && pTableFrame->IsFollow() && pTableFrame->IsInHeadline( *this ) ) @@ -1726,17 +1724,17 @@ const SwCellFrame& SwCellFrame::FindStartEndOfRowSpanCell( bool bStart ) const if ( pMasterTable == pTableFrame ) { - pRet = pMasterCell; - break; + return *pMasterCell; } } } } - assert(pRet && "SwCellFrame::FindStartRowSpanCell: No result"); + SAL_WARN("sw.core", "SwCellFrame::FindStartRowSpanCell: No result"); - return *pRet; + return *this; } + // <-- NEW TABLES const SwRowFrame* SwFrame::IsInSplitTableRow() const |