From 7838c4a955eaccd625116fa1508d66f7fd2a95da Mon Sep 17 00:00:00 2001 From: Heiko Tietze Date: Tue, 2 Mar 2021 11:43:54 +0100 Subject: Related tdf#128469 - Change label of Standard button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I1bfc7cbfa71cf76d1cd76db83d8a7f951535e47e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111821 Reviewed-by: Caolán McNamara Reviewed-by: Heiko Tietze Tested-by: Jenkins --- include/sfx2/tabdlg.hxx | 1 + sw/inc/strings.hrc | 2 ++ sw/source/ui/fmtui/tmpdlg.cxx | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx index 2c3352785f31..9afebad1ba58 100644 --- a/include/sfx2/tabdlg.hxx +++ b/include/sfx2/tabdlg.hxx @@ -138,6 +138,7 @@ public: virtual weld::Button& GetOKButton() const override { return *m_xOKBtn; } weld::Button& GetCancelButton() const { return *m_xCancelBtn; } + weld::Button& GetStandardButton() const { return *m_xBaseFmtBtn; } weld::Button* GetUserButton() const { return m_xUserBtn.get(); } void RemoveResetButton(); void RemoveStandardButton(); diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc index 3b5da067e5d6..45fe987ddf3e 100644 --- a/sw/inc/strings.hrc +++ b/sw/inc/strings.hrc @@ -23,6 +23,8 @@ #define NC_(Context, String) reinterpret_cast(Context "\004" u8##String) #define NNC_(Context, StringSingular, StringPlural) reinterpret_cast(Context "\004" u8##StringSingular "\004" u8##StringPlural) + +#define STR_STANDARD_ACTION NC_("STR_STANDARD_ACTION", "Set to ~Parent") // Format names #define STR_POOLCHR_STANDARD NC_("STR_POOLCHR_STANDARD", "Default Character Style") #define STR_POOLCHR_FOOTNOTE NC_("STR_POOLCHR_FOOTNOTE", "Footnote Characters") diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index b87107fd8299..ae69c35093d3 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -47,6 +47,7 @@ #include #include #include +#include #include #include @@ -75,6 +76,10 @@ SwTemplateDlgController::SwTemplateDlgController(weld::Window* pParent, { nHtmlMode = ::GetHtmlMode(pWrtShell->GetView().GetDocShell()); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); + + weld::Button& pStandardButton(GetStandardButton()); + pStandardButton.set_label(SwResId(STR_STANDARD_ACTION)); + // stitch TabPages together switch( nRegion ) { -- cgit