sc/source/ui/view/tabview3.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6a7daa7ece8442e70351eea071bddbe0d24803de
Author:     Justin Luth <justin_l...@sil.org>
AuthorDate: Mon Dec 13 13:59:11 2021 +0200
Commit:     Justin Luth <jl...@mail.com>
CommitDate: Mon Dec 13 17:11:40 2021 +0100

    NFC simplify sc: !(!A() const || B)  is  !B && A()
    
    Not new AND Is the same tab
    is much easier to wrap your mind around than
    Not (Not the same tab OR New)
    
    Plus it allows avoiding a (trivial) const function call.
    
    Change-Id: Ie0d8a1e490fc3dffe6fc87c9b4d9bd1c41d34dc8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126733
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <jl...@mail.com>

diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index a500d5fe03ab..d1543b22cfe6 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -1803,7 +1803,7 @@ void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool 
bExtendSelection, bool bSa
         return;
     }
 
-    if ( !(nTab != aViewData.GetTabNo() || bNew) )
+    if (!bNew && nTab == aViewData.GetTabNo())
         return;
 
     // FormShell would like to be informed before the switch

Reply via email to