cui/inc/tipoftheday.hrc | 2 +- cui/source/dialogs/tipofthedaydlg.cxx | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-)
New commits: commit b6a781e52aceb8ad7a619fc17a3c6f1022958633 Author: Sergey Anisimov <[email protected]> AuthorDate: Fri Nov 28 17:03:56 2025 +0300 Commit: Hossein <[email protected]> CommitDate: Wed Jan 7 12:54:44 2026 +0100 tdf#159296 Fix wrong information shown in tip of the day Added "aMOD3" string for Ctrl in macOS Change-Id: Ia042dd308dc04c421dd7396429917013e3f78b77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194781 Reviewed-by: Hossein <[email protected]> Tested-by: Jenkins diff --git a/cui/inc/tipoftheday.hrc b/cui/inc/tipoftheday.hrc index a0300a48d20e..3186937b45dc 100644 --- a/cui/inc/tipoftheday.hrc +++ b/cui/inc/tipoftheday.hrc @@ -95,7 +95,7 @@ const std::tuple<TranslateId, OUString, OUString, tipModule> TIPOFTHEDAY_STRINGA { NC_("RID_CUI_TIPOFTHEDAY", "Need to insert the date in a spreadsheet cell? Type %MOD1+; or Shift+%MOD1+; to insert the time."), "", "", scalc}, { NC_("RID_CUI_TIPOFTHEDAY", "Insert your metadata in your document with Insert ▸ Fields ▸ More Fields… ▸ Document or DocInformation."), "", "", swriter}, { NC_("RID_CUI_TIPOFTHEDAY", "Get help from the community via the Ask portal."), "https://ask.libreoffice.org", "", soffice}, - { NC_("RID_CUI_TIPOFTHEDAY", "Use Shift+Space to select the current row and %MOD1+Space to select the current column."), "", "", scalc}, + { NC_("RID_CUI_TIPOFTHEDAY", "Use Shift+Space to select the current row and %MOD3+Space to select the current column."), "", "", scalc}, { NC_("RID_CUI_TIPOFTHEDAY", "You can move an object to another layer by holding it until its edges flash, then drag it to the tab of the layer you want to move it to."), "", "", sdraw}, { NC_("RID_CUI_TIPOFTHEDAY", "Data ▸ Validity allows you to create drop-down lists where the user selects a value instead of typing."), "https://help.libreoffice.org/%PRODUCTVERSION/%LANGUAGENAME/text/scalc/guide/validity.html", "", scalc}, //local help missing { NC_("RID_CUI_TIPOFTHEDAY", "Hold down %MOD1 and turn the mouse wheel to change the zoom factor."), "", "", soffice}, diff --git a/cui/source/dialogs/tipofthedaydlg.cxx b/cui/source/dialogs/tipofthedaydlg.cxx index cd8555d5c217..10728fd6d79b 100644 --- a/cui/source/dialogs/tipofthedaydlg.cxx +++ b/cui/source/dialogs/tipofthedaydlg.cxx @@ -152,15 +152,22 @@ void TipOfTheDayDialog::UpdateTip() auto[sTip, sLink, sImage, nType] = TIPOFTHEDAY_STRINGARRAY[m_nCurrentTip]; // text -//replace MOD1 & MOD2 shortcuts depending on platform +//replace MOD1, MOD2 & MOD3 shortcuts depending on platform +//MOD3 is created to handle cases in macOS where Ctrl is used instead of Command. +//In other OS's MOD3==MOD1 (Ctrl) #ifdef MACOSX const OUString aMOD1 = CuiResId(STR_CMD); const OUString aMOD2 = CuiResId(STR_Option); + const OUString aMOD3 = CuiResId(STR_CTRL); #else const OUString aMOD1 = CuiResId(STR_CTRL); const OUString aMOD2 = CuiResId(STR_Alt); + const OUString& aMOD3 = aMOD1; #endif - m_pText->set_label(CuiResId(sTip).replaceAll("%MOD1", aMOD1).replaceAll("%MOD2", aMOD2)); + m_pText->set_label(CuiResId(sTip) + .replaceAll("%MOD1", aMOD1) + .replaceAll("%MOD2", aMOD2) + .replaceAll("%MOD3", aMOD3)); // hyperlink if (sLink.isEmpty())
