[Libreoffice-commits] core.git: cui/inc cui/source

Gabor Kelemen (via logerrit) logerrit at kemper.freedesktop.org
Tue Apr 27 13:28:20 UTC 2021


 cui/inc/strings.hrc                               |    5 +++++
 cui/source/customize/SvxNotebookbarConfigPage.cxx |   10 +++++-----
 2 files changed, 10 insertions(+), 5 deletions(-)

New commits:
commit 8ebb54c6c4937a151f2185e8f54b2c39e446368a
Author:     Gabor Kelemen <kelemen.gabor2 at nisz.hu>
AuthorDate: Wed Apr 21 08:22:12 2021 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Tue Apr 27 15:27:32 2021 +0200

    tdf#138751 Localize items in Notebookbar customization dropdowns
    
    Change-Id: Idb1483e083f7758acb83da6c3ca9403c40ac9a40
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114447
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <heiko.tietze at documentfoundation.org>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc
index 9ec01b758738..1ba91c27c747 100644
--- a/cui/inc/strings.hrc
+++ b/cui/inc/strings.hrc
@@ -67,6 +67,11 @@
 #define RID_SVXSTR_LABEL_NEW_NAME                   NC_("RID_SVXSTR_LABEL_NEW_NAME", "~New name")
 #define RID_SVXSTR_RENAME_MENU                      NC_("RID_SVXSTR_RENAME_MENU", "Rename Menu")
 #define RID_SVXSTR_RENAME_TOOLBAR                   NC_("RID_SVXSTR_RENAME_TOOLBAR", "Rename Toolbar")
+#define RID_SVXSTR_ALL_COMMANDS                     NC_("RID_SVXSTR_ALL_COMMANDS", "All Commands")
+#define RID_SVXSTR_TABBED                           NC_("RID_SVXSTR_TABBED", "Tabbed")
+#define RID_SVXSTR_TABBED_COMPACT                   NC_("RID_SVXSTR_TABBED_COMPACT", "Tabbed Compact")
+#define RID_SVXSTR_GROUPEDBAR                       NC_("RID_SVXSTR_GROUPEDBAR", "Groupedbar")
+#define RID_SVXSTR_GROUPEDBAR_COMPACT               NC_("RID_SVXSTR_GROUPEDBAR_COMPACT", "Groupedbar Compact")
 
 #define RID_SVXSTR_HYPDLG_CLOSEBUT                  NC_("RID_SVXSTR_HYPDLG_CLOSEBUT", "Close")
 #define RID_SVXSTR_HYPDLG_MACROACT1                 NC_("RID_SVXSTR_HYPDLG_MACROACT1", "Mouse over object")
diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx b/cui/source/customize/SvxNotebookbarConfigPage.cxx
index 7e93dae121af..978055e1a1bc 100644
--- a/cui/source/customize/SvxNotebookbarConfigPage.cxx
+++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx
@@ -70,13 +70,13 @@ static OUString charToString(const char* cString)
 static OUString getFileName(std::u16string_view aFileName)
 {
     if (aFileName == u"notebookbar.ui")
-        return "Tabbed";
+        return CuiResId(RID_SVXSTR_TABBED);
     else if (aFileName == u"notebookbar_compact.ui")
-        return "TabbedCompact";
+        return CuiResId(RID_SVXSTR_TABBED_COMPACT);
     else if (aFileName == u"notebookbar_groupedbar_full.ui")
-        return "Groupedbar";
+        return CuiResId(RID_SVXSTR_GROUPEDBAR);
     else if (aFileName == u"notebookbar_groupedbar_compact.ui")
-        return "GroupedbarCompact";
+        return CuiResId(RID_SVXSTR_GROUPEDBAR_COMPACT);
     else
         return "None";
 }
@@ -154,7 +154,7 @@ void SvxNotebookbarConfigPage::Init()
     m_xSaveInListBox->append(sSaveInListBoxID, sScopeName);
     m_xSaveInListBox->set_active_id(sSaveInListBoxID);
 
-    m_xTopLevelListBox->append("NotebookBar", "All Commands");
+    m_xTopLevelListBox->append("NotebookBar", CuiResId(RID_SVXSTR_ALL_COMMANDS));
     m_xTopLevelListBox->set_active_id("NotebookBar");
     SelectElement();
 }


More information about the Libreoffice-commits mailing list