summaryrefslogtreecommitdiff
path: root/sc/source/ui/drawfunc/fusel.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-06-29 13:54:00 +0200
committerMiklos Vajna <vmiklos@collabora.com>2021-06-29 15:35:33 +0200
commit1b7fc505bdd6c3c44986221c6bbe33af1a0e3ac6 (patch)
tree81a8feeb0201f299b0b1260214d62c5b5d5d82dd /sc/source/ui/drawfunc/fusel.cxx
parentd0bdc56da1833bc07992ddc87eb1fcffb926cee9 (diff)
sc: don't require ctrl-click when clicking on internal links of shapes
Excel doesn't require such additional actions, and Writer doesn't require ctrl-click for internal links (e.g. cross-references), either. Also suppress the tooltip hinting ctrl-click in this case. Change-Id: If2fbec533f5c2a57268a22cf96464e724922ff7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118085 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sc/source/ui/drawfunc/fusel.cxx')
-rw-r--r--sc/source/ui/drawfunc/fusel.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index 6c8f753d4974..02af11bfe7ca 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -223,7 +223,8 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
}
// open hyperlink, if found at object or in object's text
- if ( !sURL.isEmpty() && ScGlobal::ShouldOpenURL() )
+ // Fragments pointing into the current document should be always opened.
+ if ( !sURL.isEmpty() && (ScGlobal::ShouldOpenURL() || sURL.startsWith("#")) )
{
ScGlobal::OpenURL( sURL, sTarget );
rViewShell.FakeButtonUp( rViewShell.GetViewData().GetActivePart() );