diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-06-01 22:24:24 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-06-12 18:55:36 +0200 |
commit | d852a19e0f08596e1401f15ee1819e621bcbe202 (patch) | |
tree | 2d88ba376725a874614ef3051e03113328acda5a | |
parent | 83c70745b67e6d44e7a2c8e5992e568a2e3170d4 (diff) |
sw_redlinehide: convert GetNode() in SwFlowFrame::BwdMoveNecessary()
Change-Id: Iaefed6ebee4f4cf47697c174abc275b1287f643f
-rw-r--r-- | sw/source/core/layout/flowfrm.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 1dce5a5131ff..46af46fbe942 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -343,21 +343,28 @@ sal_uInt8 SwFlowFrame::BwdMoveNecessary( const SwPageFrame *pPage, const SwRect if( ULONG_MAX == nIndex ) { const SwNode *pNode; - if ( m_rThis.IsContentFrame() ) - pNode = static_cast<SwContentFrame&>(m_rThis).GetNode(); + if (m_rThis.IsTextFrame()) + pNode = static_cast<SwTextFrame&>(m_rThis).GetTextNodeFirst(); + else if (m_rThis.IsNoTextFrame()) + pNode = static_cast<SwNoTextFrame&>(m_rThis).GetNode(); else if( m_rThis.IsSctFrame() ) pNode = static_cast<SwSectionFormat*>(static_cast<SwSectionFrame&>(m_rThis). GetFormat())->GetSectionNode(); else { + assert(!m_rThis.IsContentFrame()); OSL_ENSURE( m_rThis.IsTabFrame(), "new FowFrame?" ); pNode = static_cast<SwTabFrame&>(m_rThis).GetTable()-> GetTabSortBoxes()[0]->GetSttNd()->FindTableNode(); } nIndex = pNode->GetIndex(); } - if( nIndex < nTmpIndex ) + if (nIndex < nTmpIndex && + (!m_rThis.IsTextFrame() || + !FrameContainsNode(static_cast<SwTextFrame&>(m_rThis), nTmpIndex))) + { continue; + } } } else |