tdf#127341 Do not activate TextEdit at right-klick on URL in calc

Change-Id: I1881c007a05f56d5cb7914da56243f551c2da1cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126618
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 6d83299..e2f3a1e 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -3237,8 +3237,15 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )

    if ( !bEdit )
    {
            // Edit cell with spelling errors ?
        if (bMouse && (GetEditUrl(aPosPixel) || bSpellError))
        // Edit cell with spelling errors ?
        // tdf#127341 the formally used GetEditUrl(aPosPixel) addiionally
        // to bSpellError acivated EditMode here for right-click on URL
        // which prevents the regular contex-menu from appearing. Since this
        // is more expeced than the context-menu for editing an URL I removed
        // this. If this was wanted and can be argued his migh be re-acivated.
        // For now, reduce to spelling errors - as the original comment above
        // suggests.
        if (bMouse && bSpellError)
        {
            //  GetEditUrlOrError has already moved the Cursor

diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 1c7d615..9c49f52 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -265,6 +265,13 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent 
                           tools::Long nX, tools::Long nY, sal_uInt64 nMsgTime,
                           sal_uInt16 nCode, MouseEventModifiers nMode )
{
    SAL_INFO( "vcl.debugevent",
              "mouse event "
               "(MouseNotifyEvent " << static_cast<sal_uInt16>(nSVEvent) << ") "
               "(MouseLeave " << bMouseLeave << ") "
               "(X, Y " << nX << ", " << nY << ") "
               "(Code " << nCode << ") "
               "(Modifiers " << static_cast<sal_uInt16>(nMode) << ")");
    ImplSVHelpData& aHelpData = ImplGetSVHelpData();
    ImplSVData* pSVData = ImplGetSVData();
    Point       aMousePos( nX, nY );