summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-07-22 08:55:19 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-07-22 17:30:45 +0200
commitd1d9a96337abb7ae40bbd2660ea4d5933b09a001 (patch)
tree3e1c83b0f59f5000168eeb6ad92c7a54362632e8 /sw
parent7baea495ca02d8b5e0b636e83f2388bed5b48939 (diff)
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 <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/crsr/callnk.cxx4
1 files changed, 3 insertions, 1 deletions
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();