sc/source/ui/view/gridwin.cxx |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 69a020c19a5f1a8abe8a024abb73c862be2a762d
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Wed Nov 27 11:49:04 2024 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed Nov 27 13:11:25 2024 +0100

    PVS: V547 Expression 'bDouble' is always true
    
    Added in
    commit 96928bb74a993f3020ed71776d11b9849501f90c
    Author: Marco Cecchetti <marco.cecche...@collabora.com>
    Date:   Thu May 10 23:13:12 2018 +0200
    
        lok: sc: ctrl-clicking links doesn't work
    
    and became always true after
    commit 142d3e15916afd1c38bcccf0d23cac292ea357fc
    Author: Jan Holesovsky <ke...@collabora.com>
    Date:   Mon Oct 24 16:27:17 2022 +0200
    
        sc lok: Double-click should behave more like on desktop
    
    Change-Id: I5e36fe835088865a9caede88b8a690f070a3da9d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177403
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 42b906f66730..cdd7d2d7a464 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2510,8 +2510,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt 
)
     // double click (only left button)
 
     bool bIsTiledRendering = comphelper::LibreOfficeKit::isActive();
-    bool bDouble = ( rMEvt.GetClicks() == 2 && rMEvt.IsLeft() );
-    if ( bDouble
+    if ( (rMEvt.GetClicks() == 2 && rMEvt.IsLeft())
             && !bRefMode
             && (nMouseStatus == SC_GM_DBLDOWN || (bIsTiledRendering && 
nMouseStatus != SC_GM_URLDOWN))
             && !pScMod->IsRefDialogOpen())
@@ -2591,14 +2590,13 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& 
rMEvt )
             mrViewData.GetView()->SelectionChanged();
         }
 
-        if ( bDouble )
-            return;
+        return;
     }
 
             //      Links in edit cells
 
     bool bAlt = rMEvt.IsMod2();
-    if ( !bAlt && !bRefMode && !bDouble && nMouseStatus == SC_GM_URLDOWN )
+    if ( !bAlt && !bRefMode && nMouseStatus == SC_GM_URLDOWN )
     {
         //  Only execute on ButtonUp, if ButtonDown also was done on a URL
 
@@ -2748,7 +2746,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt 
)
     }
     mrViewData.GetViewShell()->SelectionChanged();
 
-    if (bIsTiledRendering && !bRefMode && !bDouble)
+    if (bIsTiledRendering && !bRefMode)
     {
         OUString aName, aUrl, aTarget;
         ScTabViewShell* pViewShell = mrViewData.GetViewShell();

Reply via email to