[Libreoffice-commits] core.git: vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Oct 22 10:43:28 UTC 2018


 vcl/source/window/menu.cxx |   25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

New commits:
commit 5c147fc5fe0e77838b8e9bebd4ff215a80946980
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Sun Oct 21 23:00:35 2018 +0200
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Oct 22 12:43:08 2018 +0200

    tdf#120703 (PVS): Recurring check.
    
    V571 The '!aDelData.isDeleted()' condition was already verified in line 359.
    
    Change-Id: Ie66aa65c024e30d34a4b0766ddad3fa24ce98644
    Reviewed-on: https://gerrit.libreoffice.org/62163
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index ba1138205a29..bcbca81b7c01 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -356,19 +356,18 @@ void Menu::Select()
     ImplMenuDelData aDelData( this );
 
     ImplCallEventListeners( VclEventId::MenuSelect, GetItemPos( GetCurItemId() ) );
-    if ( !aDelData.isDeleted() && !aSelectHdl.Call( this ) )
-    {
-        if( !aDelData.isDeleted() )
-        {
-            Menu* pStartMenu = ImplGetStartMenu();
-            if ( pStartMenu && ( pStartMenu != this ) )
-            {
-                pStartMenu->nSelectedId = nSelectedId;
-                pStartMenu->sSelectedIdent = sSelectedIdent;
-                pStartMenu->aSelectHdl.Call( this );
-            }
-        }
-    }
+    if (aDelData.isDeleted())
+        return;
+    if (aSelectHdl.Call(this))
+        return;
+    if (aDelData.isDeleted())
+        return;
+    Menu* pStartMenu = ImplGetStartMenu();
+    if (!pStartMenu || (pStartMenu == this))
+        return;
+    pStartMenu->nSelectedId = nSelectedId;
+    pStartMenu->sSelectedIdent = sSelectedIdent;
+    pStartMenu->aSelectHdl.Call( this );
 }
 
 #if defined(MACOSX)


More information about the Libreoffice-commits mailing list