summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/src/globstr.src2
-rw-r--r--sc/source/ui/view/gridwin5.cxx11
2 files changed, 11 insertions, 2 deletions
diff --git a/sc/source/ui/src/globstr.src b/sc/source/ui/src/globstr.src
index 3a9be28bf25a..0c7fe0785e5e 100644
--- a/sc/source/ui/src/globstr.src
+++ b/sc/source/ui/src/globstr.src
@@ -2055,7 +2055,7 @@ Resource RID_GLOBSTR
};
String STR_CTRLCLICKHYPERLINK
{
- Text [ en-US ] = "ctrl+click to open hyperlink:";
+ Text [ en-US ] = "%s-Click to follow link:";
};
String STR_CLICKHYPERLINK
{
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index 9e964c360bea..4d82db17d69f 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -242,8 +242,17 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
//to hyperlink tooltips/help text
SvtSecurityOptions aSecOpt;
bool bCtrlClickHlink = aSecOpt.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
- //Global string STR_CTRLCLICKHYPERLINK i.e, "ctrl+click to open hyperlink:"
+ //Global string STR_CTRLCLICKHYPERLINK i.e,
+ // "ctrl-click to follow link:" for not MacOS
+ // "⌘-click to follow link:" for MacOs
+ vcl::KeyCode aCode( KEY_SPACE );
+ vcl::KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 );
+ OUString aModStr( aModifiedCode.GetName() );
+ aModStr = aModStr.replaceFirst(aCode.GetName(), OUString());
+ aModStr = aModStr.replaceAll("+", OUString());
OUString aCtrlClickHlinkStr = ScGlobal::GetRscString( STR_CTRLCLICKHYPERLINK );
+
+ aCtrlClickHlinkStr = aCtrlClickHlinkStr.replaceAll("%s", aModStr);
//Global string STR_CLICKHYPERLINK i.e, "click to open hyperlink"
OUString aClickHlinkStr = ScGlobal::GetRscString( STR_CLICKHYPERLINK );
bool bDone = false;