[Libreoffice-commits] core.git: sc/source
Julien Nabet
serval2412 at yahoo.fr
Mon Jan 5 01:36:20 PST 2015
sc/source/ui/src/globstr.src | 2 +-
sc/source/ui/view/gridwin5.cxx | 11 ++++++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
New commits:
commit 9b4e8e77639d3af012879d2419d376041087539e
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Wed Dec 31 16:14:07 2014 +0100
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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/ui/src/globstr.src b/sc/source/ui/src/globstr.src
index 3a9be28..0c7fe07 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 9e964c3..4d82db1 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;
More information about the Libreoffice-commits
mailing list