sw/source/core/crsr/callnk.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit d1d9a96337abb7ae40bbd2660ea4d5933b09a001 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Jul 22 08:55:19 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Jul 22 17:30:45 2019 +0200 cid#1448433 Unintended comparison to logical negation Change-Id: I78488ff5b8087eabb4dd306f226defa2607b1660 Reviewed-on: https://gerrit.libreoffice.org/76096 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/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx index 358d0895ed67..41a119792efc 100644 --- a/sw/source/core/crsr/callnk.cxx +++ b/sw/source/core/crsr/callnk.cxx @@ -125,6 +125,8 @@ SwCallLink::~SwCallLink() COVERITY_NOEXCEPT_FALSE // attribute changes can be signaled over the link. pCNd->Add( &rShell ); + const bool bCurrentHasSelection = (*pCurrentCursor->GetPoint() != *pCurrentCursor->GetMark()); + if( nNdTyp != nNdWhich || nNode != nCurrentNode ) { // Every time a switch between nodes occurs, there is a chance that @@ -133,7 +135,7 @@ SwCallLink::~SwCallLink() COVERITY_NOEXCEPT_FALSE // That can be done in one go by the handler. rShell.CallChgLnk(); } - else if( !bHasSelection != (*pCurrentCursor->GetPoint() == *pCurrentCursor->GetMark()) ) + else if (bHasSelection != bCurrentHasSelection) { // always call change link when selection changes rShell.CallChgLnk(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits