[libreoffice/f20] Resolves: fdo#79604 sw: fix clicking on hyper-links in Draw objects
Michael Stahl
mstahl at fedoraproject.org
Tue Oct 7 13:47:40 UTC 2014
commit 44e48d65860f2c3257b5161ac7c13f0d906c6078
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Oct 7 15:47:30 2014 +0200
Resolves: fdo#79604 sw: fix clicking on hyper-links in Draw objects
...w-fix-clicking-on-hyper-links-in-Draw-obj.patch | 86 ++++++++++++++++++++
libreoffice.spec | 6 +-
2 files changed, 91 insertions(+), 1 deletions(-)
---
diff --git a/0001-fdo-79604-sw-fix-clicking-on-hyper-links-in-Draw-obj.patch b/0001-fdo-79604-sw-fix-clicking-on-hyper-links-in-Draw-obj.patch
new file mode 100644
index 0000000..42d1746
--- /dev/null
+++ b/0001-fdo-79604-sw-fix-clicking-on-hyper-links-in-Draw-obj.patch
@@ -0,0 +1,86 @@
+From d9bf56c30137dc33dfc88bd06e98774113fb146d Mon Sep 17 00:00:00 2001
+From: Michael Stahl <mstahl at redhat.com>
+Date: Mon, 6 Oct 2014 23:37:18 +0200
+Subject: [PATCH] fdo#79604: sw: fix clicking on hyper-links in Draw objects
+
+The URL is dispatched in MouseButtonUp(), but this relies on
+MouseButtonDown() not selecting the drawing object when the cursor is
+over an URL field.
+
+(probably regression from commit 7e2f98d0a0c4a0f36a94353a256e7cc5caa3113b
+ and commit 5ed14025645200c77249da364870f5772c01df17)
+
+Change-Id: Ib1504baff5d1fffd6ce53b41d3ff726d8e4d5c9d
+(cherry picked from commit 5284e44ed0594a79b0cc22090a9a82b19962f6c2)
+---
+ sw/source/ui/docvw/edtwin.cxx | 38 +++++++++++++++++++++-----------------
+ 1 file changed, 21 insertions(+), 17 deletions(-)
+
+diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
+index 7927987..82c032a 100644
+--- a/sw/source/ui/docvw/edtwin.cxx
++++ b/sw/source/ui/docvw/edtwin.cxx
+@@ -3126,8 +3126,27 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
+ case MOUSE_LEFT + KEY_MOD2:
+ {
+
++ // fdo#79604: first, check if a link has been clicked - do not
++ // select fly in this case!
++ if (1 == nNumberOfClicks)
++ {
++ UpdatePointer( aDocPos, rMEvt.GetModifier() );
++ SwEditWin::m_nDDStartPosY = aDocPos.Y();
++ SwEditWin::m_nDDStartPosX = aDocPos.X();
++
++ // hit an URL in DrawText object?
++ if (bExecHyperlinks && pSdrView)
++ {
++ SdrViewEvent aVEvt;
++ pSdrView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
++
++ if (aVEvt.eEvent == SDREVENT_EXECUTEURL)
++ bExecDrawTextLink = true;
++ }
++ }
++
+ bool bHandledFlyClick = false;
+- if ( nNumberOfClicks == nNbFlyClicks )
++ if (!bExecDrawTextLink && nNumberOfClicks == nNbFlyClicks)
+ {
+ bHandledFlyClick = true;
+ // only try to select frame, if pointer already was
+@@ -3250,22 +3269,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
+ switch ( nNumberOfClicks )
+ {
+ case 1:
+- {
+- UpdatePointer( aDocPos, rMEvt.GetModifier() );
+- SwEditWin::m_nDDStartPosY = aDocPos.Y();
+- SwEditWin::m_nDDStartPosX = aDocPos.X();
+-
+- // hit an URL in DrawText object?
+- if (bExecHyperlinks && pSdrView)
+- {
+- SdrViewEvent aVEvt;
+- pSdrView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
+-
+- if (aVEvt.eEvent == SDREVENT_EXECUTEURL)
+- bExecDrawTextLink = true;
+- }
+ break;
+- }
+ case 2:
+ {
+ bFrmDrag = false;
+@@ -3663,7 +3667,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
+
+ bNoInterrupt = bTmpNoInterrupt;
+ }
+- if ( !bOverURLGrf && !bOnlyText )
++ if (!bOverURLGrf && !bExecDrawTextLink && !bOnlyText)
+ {
+ const int nSelType = rSh.GetSelectionType();
+ // Check in general, if an object is selectable at given position.
+--
+1.9.3
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 43d5933..a32fbab 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -36,7 +36,7 @@ Summary: Free Software Productivity Suite
Name: libreoffice
Epoch: 1
Version: %{libo_version}.3
-Release: 7%{?libo_prerelease}%{?dist}
+Release: 8%{?libo_prerelease}%{?dist}
License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0
Group: Applications/Productivity
URL: http://www.libreoffice.org/
@@ -316,6 +316,7 @@ Patch61: 0001-create-a-master-document-template-type.patch
Patch62: 0001-Resolves-fdo-80911-don-t-swap-notes-page-width-heigh.patch
Patch63: 0001-default-n-up-printing-of-notes-to-sensible-2-x-1-not.patch
Patch64: 0001-n-up-printing-done-by-vcl-brochures-by-draw-impress.patch
+Patch65: 0001-fdo-79604-sw-fix-clicking-on-hyper-links-in-Draw-obj.patch
%define instdir %{_libdir}
%define baseinstdir %{instdir}/libreoffice
@@ -2265,6 +2266,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif
%changelog
+* Tue Sep 23 2014 Stephan Bergmann <sbergman at redhat.com> - 1:4.2.6.3-8-UNBUILT
+- Resolves: fdo#79604 sw: fix clicking on hyper-links in Draw objects
+
* Tue Sep 23 2014 Stephan Bergmann <sbergman at redhat.com> - 1:4.2.6.3-7
- Resolves: rhbz#1054952 cannot access smb URLs on KDE
More information about the scm-commits
mailing list