lok: sc: ctrl-clicking links doesn't work
authorMarco Cecchetti <marco.cecchetti@collabora.com>
Thu, 10 May 2018 21:13:12 +0000 (23:13 +0200)
committerBastien Roucariès <rouca@debian.org>
Fri, 29 Dec 2023 09:39:36 +0000 (09:39 +0000)
I think there is no reason for not execuring the code below

if ((bDouble || bIsTiledRendering) && .... ) { ... }

for both desktop and online.

So since the code for open the clicked URL is below such if
clause, I changed the code so that we return only when it's really a
double click event.

Moreover I reverted back the code for executing the list validation
pop-up to its original place, since there is no more the need to have
it executed in two places.

Change-Id: Idbec2e6e45cd7ee8282005169e1132a11d4cac33
Reviewed-on: https://gerrit.libreoffice.org/54151
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Gbp-Pq: Name 0088-lok-sc-ctrl-clicking-links-doesn-t-work.patch

editeng/source/editeng/impedit2.cxx
include/vcl/ITiledRenderable.hxx
sc/source/core/data/global.cxx
sc/source/ui/view/gridwin.cxx

index cd48e92ad4c9948ff8a7d5425e069f9371bd0c23..380ee0343bc6a07dca180bf33f721301725a05e1 100644 (file)
@@ -587,7 +587,17 @@ bool ImpEditEngine::MouseButtonUp( const MouseEvent& rMEvt, EditView* pView )
     {
         if ( ( rMEvt.GetClicks() == 1 ) && rMEvt.IsLeft() && !rMEvt.IsMod2() )
         {
-            const SvxFieldItem* pFld = pView->GetFieldUnderMousePointer();
+
+            const SvxFieldItem* pFld;
+            if ( comphelper::LibreOfficeKit::isActive() )
+            {
+                Point aLogicClick = pView->GetWindow()->PixelToLogic( rMEvt.GetPosPixel() );
+                pFld = pView->GetField( aLogicClick );
+            }
+            else
+            {
+                pFld = pView->GetFieldUnderMousePointer();
+            }
             if ( pFld )
             {
                 EditPaM aPaM( aCurSel.Max() );
index 46ad7677e9109b3be1abe32f78eaa4459a55460b..7f8f7ce4c3321b63a8b7986eac133f56d85d4a68 100644 (file)
@@ -59,7 +59,7 @@ namespace vcl
     { PointerStyle::HSizeBar, "col-resize" },
     { PointerStyle::VSizeBar, "row-resize" },
     { PointerStyle::Hand, "grab" },
-    { PointerStyle::RefHand, "grabbing" },
+    { PointerStyle::RefHand, "pointer" },
     // Pen, Magnify, Fill, Rotate
     // HShear, VShear
     // Mirror, Crook, Crop, MovePoint, MoveBezierWeight
index 480eb1cea43e637f9edeafecc9946cc3534f94f2..8360fb4dad000baf7ff3aeddb8b83a2561626e3b 100644 (file)
@@ -800,12 +800,6 @@ bool ScGlobal::EETextObjEqual( const EditTextObject* pObj1,
 
 void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget)
 {
-    if (comphelper::LibreOfficeKit::isActive())
-    {
-        if(SfxViewShell* pViewShell = SfxViewShell::Current())
-            pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, rURL.toUtf8().getStr());
-    }
-
     // OpenURL is always called in the GridWindow by mouse clicks in some way or another.
     // That's why pScActiveViewShell and nScClickMouseModifier are correct.
     // SvtSecurityOptions to access Libreoffice global security parameters
index b2bd866731305215b4200f91219edc203a152d5c..2510bf5a9f5d575a7af3dd26a4a20fad356f7a8b 100644 (file)
Binary files a/sc/source/ui/view/gridwin.cxx and b/sc/source/ui/view/gridwin.cxx differ