summaryrefslogtreecommitdiff
path: root/sw/source/core/layout
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-22 09:42:26 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-22 13:07:53 +0200
commitf8f8cfff0d5805cdbbc088ca66b42fd96f2a32b7 (patch)
tree0e58b611155aae11ca7edf667a141d88503ec2e0 /sw/source/core/layout
parent920bf3979cd7421110b65621635aefc072e8a779 (diff)
pvs-studio: silence V649 dubious Two identical 'if' statements
Change-Id: I303b4db52e852011d45a147f3010a8f934c1f77b Reviewed-on: https://gerrit.libreoffice.org/62167 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/core/layout')
-rw-r--r--sw/source/core/layout/trvlfrm.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 5a5da9abc580..1dda19b28375 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -214,7 +214,9 @@ bool SwPageFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint,
pCMS->m_bStop = true;
return false;
}
+
const SwContentFrame *pCnt = GetContentPos( aPoint, false, false, pCMS, false );
+ // GetContentPos may have modified pCMS
if ( pCMS && pCMS->m_bStop )
return false;
@@ -1185,7 +1187,7 @@ static const SwLayoutFrame* lcl_Inside( const SwContentFrame *pCnt, Point const
const SwContentFrame *SwLayoutFrame::GetContentPos( Point& rPoint,
const bool bDontLeave,
const bool bBodyOnly,
- const SwCursorMoveState *pCMS,
+ SwCursorMoveState *pCMS,
const bool bDefaultExpand ) const
{
//Determine the first ContentFrame.
@@ -1330,7 +1332,7 @@ const SwContentFrame *SwLayoutFrame::GetContentPos( Point& rPoint,
const SwTabFrame *pTab = pActual->FindTabFrame();
if ( pTab->IsFollow() && pTab->IsInHeadline( *pActual ) )
{
- const_cast<SwCursorMoveState*>(pCMS)->m_bStop = true;
+ pCMS->m_bStop = true;
return nullptr;
}
}