[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - sd/source
Vasily Melenchuk
Vasily.Melenchuk at cib.de
Thu Apr 19 08:04:34 UTC 2018
sd/source/ui/func/fudraw.cxx | 60 +++++++++++++++++++++----------------------
1 file changed, 30 insertions(+), 30 deletions(-)
New commits:
commit 803627b96a23a7ff59256c39c7666f0dba096aad
Author: Vasily Melenchuk <Vasily.Melenchuk at cib.de>
Date: Thu Apr 12 18:06:54 2018 +0300
sd: hyperlink hint was not always shown
Reviewed-on: https://gerrit.libreoffice.org/52785
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Conflicts:
sd/source/ui/func/fudraw.cxx
Change-Id: Ic885688ce0f757c3230a5e355a4eef8da71dbda1
Reviewed-on: https://gerrit.libreoffice.org/53138
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx
index c51d78edd5e9..9cfddc6491c6 100644
--- a/sd/source/ui/func/fudraw.cxx
+++ b/sd/source/ui/func/fudraw.cxx
@@ -803,6 +803,36 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE
}
}
}
+ else if (rVEvt.pURLField)
+ {
+ /**************************************************************
+ * URL-Field
+ **************************************************************/
+ OUString aURL = INetURLObject::decode( rVEvt.pURLField->GetURL(), INetURLObject::DECODE_WITH_CHARSET );
+
+ SvtSecurityOptions aSecOpt;
+ if (aSecOpt.IsOptionSet(SvtSecurityOptions::E_CTRLCLICK_HYPERLINK))
+ {
+ // 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 = SD_RESSTR(STR_CTRLCLICKHYPERLINK);
+
+ aCtrlClickHlinkStr = aCtrlClickHlinkStr.replaceAll("%s", aModStr);
+
+ aHelpText = aCtrlClickHlinkStr + aURL;
+ }
+ else
+ {
+ // Hint about just clicking hyperlink
+ aHelpText = SD_RESSTR(STR_CLICKHYPERLINK) + aURL;
+ }
+ }
else if (dynamic_cast< GraphicDocShell *>( mpDocSh ) == nullptr && mpDoc->GetAnimationInfo(pObj))
{
SdAnimationInfo* pInfo = mpDoc->GetAnimationInfo(pObj);
@@ -910,36 +940,6 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE
break;
}
}
- else if (rVEvt.pURLField)
- {
- /**************************************************************
- * URL-Field
- **************************************************************/
- OUString aURL = INetURLObject::decode( rVEvt.pURLField->GetURL(), INetURLObject::DECODE_WITH_CHARSET );
-
- SvtSecurityOptions aSecOpt;
- if (aSecOpt.IsOptionSet(SvtSecurityOptions::E_CTRLCLICK_HYPERLINK))
- {
- // 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 = SD_RESSTR(STR_CTRLCLICKHYPERLINK);
-
- aCtrlClickHlinkStr = aCtrlClickHlinkStr.replaceAll("%s", aModStr);
-
- aHelpText = aCtrlClickHlinkStr + aURL;
- }
- else
- {
- // Hint about just clicking hyperlink
- aHelpText = SD_RESSTR(STR_CLICKHYPERLINK) + aURL;
- }
- }
if (!aHelpText.isEmpty())
{
More information about the Libreoffice-commits
mailing list