summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-07-11 11:08:13 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-07-11 14:40:03 +0200
commit721cef392f301321a632a1d9286d57cd45335649 (patch)
treee1db93f819bd4752e12a8853ec2572ebdf0b91c2 /sd/source
parent9c1b85c56077a9efbc6d91334dcbab3d1f0c0dd2 (diff)
Deduplicate URL tooltip creation
Change-Id: I94eb40ff4d727029ad764a381df300beee90481c Reviewed-on: https://gerrit.libreoffice.org/75409 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/func/fudraw.cxx23
1 files changed, 2 insertions, 21 deletions
diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx
index 64bef1f58aac..b6e915fdd052 100644
--- a/sd/source/ui/func/fudraw.cxx
+++ b/sd/source/ui/func/fudraw.cxx
@@ -32,6 +32,7 @@
#include <sfx2/app.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/bindings.hxx>
+#include <sfx2/sfxhelp.hxx>
#include <svx/svdpagv.hxx>
#include <vcl/imapobj.hxx>
#include <svx/svxids.hrc>
@@ -756,27 +757,7 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE
else
return false;
- SvtSecurityOptions aSecOpt;
- if (aSecOpt.IsOptionSet(SvtSecurityOptions::EOption::CtrlClickHyperlink))
- {
- // Hint about Ctrl-click to open hyperlink, but need to detect "Ctrl" key for MacOs
- vcl::KeyCode aCode(KEY_SPACE);
- vcl::KeyCode aModifiedCode(KEY_SPACE, KEY_MOD1);
- OUString aModStr(aModifiedCode.GetName());
- aModStr = aModStr.replaceFirst(aCode.GetName(), "");
- aModStr = aModStr.replaceAll("+", "");
-
- OUString aCtrlClickHlinkStr = SdResId(STR_CTRLCLICKHYPERLINK);
-
- aCtrlClickHlinkStr = aCtrlClickHlinkStr.replaceAll("%s", aModStr);
-
- aHelpText = aCtrlClickHlinkStr + aURL;
- }
- else
- {
- // Hint about just clicking hyperlink
- aHelpText = SdResId(STR_CLICKHYPERLINK) + aURL;
- }
+ aHelpText = SfxHelp::GetURLHelpText(aURL);
if (aHelpText.isEmpty())
return false;