summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2014-12-31 16:14:07 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-01-05 09:35:54 +0000
commit9b4e8e77639d3af012879d2419d376041087539e (patch)
treebbea889cb877eaaa73658c86d8d448b1f5b6ec07
parenta509a8d9951a0c31bea0f4ff8942720cad8b6e7f (diff)
Resolves fdo#87863: Calc tooltip text for hyperlink wrong on OSX
I copied pasted the Writer way, with "follow" and "link" instead of "open" and "hyperlink" There are still the management of ":" + space (which could be different according to i10n) Change-Id: Ic8516c667b1882030d527add228a98e1081f608f Reviewed-on: https://gerrit.libreoffice.org/13712 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-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;