diff --git a/dbaccess/source/ui/dlg/UserAdminDlg.cxx b/dbaccess/source/ui/dlg/UserAdminDlg.cxx index a70db89f7c49..85fc281013b1 100644 --- a/dbaccess/source/ui/dlg/UserAdminDlg.cxx +++ b/dbaccess/source/ui/dlg/UserAdminDlg.cxx @@ -60,9 +60,6 @@ namespace dbaui m_xExampleSet.reset(new SfxItemSet(*GetInputSetImpl())); AddTabPage(u"settings"_ustr, OUserAdmin::Create, nullptr); - - // remove the reset button - it's meaning is much too ambiguous in this dialog - RemoveResetButton(); } OUserAdminDlg::~OUserAdminDlg() diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index c96a3213c98b..f2965c7f8c4e 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -383,9 +383,6 @@ namespace dbaui // any "special settings"? if (rFeatures.supportsAnySpecialSetting()) AddTabPage(u"special"_ustr, DBA_RES(STR_SPECIAL_SETTINGS), ODriversSettings::CreateSpecialSettingsPage, nullptr); - - // remove the reset button - it's meaning is much too ambiguous in this dialog - RemoveResetButton(); } AdvancedSettingsDialog::~AdvancedSettingsDialog() diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx index 37b0301f4d82..240abc6d0b19 100644 --- a/dbaccess/source/ui/dlg/dbadmin.cxx +++ b/dbaccess/source/ui/dlg/dbadmin.cxx @@ -49,9 +49,6 @@ ODbAdminDialog::ODbAdminDialog(weld::Window* pParent, // add the initial tab page AddTabPage(m_sMainPageID, OConnectionTabPage::Create, nullptr); - - // remove the reset button - it's meaning is much too ambiguous in this dialog - RemoveResetButton(); } ODbAdminDialog::~ODbAdminDialog() diff --git a/dbaccess/uiconfig/ui/admindialog.ui b/dbaccess/uiconfig/ui/admindialog.ui index 6c54c7ba0588..da2184a434a5 100644 --- a/dbaccess/uiconfig/ui/admindialog.ui +++ b/dbaccess/uiconfig/ui/admindialog.ui @@ -20,20 +20,6 @@ False end - - - _Reset - True - True - True - True - - - False - True - 0 - - _OK @@ -47,7 +33,7 @@ False True - 1 + 0 @@ -61,7 +47,7 @@ False True - 2 + 1 @@ -126,7 +112,6 @@ - reset ok cancel help diff --git a/dbaccess/uiconfig/ui/advancedsettingsdialog.ui b/dbaccess/uiconfig/ui/advancedsettingsdialog.ui index 16bb7f19aa44..044e91ceff21 100644 --- a/dbaccess/uiconfig/ui/advancedsettingsdialog.ui +++ b/dbaccess/uiconfig/ui/advancedsettingsdialog.ui @@ -20,20 +20,6 @@ False end - - - _Reset - True - True - True - True - - - False - True - 0 - - _OK @@ -47,7 +33,7 @@ False True - 1 + 0 @@ -61,7 +47,7 @@ False True - 2 + 1 @@ -75,7 +61,7 @@ False True - 3 + 2 True @@ -105,7 +91,6 @@ - reset ok cancel help diff --git a/dbaccess/uiconfig/ui/useradmindialog.ui b/dbaccess/uiconfig/ui/useradmindialog.ui index 0da35f89f259..09aae26ddae1 100644 --- a/dbaccess/uiconfig/ui/useradmindialog.ui +++ b/dbaccess/uiconfig/ui/useradmindialog.ui @@ -23,19 +23,6 @@ False end - - - _Reset - True - True - True - - - False - True - 0 - - _OK @@ -49,7 +36,7 @@ False True - 1 + 0 @@ -63,7 +50,7 @@ False True - 2 + 1 @@ -77,7 +64,7 @@ False True - 3 + 2 True @@ -152,7 +139,6 @@ - reset ok cancel help diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index bcdb002aa42f..ad5ac53ba11b 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -228,9 +228,6 @@ ImpPDFTabDialog::ImpPDFTabDialog(weld::Window* pParent, const Sequence< Property GetCancelButton().connect_clicked(LINK(this, ImpPDFTabDialog, CancelHdl)); GetOKButton().connect_clicked(LINK(this, ImpPDFTabDialog, OkHdl)); - - // remove the reset button, not needed in this tabbed dialog - RemoveResetButton(); } ImpPDFTabSecurityPage* ImpPDFTabDialog::getSecurityPage() const diff --git a/filter/uiconfig/ui/pdfoptionsdialog.ui b/filter/uiconfig/ui/pdfoptionsdialog.ui index bf2e4930304c..c7fc68e55fd6 100644 --- a/filter/uiconfig/ui/pdfoptionsdialog.ui +++ b/filter/uiconfig/ui/pdfoptionsdialog.ui @@ -20,19 +20,6 @@ False end - - - _Reset - True - True - True - - - False - True - 0 - - E_xport @@ -46,7 +33,7 @@ False True - 1 + 0 @@ -60,7 +47,7 @@ False True - 2 + 1 @@ -74,7 +61,7 @@ False True - 3 + 2 True diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx index effe8bbd5b40..61f0dd0857ba 100644 --- a/include/sfx2/tabdlg.hxx +++ b/include/sfx2/tabdlg.hxx @@ -192,7 +192,6 @@ public: weld::Button* GetStandardButton() const { return m_xBaseFmtBtn.get(); } weld::Button* GetApplyButton() const { return m_xApplyBtn.get(); } weld::Button* GetResetButton() const { return m_xResetBtn.get(); } - void RemoveResetButton(); void RemoveStandardButton(); virtual short run() override; diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 3ff288e15c8d..a5a762d6629b 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -96,13 +96,11 @@ SfxTabDialogItem* SfxTabDialogItem::Clone(SfxItemPool* pToPool) const struct TabDlg_Impl { - bool bHideResetBtn : 1; bool bStarted : 1; std::vector aData; explicit TabDlg_Impl(sal_uInt8 nCnt) - : bHideResetBtn(false) - , bStarted(false) + : bStarted(false) { aData.reserve( nCnt ); } @@ -134,14 +132,17 @@ SfxTabDialogController::SfxTabDialogController , m_bStandardPushed(false) { m_pImpl.reset(new TabDlg_Impl(m_xTabCtrl->get_n_pages())); - m_pImpl->bHideResetBtn = !m_xResetBtn->get_visible(); m_xOKBtn->connect_clicked(LINK(this, SfxTabDialogController, OkHdl)); m_xCancelBtn->connect_clicked(LINK(this, SfxTabDialogController, CancelHdl)); - m_xResetBtn->connect_clicked(LINK(this, SfxTabDialogController, ResetHdl)); - m_xResetBtn->set_label(SfxResId(STR_RESET)); m_xTabCtrl->connect_enter_page(LINK(this, SfxTabDialogController, ActivatePageHdl)); m_xTabCtrl->connect_leave_page(LINK(this, SfxTabDialogController, DeactivatePageHdl)); - m_xResetBtn->set_help_id(HID_TABDLG_RESET_BTN); + + if (m_xResetBtn) + { + m_xResetBtn->connect_clicked(LINK(this, SfxTabDialogController, ResetHdl)); + m_xResetBtn->set_label(SfxResId(STR_RESET)); + m_xResetBtn->set_help_id(HID_TABDLG_RESET_BTN); + } if (bEditFmt) { @@ -159,10 +160,6 @@ SfxTabDialogController::SfxTabDialogController m_xExampleSet.reset(new SfxItemSet(*m_pSet)); m_pOutSet.reset(new SfxItemSet(*m_pSet->GetPool(), m_pSet->GetRanges())); } - - // The reset functionality seems to be confusing to many; disable in LOK. - if (comphelper::LibreOfficeKit::isActive()) - RemoveResetButton(); } IMPL_LINK_NOARG(SfxTabDialogController, OkHdl, weld::Button&, void) @@ -348,10 +345,13 @@ void SfxTabDialogController::ActivatePage(const OUString& rPage) if (m_xExampleSet) pTabPage->ActivatePage(*m_xExampleSet); - if (pTabPage->IsReadOnly() || m_pImpl->bHideResetBtn) - m_xResetBtn->hide(); - else - m_xResetBtn->show(); + if (m_xResetBtn) + { + if (pTabPage->IsReadOnly()) + m_xResetBtn->hide(); + else + m_xResetBtn->show(); + } } IMPL_LINK(SfxTabDialogController, DeactivatePageHdl, const OUString&, rPage, bool) @@ -1110,12 +1110,6 @@ SfxItemSet* SfxTabDialogController::GetInputSetImpl() return m_pSet.get(); } -void SfxTabDialogController::RemoveResetButton() -{ - m_xResetBtn->hide(); - m_pImpl->bHideResetBtn = true; -} - void SfxTabDialogController::RemoveStandardButton() { m_xBaseFmtBtn->hide(); diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index 2c50a49fab8d..e890b94737f6 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -43,8 +43,6 @@ SwFootNoteOptionDlg::SwFootNoteOptionDlg(weld::Window *pParent, SwWrtShell &rS) : SfxTabDialogController(pParent, u"modules/swriter/ui/footendnotedialog.ui"_ustr, u"FootEndnoteDialog"_ustr) , m_rSh( rS ) { - RemoveResetButton(); - GetOKButton().connect_clicked(LINK(this, SwFootNoteOptionDlg, OkHdl)); AddTabPage(u"footnotes"_ustr, TabResId(RID_TAB_FOOTNOTES.aLabel), SwFootNoteOptionPage::Create, diff --git a/sw/uiconfig/swriter/ui/footendnotedialog.ui b/sw/uiconfig/swriter/ui/footendnotedialog.ui index 655aa5bdbd5a..e28a4f1af8ec 100644 --- a/sw/uiconfig/swriter/ui/footendnotedialog.ui +++ b/sw/uiconfig/swriter/ui/footendnotedialog.ui @@ -20,19 +20,6 @@ False end - - - _Reset - True - True - True - - - True - True - 0 - - _OK @@ -46,7 +33,7 @@ False True - 1 + 0 @@ -60,7 +47,7 @@ False True - 2 + 1 @@ -74,7 +61,7 @@ False True - 3 + 2 True