Kaydet (Commit) f8f8cfff authored tarafından Caolán McNamara's avatar Caolán McNamara

pvs-studio: silence V649 dubious Two identical 'if' statements

Change-Id: I303b4db52e852011d45a147f3010a8f934c1f77b
Reviewed-on: https://gerrit.libreoffice.org/62167
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 920bf397
...@@ -90,7 +90,7 @@ public: ...@@ -90,7 +90,7 @@ public:
*/ */
const SwContentFrame* GetContentPos( Point &rPoint, const bool bDontLeave, const SwContentFrame* GetContentPos( Point &rPoint, const bool bDontLeave,
const bool bBodyOnly = false, const bool bBodyOnly = false,
const SwCursorMoveState *pCMS = nullptr, SwCursorMoveState *pCMS = nullptr,
const bool bDefaultExpand = true ) const; const bool bDefaultExpand = true ) const;
SwLayoutFrame( SwFrameFormat*, SwFrame* ); SwLayoutFrame( SwFrameFormat*, SwFrame* );
......
...@@ -214,7 +214,9 @@ bool SwPageFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint, ...@@ -214,7 +214,9 @@ bool SwPageFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint,
pCMS->m_bStop = true; pCMS->m_bStop = true;
return false; return false;
} }
const SwContentFrame *pCnt = GetContentPos( aPoint, false, false, pCMS, false ); const SwContentFrame *pCnt = GetContentPos( aPoint, false, false, pCMS, false );
// GetContentPos may have modified pCMS
if ( pCMS && pCMS->m_bStop ) if ( pCMS && pCMS->m_bStop )
return false; return false;
...@@ -1185,7 +1187,7 @@ static const SwLayoutFrame* lcl_Inside( const SwContentFrame *pCnt, Point const ...@@ -1185,7 +1187,7 @@ static const SwLayoutFrame* lcl_Inside( const SwContentFrame *pCnt, Point const
const SwContentFrame *SwLayoutFrame::GetContentPos( Point& rPoint, const SwContentFrame *SwLayoutFrame::GetContentPos( Point& rPoint,
const bool bDontLeave, const bool bDontLeave,
const bool bBodyOnly, const bool bBodyOnly,
const SwCursorMoveState *pCMS, SwCursorMoveState *pCMS,
const bool bDefaultExpand ) const const bool bDefaultExpand ) const
{ {
//Determine the first ContentFrame. //Determine the first ContentFrame.
...@@ -1330,7 +1332,7 @@ const SwContentFrame *SwLayoutFrame::GetContentPos( Point& rPoint, ...@@ -1330,7 +1332,7 @@ const SwContentFrame *SwLayoutFrame::GetContentPos( Point& rPoint,
const SwTabFrame *pTab = pActual->FindTabFrame(); const SwTabFrame *pTab = pActual->FindTabFrame();
if ( pTab->IsFollow() && pTab->IsInHeadline( *pActual ) ) if ( pTab->IsFollow() && pTab->IsInHeadline( *pActual ) )
{ {
const_cast<SwCursorMoveState*>(pCMS)->m_bStop = true; pCMS->m_bStop = true;
return nullptr; return nullptr;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment