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

Aron Budea (via logerrit) logerrit at kemper.freedesktop.org
Sat Nov 14 20:56:27 UTC 2020


 sw/inc/inspectorproperties.hrc                        |    4 ++++
 sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx |   17 +++++++++--------
 2 files changed, 13 insertions(+), 8 deletions(-)

New commits:
commit 514a4f302f9f49db5a0b22cbe49bd98191296735
Author:     Aron Budea <aron.budea at collabora.com>
AuthorDate: Sat Nov 14 20:33:39 2020 +0100
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sat Nov 14 21:55:39 2020 +0100

    tdf#136868, tdf#136912, Styles Inspector: Translatable categories
    
    ...and "Direct Formatting" renamed to "Character Direct Formatting"
    
    Change-Id: I9fe711bfebfaa90a9797b6e1a47e41a5f307170b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105843
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/sw/inc/inspectorproperties.hrc b/sw/inc/inspectorproperties.hrc
index f51521b30e9e..6ef374a2f857 100644
--- a/sw/inc/inspectorproperties.hrc
+++ b/sw/inc/inspectorproperties.hrc
@@ -27,6 +27,10 @@
     and Text cursor properties
  --------------------------------------------------------------------*/
 
+// Node names
+#define RID_CHAR_DIRECTFORMAT                               NC_("RID_CHAR_DIRECTFORMAT", "Character Direct Formatting")
+#define RID_PARA_DIRECTFORMAT                               NC_("RID_PARA_DIRECTFORMAT", "Paragraph Direct Formatting")
+
 // Format names
 #define RID_BORDER_COLOR                                    NC_("RID_ATTRIBUTE_NAMES_MAP", "Color")
 #define RID_BORDER_DISTANCE                                 NC_("RID_ATTRIBUTE_NAMES_MAP", "Border Distance")
diff --git a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
index 6dfaf8ccd966..e2c3c15d0e24 100644
--- a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
+++ b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
@@ -38,6 +38,7 @@
 #include <i18nlangtag/languagetag.hxx>
 #include <vcl/settings.hxx>
 #include <inspectorproperties.hrc>
+#include <strings.hrc>
 
 namespace sw::sidebar
 {
@@ -440,16 +441,16 @@ static void UpdateTree(SwDocShell* pDocSh, std::vector<svx::sidebar::TreeNode>&
 {
     SwDoc* pDoc = pDocSh->GetDoc();
     SwPaM* pCursor = pDoc->GetEditShell()->GetCursor();
-    svx::sidebar::TreeNode aDFNode;
+    svx::sidebar::TreeNode aCharDFNode;
     svx::sidebar::TreeNode aCharNode;
     svx::sidebar::TreeNode aParaNode;
     svx::sidebar::TreeNode aParaDFNode;
 
-    aDFNode.sNodeName = "Direct Formatting";
-    aCharNode.sNodeName = "Character Styles";
-    aParaNode.sNodeName = "Paragraph Styles";
-    aParaDFNode.sNodeName = "Paragraph Direct Formatting";
-    aDFNode.NodeType = svx::sidebar::TreeNode::Category;
+    aCharNode.sNodeName = SwResId(STR_CHARACTERSTYLEFAMILY);
+    aParaNode.sNodeName = SwResId(STR_PARAGRAPHSTYLEFAMILY);
+    aCharDFNode.sNodeName = SwResId(RID_CHAR_DIRECTFORMAT);
+    aParaDFNode.sNodeName = SwResId(RID_PARA_DIRECTFORMAT);
+    aCharDFNode.NodeType = svx::sidebar::TreeNode::Category;
     aCharNode.NodeType = svx::sidebar::TreeNode::Category;
     aParaNode.NodeType = svx::sidebar::TreeNode::Category;
     aParaDFNode.NodeType = svx::sidebar::TreeNode::Category;
@@ -471,7 +472,7 @@ static void UpdateTree(SwDocShell* pDocSh, std::vector<svx::sidebar::TreeNode>&
                                                    UNO_NAME_NUMBERING_LEVEL,
                                                    UNO_NAME_PARRSID };
 
-    InsertValues(xRange, aIsDefined, aDFNode, false, aHiddenProperties);
+    InsertValues(xRange, aIsDefined, aCharDFNode, false, aHiddenProperties);
 
     uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(pDocSh->GetBaseModel(),
                                                                          uno::UNO_QUERY);
@@ -536,7 +537,7 @@ static void UpdateTree(SwDocShell* pDocSh, std::vector<svx::sidebar::TreeNode>&
     aStore.push_back(aParaNode);
     aStore.push_back(aParaDFNode);
     aStore.push_back(aCharNode);
-    aStore.push_back(aDFNode);
+    aStore.push_back(aCharDFNode);
 }
 
 IMPL_LINK(WriterInspectorTextPanel, AttrChangedNotify, LinkParamNone*, pLink, void)


More information about the Libreoffice-commits mailing list