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

Heiko Tietze (via logerrit) logerrit at kemper.freedesktop.org
Sat Mar 6 08:55:36 UTC 2021


 include/sfx2/tabdlg.hxx       |    4 +++-
 sw/inc/strings.hrc            |   11 ++++++++++-
 sw/source/ui/fmtui/tmpdlg.cxx |   13 +++++++++++--
 3 files changed, 24 insertions(+), 4 deletions(-)

New commits:
commit 4902e3231f4f5f4df32d46a901801b18c297ef15
Author:     Heiko Tietze <tietze.heiko at gmail.com>
AuthorDate: Fri Mar 5 09:14:44 2021 +0100
Commit:     Heiko Tietze <heiko.tietze at documentfoundation.org>
CommitDate: Sat Mar 6 09:54:55 2021 +0100

    Related tdf#128469 - Customization of tab dialog buttons
    
    Change-Id: Ib7d4bbc6d78ac93510835e061640bfcd99248195
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111987
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <heiko.tietze at documentfoundation.org>

diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 9afebad1ba58..6397868a21d0 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -138,8 +138,10 @@ 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(); }
+    weld::Button*       GetStandardButton() const { return m_xBaseFmtBtn.get(); }
+    weld::Button*       GetApplyButton() const { return m_xApplyBtn.get(); }
+    weld::Button*       GeResetButton() const { return m_xResetBtn.get(); }
     void                RemoveResetButton();
     void                RemoveStandardButton();
 
diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index 45fe987ddf3e..eaccff12b94a 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -23,8 +23,17 @@
 #define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
 #define NNC_(Context, StringSingular, StringPlural) reinterpret_cast<char const *>(Context "\004" u8##StringSingular "\004" u8##StringPlural)
 
+// Dialog buttons
+#define STR_STANDARD_LABEL                      NC_("STR_STANDARD_LABEL", "Set to ~Parent")
+#define STR_STANDARD_TOOLTIP                    NC_("STR_STANDARD_TOOLTIP", "")
+#define STR_STANDARD_EXTENDEDTIP                NC_("STR_STANDARD_EXTENDEDTIP", "")
+#define STR_RESET_LABEL                         NC_("STR_RESET_LABEL", "Reset")
+#define STR_RESET_TOOLTIP                       NC_("STR_RESET_TOOLTIP", "")
+#define STR_RESET_EXTENDEDTIP                   NC_("STR_RESET_EXTENDEDTIP", "")
+#define STR_APPLY_LABEL                         NC_("STR_APPLY_LABEL", "Apply")
+#define STR_APPLY_TOOLTIP                       NC_("STR_APPLY_TOOLTIP", "")
+#define STR_APPLY_EXTENDEDTIP                   NC_("STR_APPLY_EXTENDEDTIP", "")
 
-#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 ae69c35093d3..cfab577c82dd 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -77,8 +77,17 @@ 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));
+    GetStandardButton()->set_label(SwResId(STR_STANDARD_LABEL));
+    GetStandardButton()->set_tooltip_text(SwResId(STR_STANDARD_TOOLTIP));
+    GetStandardButton()->set_accessible_description(SwResId(STR_STANDARD_EXTENDEDTIP));
+
+    GetApplyButton()->set_label(SwResId(STR_APPLY_LABEL));
+    GetApplyButton()->set_tooltip_text(SwResId(STR_APPLY_TOOLTIP));
+    GetApplyButton()->set_accessible_description(SwResId(STR_APPLY_EXTENDEDTIP));
+
+    GeResetButton()->set_label(SwResId(STR_RESET_LABEL));
+    GeResetButton()->set_tooltip_text(SwResId(STR_RESET_TOOLTIP));
+    GeResetButton()->set_accessible_description(SwResId(STR_RESET_EXTENDEDTIP));
 
     // stitch TabPages together
     switch( nRegion )


More information about the Libreoffice-commits mailing list