sw/source/core/inc/layfrm.hxx | 2 +- sw/source/core/layout/trvlfrm.cxx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-)
New commits: commit f8f8cfff0d5805cdbbc088ca66b42fd96f2a32b7 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Oct 22 09:42:26 2018 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Oct 22 13:07:53 2018 +0200 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 <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx index 4e7d210c0fff..92fc189fba8a 100644 --- a/sw/source/core/inc/layfrm.hxx +++ b/sw/source/core/inc/layfrm.hxx @@ -90,7 +90,7 @@ public: */ const SwContentFrame* GetContentPos( Point &rPoint, const bool bDontLeave, const bool bBodyOnly = false, - const SwCursorMoveState *pCMS = nullptr, + SwCursorMoveState *pCMS = nullptr, const bool bDefaultExpand = true ) const; SwLayoutFrame( SwFrameFormat*, SwFrame* ); 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; } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits