cui/uiconfig/ui/acorreplacepage.ui | 1 - dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 5 +++-- dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx | 4 ++-- dbaccess/source/ui/dlg/dbwizsetup.cxx | 20 ++++++++++++++------ dbaccess/source/ui/dlg/generalpage.cxx | 5 ++++- dbaccess/source/ui/dlg/generalpage.hxx | 4 +++- dbaccess/source/ui/inc/dbwizsetup.hxx | 2 ++ 7 files changed, 28 insertions(+), 13 deletions(-)
New commits: commit 1d5261adcc7ad4178a242651449d189fdbdd91a9 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Oct 20 18:44:18 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sun Oct 20 21:15:57 2019 +0200 Don't need an explicit width_request here I suspect the fix of autocorrect dialog width grows on change of new to replace commit f6a2b24ce17293043f7ddbed0bc218264be6487d Author: Caolán McNamara <caol...@redhat.com> Date: Mon Sep 30 14:18:29 2019 +0100 negates the need for the explicit arbitrary width_request added in tdf#127773 AutoCorrect Dialog AutoCorrect Tab update commit f5bdc014192f92d06ad278ac4ccbdb52c4958b6a Author: andreas kainz <kain...@gmail.com> Date: Wed Oct 2 23:54:46 2019 +0200 Change-Id: I538e98928e50874e5d3c382e454f68c2ac61f0b0 Reviewed-on: https://gerrit.libreoffice.org/81174 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/cui/uiconfig/ui/acorreplacepage.ui b/cui/uiconfig/ui/acorreplacepage.ui index d01afe97eda0..0121257447fc 100644 --- a/cui/uiconfig/ui/acorreplacepage.ui +++ b/cui/uiconfig/ui/acorreplacepage.ui @@ -22,7 +22,6 @@ <property name="column_spacing">12</property> <child> <object class="GtkBox" id="buttonbox"> - <property name="width_request">100</property> <property name="visible">True</property> <property name="can_focus">False</property> <property name="valign">end</property> commit c02c1c2eee57ebf2da29605f62a366720624cb9e Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Oct 20 18:22:43 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sun Oct 20 21:15:37 2019 +0200 cid#1453991 Wrapper object use after free Change-Id: I6476c765589cbb3996ad8832a0e159aa4d965d32 Reviewed-on: https://gerrit.libreoffice.org/81173 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index 98c5b890252a..42bfc5c88079 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -722,12 +722,12 @@ using namespace ::com::sun::star; return bChangedSomething; } - std::unique_ptr<OGenericAdministrationPage> OFinalDBPageSetup::CreateFinalDBTabPageSetup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet) + std::unique_ptr<OGenericAdministrationPage> OFinalDBPageSetup::CreateFinalDBTabPageSetup(weld::Container* pPage, ODbTypeWizDialogSetup* pController, const SfxItemSet& _rAttrSet) { return std::make_unique<OFinalDBPageSetup>(pPage, pController, _rAttrSet); } - OFinalDBPageSetup::OFinalDBPageSetup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs) + OFinalDBPageSetup::OFinalDBPageSetup(weld::Container* pPage, ODbTypeWizDialogSetup* pController, const SfxItemSet& _rCoreAttrs) : OGenericAdministrationPage(pPage, pController, "dbaccess/ui/finalpagewizard.ui", "PageFinal", _rCoreAttrs) , m_xFTFinalHeader(m_xBuilder->weld_label("headerText")) , m_xFTFinalHelpText(m_xBuilder->weld_label("helpText")) @@ -741,6 +741,7 @@ using namespace ::com::sun::star; m_xCBOpenAfterwards->connect_toggled(LINK(this, OFinalDBPageSetup, OnOpenSelected)); m_xCBStartTableWizard->connect_toggled(LINK(this,OGenericAdministrationPage,OnControlModifiedButtonClick)); m_xRBRegisterDataSource->set_active(true); + pController->SetFinalPage(this); } OFinalDBPageSetup::~OFinalDBPageSetup() diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx index d8715bdcf984..9c3f5cb47a17 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx @@ -245,9 +245,9 @@ namespace dbaui { public: virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) override; - static std::unique_ptr<OGenericAdministrationPage> CreateFinalDBTabPageSetup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet); + static std::unique_ptr<OGenericAdministrationPage> CreateFinalDBTabPageSetup(weld::Container* pPage, ODbTypeWizDialogSetup* pController, const SfxItemSet& _rAttrSet); - OFinalDBPageSetup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs); + OFinalDBPageSetup(weld::Container* pPage, ODbTypeWizDialogSetup* pController, const SfxItemSet& _rCoreAttrs); virtual ~OFinalDBPageSetup() override; bool IsDatabaseDocumentToBeRegistered() const; bool IsDatabaseDocumentToBeOpened() const; diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index e85971a64cb1..5ddc06b33fd0 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -452,6 +452,20 @@ void ODbTypeWizDialogSetup::SetIntroPage(OMySQLIntroPageSetup* pPage) m_pMySQLIntroPage->SetClickHdl(LINK( this, ODbTypeWizDialogSetup, ImplClickHdl ) ); } +void ODbTypeWizDialogSetup::SetGeneralPage(OGeneralPageWizard* pPage) +{ + m_pGeneralPage = pPage; + m_pGeneralPage->SetTypeSelectHandler(LINK(this, ODbTypeWizDialogSetup, OnTypeSelected)); + m_pGeneralPage->SetCreationModeHandler(LINK( this, ODbTypeWizDialogSetup, OnChangeCreationMode ) ); + m_pGeneralPage->SetDocumentSelectionHandler(LINK( this, ODbTypeWizDialogSetup, OnRecentDocumentSelected ) ); + m_pGeneralPage->SetChooseDocumentHandler(LINK( this, ODbTypeWizDialogSetup, OnSingleDocumentChosen ) ); +} + +void ODbTypeWizDialogSetup::SetFinalPage(OFinalDBPageSetup* pPage) +{ + m_pFinalPage = pPage; +} + std::unique_ptr<BuilderPage> ODbTypeWizDialogSetup::createPage(WizardState _nState) { std::unique_ptr<OGenericAdministrationPage> xPage; @@ -463,11 +477,6 @@ std::unique_ptr<BuilderPage> ODbTypeWizDialogSetup::createPage(WizardState _nSta { case PAGE_DBSETUPWIZARD_INTRO: xPage = std::make_unique<OGeneralPageWizard>(pPageContainer,this,*m_pOutSet); - m_pGeneralPage = static_cast<OGeneralPageWizard*>(xPage.get()); - m_pGeneralPage->SetTypeSelectHandler(LINK(this, ODbTypeWizDialogSetup, OnTypeSelected)); - m_pGeneralPage->SetCreationModeHandler(LINK( this, ODbTypeWizDialogSetup, OnChangeCreationMode ) ); - m_pGeneralPage->SetDocumentSelectionHandler(LINK( this, ODbTypeWizDialogSetup, OnRecentDocumentSelected ) ); - m_pGeneralPage->SetChooseDocumentHandler(LINK( this, ODbTypeWizDialogSetup, OnSingleDocumentChosen ) ); break; case PAGE_DBSETUPWIZARD_DBASE: @@ -533,7 +542,6 @@ std::unique_ptr<BuilderPage> ODbTypeWizDialogSetup::createPage(WizardState _nSta case PAGE_DBSETUPWIZARD_FINAL: xPage = OFinalDBPageSetup::CreateFinalDBTabPageSetup(pPageContainer, this, *m_pOutSet); - m_pFinalPage = static_cast<OFinalDBPageSetup*>(xPage.get()); break; } diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index 52c1714f776a..cf564821fcf0 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -42,6 +42,7 @@ #include <unotools/confignode.hxx> #include <osl/diagnose.h> #include <sal/log.hxx> +#include <dbwizsetup.hxx> namespace dbaui { @@ -443,7 +444,7 @@ namespace dbaui } // OGeneralPageWizard - OGeneralPageWizard::OGeneralPageWizard(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rItems) + OGeneralPageWizard::OGeneralPageWizard(weld::Container* pPage, ODbTypeWizDialogSetup* pController, const SfxItemSet& _rItems) : OGeneralPage( pPage, pController, "dbaccess/ui/generalpagewizard.ui", _rItems ) , m_xRB_CreateDatabase(m_xBuilder->weld_radio_button("createDatabase")) , m_xRB_OpenExistingDatabase(m_xBuilder->weld_radio_button("openExistingDatabase")) @@ -488,6 +489,8 @@ namespace dbaui m_xRB_OpenExistingDatabase->connect_clicked( LINK( this, OGeneralPageWizard, OnSetupModeSelected ) ); m_xLB_DocumentList->connect_changed( LINK( this, OGeneralPageWizard, OnDocumentSelected ) ); m_xPB_OpenDatabase->connect_clicked( LINK( this, OGeneralPageWizard, OnOpenDocument ) ); + + pController->SetGeneralPage(this); } OGeneralPageWizard::~OGeneralPageWizard() diff --git a/dbaccess/source/ui/dlg/generalpage.hxx b/dbaccess/source/ui/dlg/generalpage.hxx index 1579b6bb74a6..e8af35387728 100644 --- a/dbaccess/source/ui/dlg/generalpage.hxx +++ b/dbaccess/source/ui/dlg/generalpage.hxx @@ -25,6 +25,8 @@ namespace dbaui { + class ODbTypeWizDialogSetup; + // OGeneralPage class OGeneralPage : public OGenericAdministrationPage { @@ -114,7 +116,7 @@ namespace dbaui class OGeneralPageWizard final : public OGeneralPage { public: - OGeneralPageWizard( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rItems ); + OGeneralPageWizard( weld::Container* pPage, ODbTypeWizDialogSetup* pController, const SfxItemSet& _rItems ); virtual ~OGeneralPageWizard() override; enum CreationMode diff --git a/dbaccess/source/ui/inc/dbwizsetup.hxx b/dbaccess/source/ui/inc/dbwizsetup.hxx index c130882139ec..b7205532c2b7 100644 --- a/dbaccess/source/ui/inc/dbwizsetup.hxx +++ b/dbaccess/source/ui/inc/dbwizsetup.hxx @@ -123,6 +123,8 @@ public: bool IsTableWizardToBeStarted() const; void SetIntroPage(OMySQLIntroPageSetup* pPage); + void SetGeneralPage(OGeneralPageWizard* pPage); + void SetFinalPage(OFinalDBPageSetup* pPage); private: /// to override to create new pages _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits