summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2017-11-28 20:15:47 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2017-11-29 12:17:46 +0100
commit209f48daebfebb6391282a1096e12b0f149ee1ce (patch)
tree2b8267a462cc97a8ef3c262b38af9ea1d7de523e
parent368f806aaa75fb80790026677e2400580536ed7a (diff)
tdf#76646 Ctrl-click required for hyperlinks in draw/impress
If "Ctrl-click required to follow hyperlinks" is set in Options -> LibreOffice -> Security -> Options open the link only with Ctrl key pressed. Change-Id: Icf57b4deedabd51f31f04021ba3f6bddc3829931 Reviewed-on: https://gerrit.libreoffice.org/45437 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r--sd/source/ui/func/fusel.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index 33998e04180e..6cc5d7483174 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -29,6 +29,7 @@
#include <svtools/imapobj.hxx>
#include <svl/urihelper.hxx>
#include <unotools/localfilehelper.hxx>
+#include <unotools/securityoptions.hxx>
#include <svx/svxids.hrc>
#include <svx/xfillit0.hxx>
#include <sfx2/app.hxx>
@@ -267,6 +268,11 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
aVEvt.eEvent == SdrEventKind::ExecuteUrl )
{
mpWindow->ReleaseMouse();
+
+ SvtSecurityOptions aSecOpt;
+ if (!rMEvt.IsMod1() && aSecOpt.IsOptionSet(SvtSecurityOptions::EOption::CtrlClickHyperlink))
+ return true;
+
SfxStringItem aStrItem(SID_FILE_NAME, aVEvt.pURLField->GetURL());
SfxStringItem aReferer(SID_REFERER, mpDocSh->GetMedium()->GetName());
SfxBoolItem aBrowseItem( SID_BROWSE, true );