From 514a4f302f9f49db5a0b22cbe49bd98191296735 Mon Sep 17 00:00:00 2001 From: Aron Budea Date: Sat, 14 Nov 2020 20:33:39 +0100 Subject: 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 --- sw/inc/inspectorproperties.hrc | 4 ++++ sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx | 17 +++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) (limited to 'sw') 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 #include #include +#include namespace sw::sidebar { @@ -440,16 +441,16 @@ static void UpdateTree(SwDocShell* pDocSh, std::vector& { 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& UNO_NAME_NUMBERING_LEVEL, UNO_NAME_PARRSID }; - InsertValues(xRange, aIsDefined, aDFNode, false, aHiddenProperties); + InsertValues(xRange, aIsDefined, aCharDFNode, false, aHiddenProperties); uno::Reference xStyleFamiliesSupplier(pDocSh->GetBaseModel(), uno::UNO_QUERY); @@ -536,7 +537,7 @@ static void UpdateTree(SwDocShell* pDocSh, std::vector& 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) -- cgit