diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-09-24 14:10:48 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-09-26 09:54:49 +0200 |
commit | deb37c44ecfb8f6aa7c2ceec4771b0505fa7b6bb (patch) | |
tree | 3953ca620e27fed0442272fdabea9735fd6f3dcd /dbaccess/source | |
parent | a37e559ed123789f6bc8f7972242d6461ce692ab (diff) |
now drop TabPageParent intermediate
Change-Id: I47328f76342ac023628d9042bdfa8213a1c93d0c
Reviewed-on: https://gerrit.libreoffice.org/79469
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess/source')
40 files changed, 255 insertions, 260 deletions
diff --git a/dbaccess/source/ui/control/ColumnControlWindow.cxx b/dbaccess/source/ui/control/ColumnControlWindow.cxx index 20711d3e6b4e..f1ec5954edce 100644 --- a/dbaccess/source/ui/control/ColumnControlWindow.cxx +++ b/dbaccess/source/ui/control/ColumnControlWindow.cxx @@ -38,7 +38,7 @@ using namespace ::com::sun::star::lang; // OColumnControlWindow OColumnControlWindow::OColumnControlWindow(vcl::Window* pParent ,const Reference<XComponentContext>& _rxContext) - : OFieldDescControl(pParent,nullptr) + : OFieldDescControl(nullptr, pParent, nullptr) , m_xContext(_rxContext) , m_sTypeNames(DBA_RES(STR_TABLEDESIGN_DBFIELDTYPES)) , m_bAutoIncrementEnabled(true) diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index 86a1ed6eb6c0..1e4cfca41a3c 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -77,10 +77,10 @@ namespace } // class OFieldDescControl -OFieldDescControl::OFieldDescControl(TabPageParent pParent, OTableDesignHelpBar* pHelpBar) - :TabPage(pParent.pPage ? Application::GetDefDialogParent() : pParent.pParent.get(), WB_3DLOOK | WB_DIALOGCONTROL) - ,m_xBuilder(pParent.pPage ? Application::CreateBuilder(pParent.pPage, "dbaccess/ui/fielddescpage.ui") - : Application::CreateInterimBuilder(this, "dbaccess/ui/fielddescpage.ui")) +OFieldDescControl::OFieldDescControl(weld::Container* pPage, vcl::Window* pParent, OTableDesignHelpBar* pHelpBar) + :TabPage(pPage ? Application::GetDefDialogParent() : pParent, WB_3DLOOK | WB_DIALOGCONTROL) + ,m_xBuilder(pPage ? Application::CreateBuilder(pPage, "dbaccess/ui/fielddescpage.ui") + : Application::CreateInterimBuilder(this, "dbaccess/ui/fielddescpage.ui")) ,m_xContainer(m_xBuilder->weld_container("FieldDescPage")) ,pHelp( pHelpBar ) ,m_pLastFocusWindow(nullptr) diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index 72fe9b8b0a01..4f01b9a4774b 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -85,8 +85,8 @@ namespace dbaui using namespace ::dbtools; using namespace ::svt; - OConnectionHelper::OConnectionHelper(TabPageParent pParent, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs) - : OGenericAdministrationPage(pParent, _rUIXMLDescription, _rId, _rCoreAttrs) + OConnectionHelper::OConnectionHelper(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs) + : OGenericAdministrationPage(pPage, pController, _rUIXMLDescription, _rId, _rCoreAttrs) , m_bUserGrabFocus(false) , m_pCollection(nullptr) , m_xFT_Connection(m_xBuilder->weld_label("browseurllabel")) diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.hxx b/dbaccess/source/ui/dlg/ConnectionHelper.hxx index 9d38e1d67b4d..4af8bbcef480 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.hxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.hxx @@ -40,7 +40,7 @@ namespace dbaui bool m_bUserGrabFocus; public: - OConnectionHelper(TabPageParent pParent, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs); + OConnectionHelper(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs); virtual ~OConnectionHelper() override; OUString m_eType; // the type can't be changed in this class, so we hold it as member. diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx index e9618fec8e05..4dacff794c91 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx @@ -76,14 +76,14 @@ namespace dbaui using namespace ::dbtools; using namespace ::svt; - std::unique_ptr<SfxTabPage> OConnectionTabPage::Create(TabPageParent pParent, const SfxItemSet* _rAttrSet) + std::unique_ptr<SfxTabPage> OConnectionTabPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet) { - return std::make_unique<OConnectionTabPage>(pParent, *_rAttrSet); + return std::make_unique<OConnectionTabPage>(pPage, pController, *_rAttrSet); } // OConnectionTabPage - OConnectionTabPage::OConnectionTabPage(TabPageParent pParent, const SfxItemSet& _rCoreAttrs) - : OConnectionHelper(pParent, "dbaccess/ui/connectionpage.ui", "ConnectionPage", _rCoreAttrs) + OConnectionTabPage::OConnectionTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs) + : OConnectionHelper(pPage, pController, "dbaccess/ui/connectionpage.ui", "ConnectionPage", _rCoreAttrs) , m_xFL2(m_xBuilder->weld_label("userlabel")) , m_xUserNameLabel(m_xBuilder->weld_label("userNameLabel")) , m_xUserName(m_xBuilder->weld_entry("userNameEntry")) diff --git a/dbaccess/source/ui/dlg/ConnectionPage.hxx b/dbaccess/source/ui/dlg/ConnectionPage.hxx index 8ce5e1050ccf..11509f3bfb1d 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.hxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.hxx @@ -55,8 +55,8 @@ namespace dbaui DECL_LINK(OnEditModified, weld::Entry&, void); public: - OConnectionTabPage(TabPageParent pParent, const SfxItemSet& _rCoreAttrs); - static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* _rAttrSet); + OConnectionTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs); + static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet); virtual ~OConnectionTabPage() override; virtual bool FillItemSet (SfxItemSet* _rCoreAttrs) override; diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx index 141f81fce5f0..198cb096419e 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx @@ -61,33 +61,33 @@ namespace dbaui using namespace ::dbtools; using namespace ::svt; - std::unique_ptr<OGenericAdministrationPage> OConnectionTabPageSetup::CreateDbaseTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) + std::unique_ptr<OGenericAdministrationPage> OConnectionTabPageSetup::CreateDbaseTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet) { - return std::make_unique<OConnectionTabPageSetup>( pParent, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, STR_DBASE_HELPTEXT, STR_DBASE_HEADERTEXT, STR_DBASE_PATH_OR_FILE ); + return std::make_unique<OConnectionTabPageSetup>( pPage, pController, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, STR_DBASE_HELPTEXT, STR_DBASE_HEADERTEXT, STR_DBASE_PATH_OR_FILE ); } - std::unique_ptr<OGenericAdministrationPage> OConnectionTabPageSetup::CreateMSAccessTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) + std::unique_ptr<OGenericAdministrationPage> OConnectionTabPageSetup::CreateMSAccessTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet) { - return std::make_unique<OConnectionTabPageSetup>( pParent, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, STR_MSACCESS_HELPTEXT, STR_MSACCESS_HEADERTEXT, STR_MSACCESS_MDB_FILE ); + return std::make_unique<OConnectionTabPageSetup>( pPage, pController, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, STR_MSACCESS_HELPTEXT, STR_MSACCESS_HEADERTEXT, STR_MSACCESS_MDB_FILE ); } - std::unique_ptr<OGenericAdministrationPage> OConnectionTabPageSetup::CreateADOTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) + std::unique_ptr<OGenericAdministrationPage> OConnectionTabPageSetup::CreateADOTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet) { - return std::make_unique<OConnectionTabPageSetup>( pParent, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, STR_ADO_HELPTEXT, STR_ADO_HEADERTEXT, STR_COMMONURL ); + return std::make_unique<OConnectionTabPageSetup>( pPage, pController, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, STR_ADO_HELPTEXT, STR_ADO_HEADERTEXT, STR_COMMONURL ); } - std::unique_ptr<OGenericAdministrationPage> OConnectionTabPageSetup::CreateODBCTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) + std::unique_ptr<OGenericAdministrationPage> OConnectionTabPageSetup::CreateODBCTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet) { - return std::make_unique<OConnectionTabPageSetup>( pParent, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, STR_ODBC_HELPTEXT, STR_ODBC_HEADERTEXT, STR_NAME_OF_ODBC_DATASOURCE ); + return std::make_unique<OConnectionTabPageSetup>( pPage, pController, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, STR_ODBC_HELPTEXT, STR_ODBC_HEADERTEXT, STR_NAME_OF_ODBC_DATASOURCE ); } - std::unique_ptr<OGenericAdministrationPage> OConnectionTabPageSetup::CreateUserDefinedTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) + std::unique_ptr<OGenericAdministrationPage> OConnectionTabPageSetup::CreateUserDefinedTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet) { - return std::make_unique<OConnectionTabPageSetup>(pParent, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, nullptr, nullptr, STR_COMMONURL); + return std::make_unique<OConnectionTabPageSetup>(pPage, pController, "dbaccess/ui/dbwizconnectionpage.ui", "ConnectionPage", _rAttrSet, nullptr, nullptr, STR_COMMONURL); } - OConnectionTabPageSetup::OConnectionTabPageSetup(TabPageParent pParent, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs, const char* pHelpTextResId, const char* pHeaderResId, const char* pUrlResId) - : OConnectionHelper(pParent, _rUIXMLDescription, _rId, _rCoreAttrs) + OConnectionTabPageSetup::OConnectionTabPageSetup(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs, const char* pHelpTextResId, const char* pHeaderResId, const char* pUrlResId) + : OConnectionHelper(pPage, pController, _rUIXMLDescription, _rId, _rCoreAttrs) , m_xHelpText(m_xBuilder->weld_label("helptext")) , m_xHeaderText(m_xBuilder->weld_label("header")) { diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx index b456f722f8ea..5ad6b7022bed 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx @@ -43,14 +43,14 @@ namespace dbaui DECL_LINK(OnEditModified, weld::Entry&, void); public: - OConnectionTabPageSetup(TabPageParent pParent, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs, const char* pHelpTextResId, const char* pHeaderResId, const char* pUrlResId); + OConnectionTabPageSetup(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs, const char* pHelpTextResId, const char* pHeaderResId, const char* pUrlResId); virtual ~OConnectionTabPageSetup() override; - static std::unique_ptr<OGenericAdministrationPage> CreateDbaseTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet); - static std::unique_ptr<OGenericAdministrationPage> CreateMSAccessTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet); - static std::unique_ptr<OGenericAdministrationPage> CreateADOTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet); - static std::unique_ptr<OGenericAdministrationPage> CreateODBCTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet); - static std::unique_ptr<OGenericAdministrationPage> CreateUserDefinedTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet); + static std::unique_ptr<OGenericAdministrationPage> CreateDbaseTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet); + static std::unique_ptr<OGenericAdministrationPage> CreateMSAccessTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet); + static std::unique_ptr<OGenericAdministrationPage> CreateADOTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet); + static std::unique_ptr<OGenericAdministrationPage> CreateODBCTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet); + static std::unique_ptr<OGenericAdministrationPage> CreateUserDefinedTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet); virtual bool FillItemSet (SfxItemSet* _rCoreAttrs) override; diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index b6a0bf5c962c..86ec9aba7eeb 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -60,14 +60,14 @@ namespace dbaui { using namespace ::com::sun::star; - std::unique_ptr<OGenericAdministrationPage> OTextConnectionPageSetup::CreateTextTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) + std::unique_ptr<OGenericAdministrationPage> OTextConnectionPageSetup::CreateTextTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet) { - return std::make_unique<OTextConnectionPageSetup>(pParent, _rAttrSet); + return std::make_unique<OTextConnectionPageSetup>(pPage, pController, _rAttrSet); } // OTextConnectionPageSetup - OTextConnectionPageSetup::OTextConnectionPageSetup(TabPageParent pParent, const SfxItemSet& rCoreAttrs) - : OConnectionTabPageSetup(pParent, "dbaccess/ui/dbwiztextpage.ui", "DBWizTextPage", + OTextConnectionPageSetup::OTextConnectionPageSetup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs) + : OConnectionTabPageSetup(pPage, pController, "dbaccess/ui/dbwiztextpage.ui", "DBWizTextPage", rCoreAttrs, STR_TEXT_HELPTEXT, STR_TEXT_HEADERTEXT, STR_TEXT_PATH_OR_FILE) , m_xSubContainer(m_xBuilder->weld_widget("TextPageContainer")) , m_xTextConnectionHelper(new OTextConnectionHelper(m_xSubContainer.get(), TC_EXTENSION | TC_SEPARATORS)) @@ -126,14 +126,14 @@ using namespace ::com::sun::star; return m_xTextConnectionHelper->prepareLeave(); } - std::unique_ptr<OGenericAdministrationPage> OLDAPConnectionPageSetup::CreateLDAPTabPage( TabPageParent pParent, const SfxItemSet& _rAttrSet ) + std::unique_ptr<OGenericAdministrationPage> OLDAPConnectionPageSetup::CreateLDAPTabPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet ) { - return std::make_unique<OLDAPConnectionPageSetup>(pParent, _rAttrSet); + return std::make_unique<OLDAPConnectionPageSetup>(pPage, pController, _rAttrSet); } // OLDAPPageSetup - OLDAPConnectionPageSetup::OLDAPConnectionPageSetup( TabPageParent pParent, const SfxItemSet& _rCoreAttrs ) - : OGenericAdministrationPage(pParent, "dbaccess/ui/ldapconnectionpage.ui", "LDAPConnectionPage", _rCoreAttrs) + OLDAPConnectionPageSetup::OLDAPConnectionPageSetup( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs ) + : OGenericAdministrationPage(pPage, pController, "dbaccess/ui/ldapconnectionpage.ui", "LDAPConnectionPage", _rCoreAttrs) , m_xFTHelpText(m_xBuilder->weld_label("helpLabel")) , m_xFTHostServer(m_xBuilder->weld_label("hostNameLabel")) , m_xETHostServer(m_xBuilder->weld_entry("hostNameEntry")) @@ -219,13 +219,13 @@ using namespace ::com::sun::star; OGenericAdministrationPage::callModifiedHdl(); } - std::unique_ptr<OMySQLIntroPageSetup> OMySQLIntroPageSetup::CreateMySQLIntroTabPage(TabPageParent pParent, const SfxItemSet& rAttrSet) + std::unique_ptr<OMySQLIntroPageSetup> OMySQLIntroPageSetup::CreateMySQLIntroTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rAttrSet) { - return std::make_unique<OMySQLIntroPageSetup>(pParent, rAttrSet); + return std::make_unique<OMySQLIntroPageSetup>(pPage, pController, rAttrSet); } - OMySQLIntroPageSetup::OMySQLIntroPageSetup(TabPageParent pParent, const SfxItemSet& _rCoreAttrs) - : OGenericAdministrationPage(pParent, "dbaccess/ui/dbwizmysqlintropage.ui", "DBWizMysqlIntroPage", _rCoreAttrs) + OMySQLIntroPageSetup::OMySQLIntroPageSetup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs) + : OGenericAdministrationPage(pPage, pController, "dbaccess/ui/dbwizmysqlintropage.ui", "DBWizMysqlIntroPage", _rCoreAttrs) , m_xODBCDatabase(m_xBuilder->weld_radio_button("odbc")) , m_xJDBCDatabase(m_xBuilder->weld_radio_button("jdbc")) , m_xNATIVEDatabase(m_xBuilder->weld_radio_button("directly")) @@ -288,8 +288,8 @@ using namespace ::com::sun::star; } // MySQLNativeSetupPage - MySQLNativeSetupPage::MySQLNativeSetupPage( TabPageParent pParent, const SfxItemSet& rCoreAttrs ) - : OGenericAdministrationPage(pParent, "dbaccess/ui/dbwizmysqlnativepage.ui", "DBWizMysqlNativePage", rCoreAttrs) + MySQLNativeSetupPage::MySQLNativeSetupPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs ) + : OGenericAdministrationPage(pPage, pController, "dbaccess/ui/dbwizmysqlnativepage.ui", "DBWizMysqlNativePage", rCoreAttrs) , m_xHelpText(m_xBuilder->weld_label("helptext")) , m_xSettingsContainer(m_xBuilder->weld_container("MySQLSettingsContainer")) , m_xMySQLSettings(new MySQLNativeSettings(m_xSettingsContainer.get(), LINK(this, OGenericAdministrationPage, OnControlModified))) @@ -302,9 +302,9 @@ using namespace ::com::sun::star; m_xMySQLSettings.reset(); } - std::unique_ptr<OGenericAdministrationPage> MySQLNativeSetupPage::Create(TabPageParent pParent, const SfxItemSet& rAttrSet) + std::unique_ptr<OGenericAdministrationPage> MySQLNativeSetupPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rAttrSet) { - return std::make_unique<MySQLNativeSetupPage>(pParent, rAttrSet); + return std::make_unique<MySQLNativeSetupPage>(pPage, pController, rAttrSet); } void MySQLNativeSetupPage::fillControls( std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList ) @@ -340,8 +340,8 @@ using namespace ::com::sun::star; } // OMySQLJDBCConnectionPageSetup - OGeneralSpecialJDBCConnectionPageSetup::OGeneralSpecialJDBCConnectionPageSetup( TabPageParent pParent, const SfxItemSet& _rCoreAttrs ,sal_uInt16 _nPortId, const char* pDefaultPortResId, const char* pHelpTextResId, const char* pHeaderTextResId, const char* pDriverClassId) - : OGenericAdministrationPage(pParent, "dbaccess/ui/specialjdbcconnectionpage.ui", "SpecialJDBCConnectionPage", _rCoreAttrs) + OGeneralSpecialJDBCConnectionPageSetup::OGeneralSpecialJDBCConnectionPageSetup( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs ,sal_uInt16 _nPortId, const char* pDefaultPortResId, const char* pHelpTextResId, const char* pHeaderTextResId, const char* pDriverClassId) + : OGenericAdministrationPage(pPage, pController, "dbaccess/ui/specialjdbcconnectionpage.ui", "SpecialJDBCConnectionPage", _rCoreAttrs) , m_nPortId(_nPortId) , m_xHeaderText(m_xBuilder->weld_label("header")) , m_xFTHelpText(m_xBuilder->weld_label("helpLabel")) @@ -386,9 +386,9 @@ using namespace ::com::sun::star; { } - std::unique_ptr<OGenericAdministrationPage> OGeneralSpecialJDBCConnectionPageSetup::CreateMySQLJDBCTabPage( TabPageParent pParent, const SfxItemSet& _rAttrSet ) + std::unique_ptr<OGenericAdministrationPage> OGeneralSpecialJDBCConnectionPageSetup::CreateMySQLJDBCTabPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet ) { - return std::make_unique<OGeneralSpecialJDBCConnectionPageSetup>(pParent, + return std::make_unique<OGeneralSpecialJDBCConnectionPageSetup>(pPage, pController, _rAttrSet, DSID_MYSQL_PORTNUMBER , STR_MYSQL_DEFAULT, @@ -397,9 +397,9 @@ using namespace ::com::sun::star; STR_MYSQL_DRIVERCLASSTEXT); } - std::unique_ptr<OGenericAdministrationPage> OGeneralSpecialJDBCConnectionPageSetup::CreateOracleJDBCTabPage( TabPageParent pParent, const SfxItemSet& _rAttrSet ) + std::unique_ptr<OGenericAdministrationPage> OGeneralSpecialJDBCConnectionPageSetup::CreateOracleJDBCTabPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet ) { - return std::make_unique<OGeneralSpecialJDBCConnectionPageSetup>(pParent, + return std::make_unique<OGeneralSpecialJDBCConnectionPageSetup>(pPage, pController, _rAttrSet, DSID_ORACLE_PORTNUMBER, STR_ORACLE_DEFAULT, @@ -510,14 +510,14 @@ using namespace ::com::sun::star; OGenericAdministrationPage::callModifiedHdl(); } - std::unique_ptr<OGenericAdministrationPage> OJDBCConnectionPageSetup::CreateJDBCTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) + std::unique_ptr<OGenericAdministrationPage> OJDBCConnectionPageSetup::CreateJDBCTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet) { - return std::make_unique<OJDBCConnectionPageSetup>(pParent, _rAttrSet); + return std::make_unique<OJDBCConnectionPageSetup>(pPage, pController, _rAttrSet); } // OMySQLJDBCConnectionPageSetup - OJDBCConnectionPageSetup::OJDBCConnectionPageSetup(TabPageParent pParent, const SfxItemSet& rCoreAttrs) - : OConnectionTabPageSetup(pParent, "dbaccess/ui/jdbcconnectionpage.ui", "JDBCConnectionPage", rCoreAttrs, + OJDBCConnectionPageSetup::OJDBCConnectionPageSetup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs) + : OConnectionTabPageSetup(pPage, pController, "dbaccess/ui/jdbcconnectionpage.ui", "JDBCConnectionPage", rCoreAttrs, STR_JDBC_HELPTEXT, STR_JDBC_HEADERTEXT, STR_COMMONURL) , m_xFTDriverClass(m_xBuilder->weld_label("jdbcLabel")) , m_xETDriverClass(m_xBuilder->weld_entry("jdbcEntry")) @@ -622,13 +622,13 @@ using namespace ::com::sun::star; callModifiedHdl(); } - std::unique_ptr<OGenericAdministrationPage> OSpreadSheetConnectionPageSetup::CreateDocumentOrSpreadSheetTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) + std::unique_ptr<OGenericAdministrationPage> OSpreadSheetConnectionPageSetup::CreateDocumentOrSpreadSheetTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet) { - return std::make_unique<OSpreadSheetConnectionPageSetup>(pParent, _rAttrSet); + return std::make_unique<OSpreadSheetConnectionPageSetup>(pPage, pController, _rAttrSet); } - OSpreadSheetConnectionPageSetup::OSpreadSheetConnectionPageSetup(TabPageParent pParent, const SfxItemSet& rCoreAttrs) - : OConnectionTabPageSetup(pParent, "dbaccess/ui/dbwizspreadsheetpage.ui", "DBWizSpreadsheetPage", + OSpreadSheetConnectionPageSetup::OSpreadSheetConnectionPageSetup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs) + : OConnectionTabPageSetup(pPage, pController, "dbaccess/ui/dbwizspreadsheetpage.ui", "DBWizSpreadsheetPage", rCoreAttrs, STR_SPREADSHEET_HELPTEXT, STR_SPREADSHEET_HEADERTEXT, STR_SPREADSHEETPATH) , m_xPasswordrequired(m_xBuilder->weld_check_button("passwordrequired")) { @@ -657,13 +657,13 @@ using namespace ::com::sun::star; return bChangedSomething; } - std::unique_ptr<OGenericAdministrationPage> OAuthentificationPageSetup::CreateAuthentificationTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet) + std::unique_ptr<OGenericAdministrationPage> OAuthentificationPageSetup::CreateAuthentificationTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet) { - return std::make_unique<OAuthentificationPageSetup>(pParent, _rAttrSet); + return std::make_unique<OAuthentificationPageSetup>(pPage, pController, _rAttrSet); } - OAuthentificationPageSetup::OAuthentificationPageSetup(TabPageParent pParent, const SfxItemSet& _rCoreAttrs) - : OGenericAdministrationPage(pParent, "dbaccess/ui/authentificationpage.ui", "AuthentificationPage", _rCoreAttrs) + OAuthentificationPageSetup::OAuthentificationPageSetup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs) + : OGenericAdministrationPage(pPage, pController, "dbaccess/ui/authentificationpage.ui", "AuthentificationPage", _rCoreAttrs) , m_xFTHelpText(m_xBuilder->weld_label("helptext")) , m_xFTUserName(m_xBuilder->weld_label("generalUserNameLabel")) , m_xETUserName(m_xBuilder->weld_entry("generalUserNameEntry")) @@ -720,13 +720,13 @@ using namespace ::com::sun::star; return bChangedSomething; } - std::unique_ptr<OGenericAdministrationPage> OFinalDBPageSetup::CreateFinalDBTabPageSetup(TabPageParent pParent, const SfxItemSet& _rAttrSet) + std::unique_ptr<OGenericAdministrationPage> OFinalDBPageSetup::CreateFinalDBTabPageSetup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet) { - return std::make_unique<OFinalDBPageSetup>(pParent, _rAttrSet); + return std::make_unique<OFinalDBPageSetup>(pPage, pController, _rAttrSet); } - OFinalDBPageSetup::OFinalDBPageSetup(TabPageParent pParent, const SfxItemSet& _rCoreAttrs) - : OGenericAdministrationPage(pParent, "dbaccess/ui/finalpagewizard.ui", "PageFinal", _rCoreAttrs) + OFinalDBPageSetup::OFinalDBPageSetup(weld::Container* pPage, weld::DialogController* 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")) , m_xRBRegisterDataSource(m_xBuilder->weld_radio_button("yesregister")) diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx index 23d20562ad66..b0f51a854a0f 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx @@ -40,8 +40,8 @@ namespace dbaui { public: virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) override; - static std::unique_ptr<OGenericAdministrationPage> CreateDocumentOrSpreadSheetTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet); - OSpreadSheetConnectionPageSetup(TabPageParent pParent, const SfxItemSet& _rCoreAttrs); + static std::unique_ptr<OGenericAdministrationPage> CreateDocumentOrSpreadSheetTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet); + OSpreadSheetConnectionPageSetup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs); virtual ~OSpreadSheetConnectionPageSetup() override; private: @@ -56,8 +56,8 @@ namespace dbaui { public: virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) override; - static std::unique_ptr<OGenericAdministrationPage> CreateTextTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet ); - OTextConnectionPageSetup(TabPageParent pParent, const SfxItemSet& _rCoreAttrs); + static std::unique_ptr<OGenericAdministrationPage> CreateTextTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet ); + OTextConnectionPageSetup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs); virtual ~OTextConnectionPageSetup() override; protected: virtual bool prepareLeave() override; @@ -76,8 +76,8 @@ namespace dbaui { public: virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) override; - static std::unique_ptr<OGenericAdministrationPage> CreateLDAPTabPage( TabPageParent pParent, const SfxItemSet& _rAttrSet ); - OLDAPConnectionPageSetup( TabPageParent pParent, const SfxItemSet& _rCoreAttrs ); + static std::unique_ptr<OGenericAdministrationPage> CreateLDAPTabPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet ); + OLDAPConnectionPageSetup( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs ); virtual ~OLDAPConnectionPageSetup() override; virtual void callModifiedHdl(weld::Widget* pControl = nullptr) override; @@ -107,10 +107,10 @@ namespace dbaui std::unique_ptr<MySQLNativeSettings> m_xMySQLSettings; public: - MySQLNativeSetupPage(TabPageParent pParent, const SfxItemSet& rCoreAttrs); + MySQLNativeSetupPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs); virtual ~MySQLNativeSetupPage() override; - static std::unique_ptr<OGenericAdministrationPage> Create(TabPageParent pParent, const SfxItemSet& rAttrSet); + static std::unique_ptr<OGenericAdministrationPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rAttrSet); protected: virtual void fillControls( std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList ) override; @@ -126,7 +126,7 @@ namespace dbaui class OGeneralSpecialJDBCConnectionPageSetup final : public OGenericAdministrationPage { public: - OGeneralSpecialJDBCConnectionPageSetup(TabPageParent pParent + OGeneralSpecialJDBCConnectionPageSetup(weld::Container* pPage, weld::DialogController* pController , const SfxItemSet& _rCoreAttrs , sal_uInt16 _nPortId , const char* pDefaultPortResId @@ -134,8 +134,8 @@ namespace dbaui , const char* pHeaderTextResId , const char* pDriverClassId ); virtual ~OGeneralSpecialJDBCConnectionPageSetup() override; - static std::unique_ptr<OGenericAdministrationPage> CreateMySQLJDBCTabPage( TabPageParent pParent, const SfxItemSet& _rAttrSet ); - static std::unique_ptr<OGenericAdministrationPage> CreateOracleJDBCTabPage( TabPageParent pParent, const SfxItemSet& _rAttrSet ); + static std::unique_ptr<OGenericAdministrationPage> CreateMySQLJDBCTabPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet ); + static std::unique_ptr<OGenericAdministrationPage> CreateOracleJDBCTabPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet ); private: virtual bool FillItemSet( SfxItemSet* _rCoreAttrs ) override; @@ -168,9 +168,9 @@ namespace dbaui class OJDBCConnectionPageSetup final : public OConnectionTabPageSetup { public: - OJDBCConnectionPageSetup(TabPageParent pParent, const SfxItemSet& _rCoreAttrs); + OJDBCConnectionPageSetup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs); virtual ~OJDBCConnectionPageSetup() override; - static std::unique_ptr<OGenericAdministrationPage> CreateJDBCTabPage(TabPageParent pParent, const SfxItemSet& rAttrSet); + static std::unique_ptr<OGenericAdministrationPage> CreateJDBCTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rAttrSet); private: virtual bool checkTestConnection() override; @@ -198,10 +198,10 @@ namespace dbaui VIA_NATIVE }; - OMySQLIntroPageSetup(TabPageParent pParent, const SfxItemSet& rCoreAttrs); + OMySQLIntroPageSetup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs); virtual ~OMySQLIntroPageSetup() override; - static std::unique_ptr<OMySQLIntroPageSetup> CreateMySQLIntroTabPage(TabPageParent pParent, const SfxItemSet& rAttrSet); + static std::unique_ptr<OMySQLIntroPageSetup> CreateMySQLIntroTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rAttrSet); ConnectionType getMySQLMode() const; void SetClickHdl( const Link<OMySQLIntroPageSetup *, void>& rLink ) { maClickHdl = rLink; } @@ -225,8 +225,8 @@ namespace dbaui { public: virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) override; - static std::unique_ptr<OGenericAdministrationPage> CreateAuthentificationTabPage(TabPageParent pParent, const SfxItemSet& _rAttrSet); - OAuthentificationPageSetup(TabPageParent pParent, const SfxItemSet& _rCoreAttrs); + static std::unique_ptr<OGenericAdministrationPage> CreateAuthentificationTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet); + OAuthentificationPageSetup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs); virtual ~OAuthentificationPageSetup() override; private: @@ -246,9 +246,9 @@ namespace dbaui { public: virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) override; - static std::unique_ptr<OGenericAdministrationPage> CreateFinalDBTabPageSetup(TabPageParent pParent, const SfxItemSet& _rAttrSet); + static std::unique_ptr<OGenericAdministrationPage> CreateFinalDBTabPageSetup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet); - OFinalDBPageSetup(TabPageParent pParent, const SfxItemSet& _rCoreAttrs); + OFinalDBPageSetup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs); virtual ~OFinalDBPageSetup() override; bool IsDatabaseDocumentToBeRegistered() const; bool IsDatabaseDocumentToBeOpened() const; diff --git a/dbaccess/source/ui/dlg/DriverSettings.hxx b/dbaccess/source/ui/dlg/DriverSettings.hxx index dc1482b7184f..367277bde656 100644 --- a/dbaccess/source/ui/dlg/DriverSettings.hxx +++ b/dbaccess/source/ui/dlg/DriverSettings.hxx @@ -36,48 +36,48 @@ namespace dbaui /** Creates the detail page for ado */ - static std::unique_ptr<SfxTabPage> CreateDbase( TabPageParent _pParent, const SfxItemSet* _rAttrSet ); + static std::unique_ptr<SfxTabPage> CreateDbase( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet ); /** Creates the detail page for ado */ - static std::unique_ptr<SfxTabPage> CreateAdo( TabPageParent _pParent, const SfxItemSet* _rAttrSet ); + static std::unique_ptr<SfxTabPage> CreateAdo( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet ); /** Creates the detail page for ODBC */ - static std::unique_ptr<SfxTabPage> CreateODBC( TabPageParent _pParent, const SfxItemSet* _rAttrSet ); + static std::unique_ptr<SfxTabPage> CreateODBC( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet ); /** Creates the detail page for user */ - static std::unique_ptr<SfxTabPage> CreateUser( TabPageParent _pParent, const SfxItemSet* _rAttrSet ); + static std::unique_ptr<SfxTabPage> CreateUser( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet ); /** Creates the detail page for MySQLODBC */ - static std::unique_ptr<SfxTabPage> CreateMySQLODBC( TabPageParent _pParent, const SfxItemSet* _rAttrSet ); + static std::unique_ptr<SfxTabPage> CreateMySQLODBC( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet ); /** Creates the detail page for MySQLJDBC */ - static std::unique_ptr<SfxTabPage> CreateMySQLJDBC( TabPageParent _pParent, const SfxItemSet* _rAttrSet ); + static std::unique_ptr<SfxTabPage> CreateMySQLJDBC( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet ); /** Creates the detail page for MySQLNATIVE */ - static std::unique_ptr<SfxTabPage> CreateMySQLNATIVE( TabPageParent _pParent, const SfxItemSet* _rAttrSet ); + static std::unique_ptr<SfxTabPage> CreateMySQLNATIVE( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet ); /** Creates the detail page for Oracle JDBC */ - static std::unique_ptr<SfxTabPage> CreateOracleJDBC( TabPageParent pParent, const SfxItemSet* _rAttrSet ); + static std::unique_ptr<SfxTabPage> CreateOracleJDBC( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet ); /** Creates the detail page for LDAP */ - static std::unique_ptr<SfxTabPage> CreateLDAP( TabPageParent _pParent, const SfxItemSet* _rAttrSet ); + static std::unique_ptr<SfxTabPage> CreateLDAP( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet ); /// Creates the detail page for Text - static std::unique_ptr<SfxTabPage> CreateText( TabPageParent _pParent, const SfxItemSet* _rAttrSet ); + static std::unique_ptr<SfxTabPage> CreateText( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet ); /// creates the GeneratedValues page - static std::unique_ptr<SfxTabPage> CreateGeneratedValuesPage( TabPageParent _pParent, const SfxItemSet* _rAttrSet ); + static std::unique_ptr<SfxTabPage> CreateGeneratedValuesPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet ); /// creates the "Special Settings" page of the "Advanced Settings" dialog - static std::unique_ptr<SfxTabPage> CreateSpecialSettingsPage( TabPageParent _pParent, const SfxItemSet* _rAttrSet ); + static std::unique_ptr<SfxTabPage> CreateSpecialSettingsPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet ); }; } diff --git a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx index ab8a20fa0385..f1e74c7e47c0 100644 --- a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx +++ b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx @@ -48,8 +48,7 @@ OTableSubscriptionDialog::OTableSubscriptionDialog(weld::Window* pParent m_pImpl->translateProperties(xDatasource, *m_pOutSet); SetInputSet(m_pOutSet.get()); - TabPageParent pPageParent(get_content_area(), this); - auto xTabPage = std::make_unique<OTableSubscriptionPage>(pPageParent, *m_pOutSet, this); + auto xTabPage = std::make_unique<OTableSubscriptionPage>(get_content_area(), this, *m_pOutSet); xTabPage->SetServiceFactory(_rxORB); SetTabPage(std::move(xTabPage)); } diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx index 4d65851e0664..7e08b356be8b 100644 --- a/dbaccess/source/ui/dlg/UserAdmin.cxx +++ b/dbaccess/source/ui/dlg/UserAdmin.cxx @@ -108,8 +108,8 @@ IMPL_LINK(OPasswordDialog, ModifiedHdl, weld::Entry&, rEdit, void) } // OUserAdmin -OUserAdmin::OUserAdmin(TabPageParent pParent,const SfxItemSet& _rAttrSet) - : OGenericAdministrationPage(pParent, "dbaccess/ui/useradminpage.ui", "UserAdminPage", _rAttrSet) +OUserAdmin::OUserAdmin(weld::Container* pPage, weld::DialogController* pController,const SfxItemSet& _rAttrSet) + : OGenericAdministrationPage(pPage, pController, "dbaccess/ui/useradminpage.ui", "UserAdminPage", _rAttrSet) , m_xUSER(m_xBuilder->weld_combo_box("user")) , m_xNEWUSER(m_xBuilder->weld_button("add")) , m_xCHANGEPWD(m_xBuilder->weld_button("changepass")) @@ -180,9 +180,9 @@ void OUserAdmin::FillUserNames() m_xTableCtrl->Enable(m_xUsers.is()); } -std::unique_ptr<SfxTabPage> OUserAdmin::Create( TabPageParent pParent, const SfxItemSet* _rAttrSet ) +std::unique_ptr<SfxTabPage> OUserAdmin::Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet ) { - return std::make_unique<OUserAdmin>( pParent, *_rAttrSet ); + return std::make_unique<OUserAdmin>( pPage, pController, *_rAttrSet ); } IMPL_LINK(OUserAdmin, UserHdl, weld::Button&, rButton, void) diff --git a/dbaccess/source/ui/dlg/UserAdmin.hxx b/dbaccess/source/ui/dlg/UserAdmin.hxx index 50561a95f256..a69b338f6744 100644 --- a/dbaccess/source/ui/dlg/UserAdmin.hxx +++ b/dbaccess/source/ui/dlg/UserAdmin.hxx @@ -58,8 +58,8 @@ class OUserAdmin final : public OGenericAdministrationPage void FillUserNames(); public: - OUserAdmin(TabPageParent pParent, const SfxItemSet& _rCoreAttrs); - static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet); + OUserAdmin(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs); + static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet); virtual ~OUserAdmin() override; OUString GetUser() const; diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index 6678824e28db..5a88cba1771c 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -54,8 +54,8 @@ namespace dbaui { } - OGenericAdministrationPage::OGenericAdministrationPage(TabPageParent pParent, const OUString& rUIXMLDescription, const OString& rId, const SfxItemSet& rAttrSet) - : SfxTabPage(pParent, rUIXMLDescription, rId, &rAttrSet) + OGenericAdministrationPage::OGenericAdministrationPage(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription, const OString& rId, const SfxItemSet& rAttrSet) + : SfxTabPage(pPage, pController, rUIXMLDescription, rId, &rAttrSet) , m_abEnableRoadmap(false) , m_pAdminDialog(nullptr) , m_pItemSetHelper(nullptr) diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx index bc473b627ece..0caab50c9636 100644 --- a/dbaccess/source/ui/dlg/adminpages.hxx +++ b/dbaccess/source/ui/dlg/adminpages.hxx @@ -101,7 +101,7 @@ namespace dbaui css::uno::Reference< css::uno::XComponentContext > m_xORB; public: - OGenericAdministrationPage(TabPageParent pParent, const OUString& rUIXMLDescription, const OString& rId, const SfxItemSet& rAttrSet); + OGenericAdministrationPage(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription, const OString& rId, const SfxItemSet& rAttrSet); /// set a handler which gets called every time something on the page has been modified void SetModifiedHandler(const Link<OGenericAdministrationPage const *, void>& _rHandler) { m_aModifiedHandler = _rHandler; } diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index 02661a2871c0..72715285b013 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -54,8 +54,8 @@ namespace dbaui }; // SpecialSettingsPage - SpecialSettingsPage::SpecialSettingsPage(TabPageParent pParent, const SfxItemSet& _rCoreAttrs, const DataSourceMetaData& _rDSMeta) - : OGenericAdministrationPage(pParent, "dbaccess/ui/specialsettingspage.ui", "SpecialSettingsPage", _rCoreAttrs) + SpecialSettingsPage::SpecialSettingsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs, const DataSourceMetaData& _rDSMeta) + : OGenericAdministrationPage(pPage, pController, "dbaccess/ui/specialsettingspage.ui", "SpecialSettingsPage", _rCoreAttrs) , m_aBooleanSettings { { m_xIsSQL92Check, "usesql92", DSID_SQL92CHECK, false, false }, { m_xAppendTableAlias, "append", DSID_APPEND_TABLE_ALIAS, false, false }, @@ -284,8 +284,8 @@ namespace dbaui } // GeneratedValuesPage - GeneratedValuesPage::GeneratedValuesPage(TabPageParent pParent, const SfxItemSet& _rCoreAttrs) - : OGenericAdministrationPage(pParent, "dbaccess/ui/generatedvaluespage.ui", "GeneratedValuesPage", _rCoreAttrs) + GeneratedValuesPage::GeneratedValuesPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs) + : OGenericAdministrationPage(pPage, pController, "dbaccess/ui/generatedvaluespage.ui", "GeneratedValuesPage", _rCoreAttrs) , m_xAutoRetrievingEnabled(m_xBuilder->weld_check_button("autoretrieve")) , m_xGrid(m_xBuilder->weld_widget("grid")) , m_xAutoIncrementLabel(m_xBuilder->weld_label("statementft")) diff --git a/dbaccess/source/ui/dlg/advancedsettings.hxx b/dbaccess/source/ui/dlg/advancedsettings.hxx index 002c5cda4ac1..85848c716c97 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.hxx +++ b/dbaccess/source/ui/dlg/advancedsettings.hxx @@ -72,7 +72,7 @@ namespace dbaui virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) override; - SpecialSettingsPage(TabPageParent pParent, const SfxItemSet& _rCoreAttrs, const DataSourceMetaData& _rDSMeta); + SpecialSettingsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs, const DataSourceMetaData& _rDSMeta); virtual ~SpecialSettingsPage() override; private: @@ -101,7 +101,7 @@ namespace dbaui public: virtual bool FillItemSet (SfxItemSet* _rCoreAttrs) override; - GeneratedValuesPage(TabPageParent pParent, const SfxItemSet& _rCoreAttrs); + GeneratedValuesPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs); virtual ~GeneratedValuesPage() override; private: diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx index 76e933a40651..b136744ed975 100644 --- a/dbaccess/source/ui/dlg/dbwiz.cxx +++ b/dbaccess/source/ui/dlg/dbwiz.cxx @@ -226,53 +226,51 @@ std::unique_ptr<BuilderPage> ODbTypeWizDialog::createPage(WizardState _nState) OString sIdent(OString::number(_nState)); weld::Container* pPageContainer = m_xAssistant->append_page(sIdent); - // TODO eventually pass DialogController as distinct argument instead of bundling into TabPageParent - TabPageParent aParent(pPageContainer, this); switch(_nState) { case START_PAGE: // start state { - xPage = std::make_unique<OGeneralPageDialog>(aParent, *m_pOutSet); + xPage = std::make_unique<OGeneralPageDialog>(pPageContainer, this, *m_pOutSet); OGeneralPage* pGeneralPage = static_cast<OGeneralPage*>(xPage.get()); pGeneralPage->SetTypeSelectHandler( LINK( this, ODbTypeWizDialog, OnTypeSelected)); pStringId = STR_PAGETITLE_GENERAL; } break; case CONNECTION_PAGE: - xPage = OConnectionTabPage::Create(aParent, m_pOutSet.get()); + xPage = OConnectionTabPage::Create(pPageContainer, this, m_pOutSet.get()); pStringId = STR_PAGETITLE_CONNECTION; break; case ADDITIONAL_PAGE_DBASE: - xPage = ODriversSettings::CreateDbase(aParent, m_pOutSet.get()); + xPage = ODriversSettings::CreateDbase(pPageContainer, this, m_pOutSet.get()); break; case ADDITIONAL_PAGE_FLAT: - xPage = ODriversSettings::CreateText(aParent, m_pOutSet.get()); + xPage = ODriversSettings::CreateText(pPageContainer, this, m_pOutSet.get()); break; case ADDITIONAL_PAGE_LDAP: - xPage = ODriversSettings::CreateLDAP(aParent, m_pOutSet.get()); + xPage = ODriversSettings::CreateLDAP(pPageContainer, this, m_pOutSet.get()); break; case ADDITIONAL_PAGE_MYSQL_JDBC: - xPage = ODriversSettings::CreateMySQLJDBC(aParent, m_pOutSet.get()); + xPage = ODriversSettings::CreateMySQLJDBC(pPageContainer, this, m_pOutSet.get()); break; case ADDITIONAL_PAGE_MYSQL_NATIVE: - xPage = ODriversSettings::CreateMySQLNATIVE(aParent, m_pOutSet.get()); + xPage = ODriversSettings::CreateMySQLNATIVE(pPageContainer, this, m_pOutSet.get()); break; case ADDITIONAL_PAGE_MYSQL_ODBC: - xPage = ODriversSettings::CreateMySQLODBC(aParent, m_pOutSet.get()); + xPage = ODriversSettings::CreateMySQLODBC(pPageContainer, this, m_pOutSet.get()); break; case ADDITIONAL_PAGE_ORACLE_JDBC: - xPage = ODriversSettings::CreateOracleJDBC(aParent, m_pOutSet.get()); + xPage = ODriversSettings::CreateOracleJDBC(pPageContainer, this, m_pOutSet.get()); break; case ADDITIONAL_PAGE_ADO: - xPage = ODriversSettings::CreateAdo(aParent, m_pOutSet.get()); + xPage = ODriversSettings::CreateAdo(pPageContainer, this, m_pOutSet.get()); break; case ADDITIONAL_PAGE_ODBC: - xPage = ODriversSettings::CreateODBC(aParent, m_pOutSet.get()); + xPage = ODriversSettings::CreateODBC(pPageContainer, this, m_pOutSet.get()); break; case ADDITIONAL_USERDEFINED: - xPage = ODriversSettings::CreateUser(aParent, m_pOutSet.get()); + xPage = ODriversSettings::CreateUser(pPageContainer, this, m_pOutSet.get()); break; default: OSL_FAIL("Wrong state!"); diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index 6431801d82a7..a68ec099e218 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -452,13 +452,11 @@ std::unique_ptr<BuilderPage> ODbTypeWizDialogSetup::createPage(WizardState _nSta OString sIdent(OString::number(_nState)); weld::Container* pPageContainer = m_xAssistant->append_page(sIdent); - // TODO eventually pass DialogController as distinct argument instead of bundling into TabPageParent - TabPageParent aParent(pPageContainer, this); switch(_nState) { case PAGE_DBSETUPWIZARD_INTRO: - xPage = std::make_unique<OGeneralPageWizard>(aParent,*m_pOutSet); + 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 ) ); @@ -467,70 +465,70 @@ std::unique_ptr<BuilderPage> ODbTypeWizDialogSetup::createPage(WizardState _nSta break; case PAGE_DBSETUPWIZARD_DBASE: - xPage = OConnectionTabPageSetup::CreateDbaseTabPage(aParent, *m_pOutSet); + xPage = OConnectionTabPageSetup::CreateDbaseTabPage(pPageContainer, this, *m_pOutSet); break; case PAGE_DBSETUPWIZARD_ADO: - xPage = OConnectionTabPageSetup::CreateADOTabPage(aParent, *m_pOutSet); + xPage = OConnectionTabPageSetup::CreateADOTabPage(pPageContainer, this, *m_pOutSet); break; case PAGE_DBSETUPWIZARD_TEXT: - xPage = OTextConnectionPageSetup::CreateTextTabPage(aParent, *m_pOutSet); + xPage = OTextConnectionPageSetup::CreateTextTabPage(pPageContainer, this, *m_pOutSet); break; case PAGE_DBSETUPWIZARD_ODBC: - xPage = OConnectionTabPageSetup::CreateODBCTabPage(aParent, *m_pOutSet); + xPage = OConnectionTabPageSetup::CreateODBCTabPage(pPageContainer, this, *m_pOutSet); break; case PAGE_DBSETUPWIZARD_JDBC: - xPage = OJDBCConnectionPageSetup::CreateJDBCTabPage(aParent, *m_pOutSet); + xPage = OJDBCConnectionPageSetup::CreateJDBCTabPage(pPageContainer, this, *m_pOutSet); break; case PAGE_DBSETUPWIZARD_MYSQL_ODBC: m_pOutSet->Put(SfxStringItem(DSID_CONNECTURL, m_pCollection->getPrefix("sdbc:mysql:odbc:"))); - xPage = OConnectionTabPageSetup::CreateODBCTabPage(aParent, *m_pOutSet); + xPage = OConnectionTabPageSetup::CreateODBCTabPage(pPageContainer, this, *m_pOutSet); break; case PAGE_DBSETUPWIZARD_MYSQL_JDBC: m_pOutSet->Put(SfxStringItem(DSID_CONNECTURL, m_pCollection->getPrefix("sdbc:mysql:jdbc:"))); - xPage = OGeneralSpecialJDBCConnectionPageSetup::CreateMySQLJDBCTabPage(aParent, *m_pOutSet); + xPage = OGeneralSpecialJDBCConnectionPageSetup::CreateMySQLJDBCTabPage(pPageContainer, this, *m_pOutSet); break; case PAGE_DBSETUPWIZARD_MYSQL_NATIVE: m_pOutSet->Put(SfxStringItem(DSID_CONNECTURL, m_pCollection->getPrefix("sdbc:mysql:mysqlc:"))); - xPage = MySQLNativeSetupPage::Create(aParent, *m_pOutSet); + xPage = MySQLNativeSetupPage::Create(pPageContainer, this, *m_pOutSet); break; case PAGE_DBSETUPWIZARD_ORACLE: - xPage = OGeneralSpecialJDBCConnectionPageSetup::CreateOracleJDBCTabPage(aParent, *m_pOutSet); + xPage = OGeneralSpecialJDBCConnectionPageSetup::CreateOracleJDBCTabPage(pPageContainer, this, *m_pOutSet); break; case PAGE_DBSETUPWIZARD_LDAP: - xPage = OLDAPConnectionPageSetup::CreateLDAPTabPage(aParent, *m_pOutSet); + xPage = OLDAPConnectionPageSetup::CreateLDAPTabPage(pPageContainer, this, *m_pOutSet); break; case PAGE_DBSETUPWIZARD_DOCUMENT_OR_SPREADSHEET: - xPage = OSpreadSheetConnectionPageSetup::CreateDocumentOrSpreadSheetTabPage(aParent, *m_pOutSet); + xPage = OSpreadSheetConnectionPageSetup::CreateDocumentOrSpreadSheetTabPage(pPageContainer, this, *m_pOutSet); break; case PAGE_DBSETUPWIZARD_MSACCESS: - xPage = OConnectionTabPageSetup::CreateMSAccessTabPage(aParent, *m_pOutSet); + xPage = OConnectionTabPageSetup::CreateMSAccessTabPage(pPageContainer, this, *m_pOutSet); break; case PAGE_DBSETUPWIZARD_MYSQL_INTRO: - xPage = OMySQLIntroPageSetup::CreateMySQLIntroTabPage(aParent, *m_pOutSet); + xPage = OMySQLIntroPageSetup::CreateMySQLIntroTabPage(pPageContainer, this, *m_pOutSet); m_pMySQLIntroPage = static_cast<OMySQLIntroPageSetup*>(xPage.get()); m_pMySQLIntroPage->SetClickHdl(LINK( this, ODbTypeWizDialogSetup, ImplClickHdl ) ); break; case PAGE_DBSETUPWIZARD_AUTHENTIFICATION: - xPage = OAuthentificationPageSetup::CreateAuthentificationTabPage(aParent, *m_pOutSet); + xPage = OAuthentificationPageSetup::CreateAuthentificationTabPage(pPageContainer, this, *m_pOutSet); break; case PAGE_DBSETUPWIZARD_USERDEFINED: - xPage = OConnectionTabPageSetup::CreateUserDefinedTabPage(aParent, *m_pOutSet); + xPage = OConnectionTabPageSetup::CreateUserDefinedTabPage(pPageContainer, this, *m_pOutSet); break; case PAGE_DBSETUPWIZARD_FINAL: - xPage = OFinalDBPageSetup::CreateFinalDBTabPageSetup(aParent, *m_pOutSet); + xPage = OFinalDBPageSetup::CreateFinalDBTabPageSetup(pPageContainer, this, *m_pOutSet); m_pFinalPage = static_cast<OFinalDBPageSetup*>(xPage.get()); break; } diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx index 21ad0a6e312d..b41f59bc7260 100644 --- a/dbaccess/source/ui/dlg/detailpages.cxx +++ b/dbaccess/source/ui/dlg/detailpages.cxx @@ -54,10 +54,10 @@ namespace dbaui using namespace ::com::sun::star::container; using namespace ::dbtools; - OCommonBehaviourTabPage::OCommonBehaviourTabPage(TabPageParent pParent, + OCommonBehaviourTabPage::OCommonBehaviourTabPage(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription, const OString& rId, const SfxItemSet& rCoreAttrs, OCommonBehaviourTabPageFlags nControlFlags) - : OGenericAdministrationPage(pParent, rUIXMLDescription, rId, rCoreAttrs) + : OGenericAdministrationPage(pPage, pController, rUIXMLDescription, rId, rCoreAttrs) , m_nControlFlags(nControlFlags) { if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseOptions) @@ -159,8 +159,8 @@ namespace dbaui } // ODbaseDetailsPage - ODbaseDetailsPage::ODbaseDetailsPage(TabPageParent pParent, const SfxItemSet& _rCoreAttrs) - : OCommonBehaviourTabPage(pParent, "dbaccess/ui/dbasepage.ui", "DbasePage", + ODbaseDetailsPage::ODbaseDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs) + : OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/dbasepage.ui", "DbasePage", _rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset) , m_xShowDeleted(m_xBuilder->weld_check_button("showDelRowsCheckbutton")) , m_xFT_Message(m_xBuilder->weld_label("specMessageLabel")) @@ -174,9 +174,9 @@ namespace dbaui { } - std::unique_ptr<SfxTabPage> ODriversSettings::CreateDbase(TabPageParent pParent, const SfxItemSet* _rAttrSet) + std::unique_ptr<SfxTabPage> ODriversSettings::CreateDbase(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet) { - return std::make_unique<ODbaseDetailsPage>(pParent, *_rAttrSet); + return std::make_unique<ODbaseDetailsPage>(pPage, pController, *_rAttrSet); } void ODbaseDetailsPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) @@ -228,21 +228,21 @@ namespace dbaui } // OAdoDetailsPage - OAdoDetailsPage::OAdoDetailsPage(TabPageParent pParent, const SfxItemSet& rCoreAttrs) - : OCommonBehaviourTabPage(pParent, "dbaccess/ui/autocharsetpage.ui", "AutoCharset", + OAdoDetailsPage::OAdoDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs) + : OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/autocharsetpage.ui", "AutoCharset", rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset ) { } - std::unique_ptr<SfxTabPage> ODriversSettings::CreateAdo(TabPageParent pParent, const SfxItemSet* rAttrSet) + std::unique_ptr<SfxTabPage> ODriversSettings::CreateAdo(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet) { - return std::make_unique<OAdoDetailsPage>(pParent, *rAttrSet); + return std::make_unique<OAdoDetailsPage>(pPage, pController, *rAttrSet); } // OOdbcDetailsPage - OOdbcDetailsPage::OOdbcDetailsPage(TabPageParent pParent, const SfxItemSet& rCoreAttrs) - : OCommonBehaviourTabPage(pParent, "dbaccess/ui/odbcpage.ui", "ODBC", rCoreAttrs, + OOdbcDetailsPage::OOdbcDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs) + : OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/odbcpage.ui", "ODBC", rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset | OCommonBehaviourTabPageFlags::UseOptions) , m_xUseCatalog(m_xBuilder->weld_check_button("useCatalogCheckbutton")) { @@ -253,9 +253,9 @@ namespace dbaui { } - std::unique_ptr<SfxTabPage> ODriversSettings::CreateODBC(TabPageParent pParent, const SfxItemSet* pAttrSet) + std::unique_ptr<SfxTabPage> ODriversSettings::CreateODBC(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* pAttrSet) { - return std::make_unique<OOdbcDetailsPage>(pParent, *pAttrSet); + return std::make_unique<OOdbcDetailsPage>(pPage, pController, *pAttrSet); } bool OOdbcDetailsPage::FillItemSet( SfxItemSet* _rSet ) @@ -278,8 +278,8 @@ namespace dbaui OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue); } // OOdbcDetailsPage - OUserDriverDetailsPage::OUserDriverDetailsPage(TabPageParent pParent, const SfxItemSet& rCoreAttrs) - : OCommonBehaviourTabPage(pParent, "dbaccess/ui/userdetailspage.ui", "UserDetailsPage", + OUserDriverDetailsPage::OUserDriverDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs) + : OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/userdetailspage.ui", "UserDetailsPage", rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset | OCommonBehaviourTabPageFlags::UseOptions) , m_xFTHostname(m_xBuilder->weld_label("hostnameft")) , m_xEDHostname(m_xBuilder->weld_entry("hostname")) @@ -294,9 +294,9 @@ namespace dbaui { } - std::unique_ptr<SfxTabPage> ODriversSettings::CreateUser(TabPageParent pParent, const SfxItemSet* pAttrSet) + std::unique_ptr<SfxTabPage> ODriversSettings::CreateUser(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* pAttrSet) { - return std::make_unique<OUserDriverDetailsPage>(pParent, *pAttrSet); + return std::make_unique<OUserDriverDetailsPage>(pPage, pController, *pAttrSet); } bool OUserDriverDetailsPage::FillItemSet( SfxItemSet* _rSet ) @@ -346,20 +346,20 @@ namespace dbaui OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue); } // OMySQLODBCDetailsPage - OMySQLODBCDetailsPage::OMySQLODBCDetailsPage(TabPageParent pParent, const SfxItemSet& rCoreAttrs) - : OCommonBehaviourTabPage(pParent, "dbaccess/ui/autocharsetpage.ui", "AutoCharset", + OMySQLODBCDetailsPage::OMySQLODBCDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs) + : OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/autocharsetpage.ui", "AutoCharset", rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset ) { } - std::unique_ptr<SfxTabPage> ODriversSettings::CreateMySQLODBC(TabPageParent pParent, const SfxItemSet* pAttrSet) + std::unique_ptr<SfxTabPage> ODriversSettings::CreateMySQLODBC(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* pAttrSet) { - return std::make_unique<OMySQLODBCDetailsPage>(pParent, *pAttrSet); + return std::make_unique<OMySQLODBCDetailsPage>(pPage, pController, *pAttrSet); } // OMySQLJDBCDetailsPage - OGeneralSpecialJDBCDetailsPage::OGeneralSpecialJDBCDetailsPage(TabPageParent pParent, const SfxItemSet& rCoreAttrs ,sal_uInt16 _nPortId, bool bShowSocket) - : OCommonBehaviourTabPage(pParent, "dbaccess/ui/generalspecialjdbcdetailspage.ui", "GeneralSpecialJDBCDetails", + OGeneralSpecialJDBCDetailsPage::OGeneralSpecialJDBCDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs ,sal_uInt16 _nPortId, bool bShowSocket) + : OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/generalspecialjdbcdetailspage.ui", "GeneralSpecialJDBCDetails", rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset) , m_nPortId(_nPortId) , m_bUseClass(true) @@ -489,8 +489,8 @@ namespace dbaui } // MySQLNativePage - MySQLNativePage::MySQLNativePage(TabPageParent pParent, const SfxItemSet& rCoreAttrs) - : OCommonBehaviourTabPage(pParent, "dbaccess/ui/mysqlnativepage.ui", "MysqlNativePage", rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset) + MySQLNativePage::MySQLNativePage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs) + : OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/mysqlnativepage.ui", "MysqlNativePage", rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset) , m_xMySQLSettingsContainer(m_xBuilder->weld_widget("MySQLSettingsContainer")) , m_xMySQLSettings(new MySQLNativeSettings(m_xMySQLSettingsContainer.get(), LINK(this,OGenericAdministrationPage,OnControlModified))) , m_xSeparator1(m_xBuilder->weld_label("connectionheader")) @@ -563,24 +563,24 @@ namespace dbaui OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue); } - std::unique_ptr<SfxTabPage> ODriversSettings::CreateMySQLJDBC( TabPageParent pParent, const SfxItemSet* _rAttrSet ) + std::unique_ptr<SfxTabPage> ODriversSettings::CreateMySQLJDBC( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet ) { - return std::make_unique<OGeneralSpecialJDBCDetailsPage>(pParent, *_rAttrSet,DSID_MYSQL_PORTNUMBER); + return std::make_unique<OGeneralSpecialJDBCDetailsPage>(pPage, pController, *_rAttrSet,DSID_MYSQL_PORTNUMBER); } - std::unique_ptr<SfxTabPage> ODriversSettings::CreateMySQLNATIVE(TabPageParent pParent, const SfxItemSet* pAttrSet) + std::unique_ptr<SfxTabPage> ODriversSettings::CreateMySQLNATIVE(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* pAttrSet) { - return std::make_unique<MySQLNativePage>(pParent, *pAttrSet); + return std::make_unique<MySQLNativePage>(pPage, pController, *pAttrSet); } - std::unique_ptr<SfxTabPage> ODriversSettings::CreateOracleJDBC(TabPageParent pParent, const SfxItemSet* _rAttrSet) + std::unique_ptr<SfxTabPage> ODriversSettings::CreateOracleJDBC(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet) { - return std::make_unique<OGeneralSpecialJDBCDetailsPage>(pParent, *_rAttrSet,DSID_ORACLE_PORTNUMBER, false); + return std::make_unique<OGeneralSpecialJDBCDetailsPage>(pPage, pController, *_rAttrSet,DSID_ORACLE_PORTNUMBER, false); } // OLDAPDetailsPage - OLDAPDetailsPage::OLDAPDetailsPage(TabPageParent pParent, const SfxItemSet& rCoreAttrs) - : OCommonBehaviourTabPage(pParent, "dbaccess/ui/ldappage.ui", "LDAP", + OLDAPDetailsPage::OLDAPDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs) + : OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/ldappage.ui", "LDAP", rCoreAttrs, OCommonBehaviourTabPageFlags::NONE) , m_xETBaseDN(m_xBuilder->weld_entry("baseDNEntry")) , m_xCBUseSSL(m_xBuilder->weld_check_button("useSSLCheckbutton")) @@ -600,9 +600,9 @@ namespace dbaui { } - std::unique_ptr<SfxTabPage> ODriversSettings::CreateLDAP(TabPageParent pParent, const SfxItemSet* _rAttrSet) + std::unique_ptr<SfxTabPage> ODriversSettings::CreateLDAP(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet) { - return std::make_unique<OLDAPDetailsPage>(pParent, *_rAttrSet); + return std::make_unique<OLDAPDetailsPage>(pPage, pController, *_rAttrSet); } bool OLDAPDetailsPage::FillItemSet( SfxItemSet* _rSet ) @@ -655,8 +655,8 @@ namespace dbaui } // OTextDetailsPage - OTextDetailsPage::OTextDetailsPage(TabPageParent pParent, const SfxItemSet& rCoreAttrs) - : OCommonBehaviourTabPage(pParent, "dbaccess/ui/emptypage.ui", "EmptyPage", rCoreAttrs, OCommonBehaviourTabPageFlags::NONE) + OTextDetailsPage::OTextDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs) + : OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/emptypage.ui", "EmptyPage", rCoreAttrs, OCommonBehaviourTabPageFlags::NONE) , m_xTextConnectionHelper(new OTextConnectionHelper(m_xContainer.get(), TC_EXTENSION | TC_HEADER | TC_SEPARATORS | TC_CHARSET)) { } @@ -666,9 +666,9 @@ namespace dbaui m_xTextConnectionHelper.reset(); } - std::unique_ptr<SfxTabPage> ODriversSettings::CreateText(TabPageParent pParent, const SfxItemSet* pAttrSet) + std::unique_ptr<SfxTabPage> ODriversSettings::CreateText(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* pAttrSet) { - return std::make_unique<OTextDetailsPage>(pParent, *pAttrSet); + return std::make_unique<OTextDetailsPage>(pPage, pController, *pAttrSet); } void OTextDetailsPage::fillControls(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList) @@ -705,16 +705,16 @@ namespace dbaui return m_xTextConnectionHelper->prepareLeave(); } - std::unique_ptr<SfxTabPage> ODriversSettings::CreateGeneratedValuesPage(TabPageParent pParent, const SfxItemSet* _rAttrSet) + std::unique_ptr<SfxTabPage> ODriversSettings::CreateGeneratedValuesPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet) { - return std::make_unique<GeneratedValuesPage>(pParent, *_rAttrSet); + return std::make_unique<GeneratedValuesPage>(pPage, pController, *_rAttrSet); } - std::unique_ptr<SfxTabPage> ODriversSettings::CreateSpecialSettingsPage(TabPageParent pParent, const SfxItemSet* _rAttrSet) + std::unique_ptr<SfxTabPage> ODriversSettings::CreateSpecialSettingsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet) { OUString eType = ODbDataSourceAdministrationHelper::getDatasourceType( *_rAttrSet ); DataSourceMetaData aMetaData( eType ); - return std::make_unique<SpecialSettingsPage>(pParent, *_rAttrSet, aMetaData); + return std::make_unique<SpecialSettingsPage>(pPage, pController, *_rAttrSet, aMetaData); } } // namespace dbaui diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx index bc0086d65648..541c289255f6 100644 --- a/dbaccess/source/ui/dlg/detailpages.hxx +++ b/dbaccess/source/ui/dlg/detailpages.hxx @@ -65,7 +65,7 @@ namespace dbaui public: virtual bool FillItemSet (SfxItemSet* _rCoreAttrs) override; - OCommonBehaviourTabPage(TabPageParent pParent, const OUString& rUIXMLDescription, const OString& rId, const SfxItemSet& _rCoreAttrs, OCommonBehaviourTabPageFlags nControlFlags); + OCommonBehaviourTabPage(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription, const OString& rId, const SfxItemSet& _rCoreAttrs, OCommonBehaviourTabPageFlags nControlFlags); protected: virtual ~OCommonBehaviourTabPage() override; @@ -89,7 +89,7 @@ namespace dbaui public: virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) override; - ODbaseDetailsPage(TabPageParent pParent, const SfxItemSet& _rCoreAttrs); + ODbaseDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs); virtual ~ODbaseDetailsPage() override; private: OUString m_sDsn; @@ -109,7 +109,7 @@ namespace dbaui class OAdoDetailsPage : public OCommonBehaviourTabPage { public: - OAdoDetailsPage(TabPageParent pParent, const SfxItemSet& rCoreAttrs); + OAdoDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs); }; // OOdbcDetailsPage @@ -118,7 +118,7 @@ namespace dbaui public: virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) override; - OOdbcDetailsPage(TabPageParent pParent, const SfxItemSet& rCoreAttrs); + OOdbcDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs); virtual ~OOdbcDetailsPage() override; protected: virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) override; @@ -132,7 +132,7 @@ namespace dbaui public: virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) override; - OUserDriverDetailsPage(TabPageParent pParent, const SfxItemSet& _rCoreAttrs); + OUserDriverDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs); virtual ~OUserDriverDetailsPage() override; protected: virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) override; @@ -150,14 +150,14 @@ namespace dbaui class OMySQLODBCDetailsPage : public OCommonBehaviourTabPage { public: - OMySQLODBCDetailsPage(TabPageParent pParent, const SfxItemSet& rCoreAttrs); + OMySQLODBCDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs); }; // OGeneralSpecialJDBCDetailsPage class OGeneralSpecialJDBCDetailsPage final : public OCommonBehaviourTabPage { public: - OGeneralSpecialJDBCDetailsPage(TabPageParent pParent, + OGeneralSpecialJDBCDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nPortId, bool bShowSocket = true); @@ -188,7 +188,7 @@ namespace dbaui class MySQLNativePage : public OCommonBehaviourTabPage { public: - MySQLNativePage(TabPageParent pParent, const SfxItemSet& rCoreAttrs); + MySQLNativePage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs); virtual ~MySQLNativePage() override; private: @@ -213,7 +213,7 @@ namespace dbaui public: virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) override; - OLDAPDetailsPage(TabPageParent pParent, const SfxItemSet& rCoreAttrs); + OLDAPDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs); virtual ~OLDAPDetailsPage() override; protected: virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) override; @@ -235,7 +235,7 @@ namespace dbaui public: virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) override; - OTextDetailsPage(TabPageParent pParent, const SfxItemSet& rCoreAttrs); + OTextDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs); virtual ~OTextDetailsPage() override; protected: diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index 8c65d9720f41..97cf3ef08625 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -53,8 +53,8 @@ namespace dbaui using namespace ::com::sun::star::container; // OGeneralPage - OGeneralPage::OGeneralPage(TabPageParent pParent, const OUString& _rUIXMLDescription, const SfxItemSet& _rItems) - : OGenericAdministrationPage(pParent, _rUIXMLDescription, "PageGeneral", _rItems) + OGeneralPage::OGeneralPage(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const SfxItemSet& _rItems) + : OGenericAdministrationPage(pPage, pController, _rUIXMLDescription, "PageGeneral", _rItems) , m_xSpecialMessage(m_xBuilder->weld_label("specialMessage")) , m_eLastMessage(smNone) , m_bInitTypeList(true) @@ -401,8 +401,8 @@ namespace dbaui } // OGeneralPageDialog - OGeneralPageDialog::OGeneralPageDialog(TabPageParent pParent, const SfxItemSet& _rItems) - : OGeneralPage(pParent, "dbaccess/ui/generalpagedialog.ui", _rItems) + OGeneralPageDialog::OGeneralPageDialog(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rItems) + : OGeneralPage(pPage, pController, "dbaccess/ui/generalpagedialog.ui", _rItems) { } @@ -444,8 +444,8 @@ namespace dbaui } // OGeneralPageWizard - OGeneralPageWizard::OGeneralPageWizard(TabPageParent pParent, const SfxItemSet& _rItems) - : OGeneralPage( pParent, "dbaccess/ui/generalpagewizard.ui", _rItems ) + OGeneralPageWizard::OGeneralPageWizard(weld::Container* pPage, weld::DialogController* 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")) , m_xRB_ConnectDatabase(m_xBuilder->weld_radio_button("connectDatabase")) diff --git a/dbaccess/source/ui/dlg/generalpage.hxx b/dbaccess/source/ui/dlg/generalpage.hxx index 4200b16483d2..1579b6bb74a6 100644 --- a/dbaccess/source/ui/dlg/generalpage.hxx +++ b/dbaccess/source/ui/dlg/generalpage.hxx @@ -29,7 +29,7 @@ namespace dbaui class OGeneralPage : public OGenericAdministrationPage { protected: - OGeneralPage(TabPageParent pParent, const OUString& _rUIXMLDescription, const SfxItemSet& _rItems); + OGeneralPage(weld::Container* pPage, weld::DialogController* pController, const OUString& _rUIXMLDescription, const SfxItemSet& _rItems); OUString m_eCurrentSelection; /// currently selected type @@ -101,7 +101,7 @@ namespace dbaui class OGeneralPageDialog : public OGeneralPage { public: - OGeneralPageDialog(TabPageParent pParent, const SfxItemSet& _rItems); + OGeneralPageDialog(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rItems); protected: virtual bool FillItemSet( SfxItemSet* _rCoreAttrs ) override; @@ -114,7 +114,7 @@ namespace dbaui class OGeneralPageWizard final : public OGeneralPage { public: - OGeneralPageWizard( TabPageParent pParent, const SfxItemSet& _rItems ); + OGeneralPageWizard( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rItems ); virtual ~OGeneralPageWizard() override; enum CreationMode diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index ec1d912ac7cf..fb42e7ec49ab 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -65,11 +65,10 @@ namespace dbaui using namespace ::comphelper; // OTableSubscriptionPage - OTableSubscriptionPage::OTableSubscriptionPage(TabPageParent pParent, const SfxItemSet& _rCoreAttrs, - OTableSubscriptionDialog* _pTablesDlg) - : OGenericAdministrationPage(pParent, "dbaccess/ui/tablesfilterpage.ui", "TablesFilterPage", _rCoreAttrs) + OTableSubscriptionPage::OTableSubscriptionPage(weld::Container* pPage, OTableSubscriptionDialog* pTablesDlg, const SfxItemSet& _rCoreAttrs) + : OGenericAdministrationPage(pPage, pTablesDlg, "dbaccess/ui/tablesfilterpage.ui", "TablesFilterPage", _rCoreAttrs) , m_bCatalogAtStart(true) - , m_pTablesDlg(_pTablesDlg) + , m_pTablesDlg(pTablesDlg) , m_xTables(m_xBuilder->weld_widget("TablesFilterPage")) , m_xTablesList(new TableTreeListBox(m_xBuilder->weld_tree_view("treeview"))) { diff --git a/dbaccess/source/ui/dlg/tablespage.hxx b/dbaccess/source/ui/dlg/tablespage.hxx index 24ef1c05f9e5..d545e9408bc6 100644 --- a/dbaccess/source/ui/dlg/tablespage.hxx +++ b/dbaccess/source/ui/dlg/tablespage.hxx @@ -49,7 +49,7 @@ namespace dbaui virtual bool FillItemSet(SfxItemSet* _rCoreAttrs) override; virtual DeactivateRC DeactivatePage(SfxItemSet* _pSet) override; - OTableSubscriptionPage(TabPageParent pParent, const SfxItemSet& _rCoreAttrs ,OTableSubscriptionDialog* _pTablesDlg); + OTableSubscriptionPage(weld::Container* pPage, OTableSubscriptionDialog* pController, const SfxItemSet& _rCoreAttrs); virtual ~OTableSubscriptionPage() override; private: diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx b/dbaccess/source/ui/inc/FieldDescControl.hxx index 5a4c6111eb05..cd247af88380 100644 --- a/dbaccess/source/ui/inc/FieldDescControl.hxx +++ b/dbaccess/source/ui/inc/FieldDescControl.hxx @@ -164,7 +164,7 @@ namespace dbaui void implFocusLost(weld::Widget* _pWhich); public: - OFieldDescControl(TabPageParent pParent, OTableDesignHelpBar* pHelpBar); + OFieldDescControl(weld::Container* pPage, vcl::Window* pParent, OTableDesignHelpBar* pHelpBar); virtual ~OFieldDescControl() override; virtual void dispose() override; diff --git a/dbaccess/source/ui/inc/WCPage.hxx b/dbaccess/source/ui/inc/WCPage.hxx index 4bfeb5909a13..e3fc5af1bc57 100644 --- a/dbaccess/source/ui/inc/WCPage.hxx +++ b/dbaccess/source/ui/inc/WCPage.hxx @@ -59,7 +59,7 @@ namespace dbaui virtual bool LeavePage() override; virtual OUString GetTitle() const override ; - OCopyTable(OCopyTableWizard* pWizard, TabPageParent pParent); + OCopyTable(weld::Container* pParent, OCopyTableWizard* pWizard); virtual ~OCopyTable() override; bool IsOptionDefData() const { return m_xRB_DefData->get_active(); } diff --git a/dbaccess/source/ui/inc/WColumnSelect.hxx b/dbaccess/source/ui/inc/WColumnSelect.hxx index 23024c46b021..0121af1f2e5e 100644 --- a/dbaccess/source/ui/inc/WColumnSelect.hxx +++ b/dbaccess/source/ui/inc/WColumnSelect.hxx @@ -78,7 +78,7 @@ namespace dbaui virtual bool LeavePage() override; virtual OUString GetTitle() const override ; - OWizColumnSelect(OCopyTableWizard* pWizard, TabPageParent pParent); + OWizColumnSelect(weld::Container* pParent, OCopyTableWizard* pWizard); virtual ~OWizColumnSelect() override; }; } diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx b/dbaccess/source/ui/inc/WCopyTable.hxx index e12c00b159cb..f076c0c24131 100644 --- a/dbaccess/source/ui/inc/WCopyTable.hxx +++ b/dbaccess/source/ui/inc/WCopyTable.hxx @@ -296,7 +296,7 @@ namespace dbaui sal_uInt16 GetCurLevel() const { return getCurrentState(); } - TabPageParent CreatePageContainer(); + weld::Container* CreatePageContainer(); public: // used for copy tables or queries diff --git a/dbaccess/source/ui/inc/WExtendPages.hxx b/dbaccess/source/ui/inc/WExtendPages.hxx index b9cc15b6fda1..05a251c0ee8b 100644 --- a/dbaccess/source/ui/inc/WExtendPages.hxx +++ b/dbaccess/source/ui/inc/WExtendPages.hxx @@ -32,12 +32,12 @@ namespace dbaui protected: virtual void createReaderAndCallParser(sal_Int32 _nRows) override; public: - OWizHTMLExtend(OCopyTableWizard* pWizard, TabPageParent pParent, SvStream& rStream) - : OWizTypeSelect(pWizard, pParent, &rStream) + OWizHTMLExtend(weld::Container* pPage, OCopyTableWizard* pWizard, SvStream& rStream) + : OWizTypeSelect(pPage, pWizard, &rStream) { } - static std::unique_ptr<OWizTypeSelect> Create(OCopyTableWizard* pWizard, TabPageParent pParent, SvStream& rInput ) { return std::make_unique<OWizHTMLExtend>(pWizard, pParent, rInput); } + static std::unique_ptr<OWizTypeSelect> Create(weld::Container* pPage, OCopyTableWizard* pWizard, SvStream& rInput ) { return std::make_unique<OWizHTMLExtend>(pPage, pWizard, rInput); } }; // Wizard Page: OWizRTFExtend class OWizRTFExtend : public OWizTypeSelect @@ -45,12 +45,12 @@ namespace dbaui protected: virtual void createReaderAndCallParser(sal_Int32 _nRows) override; public: - OWizRTFExtend(OCopyTableWizard* pWizard, TabPageParent pParent, SvStream& rStream) - : OWizTypeSelect(pWizard, pParent, &rStream) + OWizRTFExtend(weld::Container* pPage, OCopyTableWizard* pWizard, SvStream& rStream) + : OWizTypeSelect(pPage, pWizard, &rStream) { } - static std::unique_ptr<OWizTypeSelect> Create(OCopyTableWizard* pWizard, TabPageParent pParent, SvStream& rInput) { return std::make_unique<OWizRTFExtend>(pWizard, pParent, rInput); } + static std::unique_ptr<OWizTypeSelect> Create(weld::Container* pPage, OCopyTableWizard* pWizard, SvStream& rInput) { return std::make_unique<OWizRTFExtend>(pPage, pWizard, rInput); } }; // Wizard Page: OWizNormalExtend @@ -59,8 +59,8 @@ namespace dbaui protected: virtual void createReaderAndCallParser(sal_Int32 _nRows) override; public: - OWizNormalExtend(OCopyTableWizard* pWizard, TabPageParent pParent) - : OWizTypeSelect(pWizard, pParent) + OWizNormalExtend(weld::Container* pPage, OCopyTableWizard* pWizard) + : OWizTypeSelect(pPage, pWizard) { EnableAuto(false); } diff --git a/dbaccess/source/ui/inc/WNameMatch.hxx b/dbaccess/source/ui/inc/WNameMatch.hxx index 5bf0df89dbea..8aa2b6befaa8 100644 --- a/dbaccess/source/ui/inc/WNameMatch.hxx +++ b/dbaccess/source/ui/inc/WNameMatch.hxx @@ -59,7 +59,7 @@ namespace dbaui virtual bool LeavePage() override; virtual OUString GetTitle() const override ; - OWizNameMatching(OCopyTableWizard* pWizard, TabPageParent pParent); + OWizNameMatching(weld::Container* pPage, OCopyTableWizard* pWizard); virtual ~OWizNameMatching() override; }; } diff --git a/dbaccess/source/ui/inc/WTabPage.hxx b/dbaccess/source/ui/inc/WTabPage.hxx index 9f8abfa011c8..0bcd04082dcd 100644 --- a/dbaccess/source/ui/inc/WTabPage.hxx +++ b/dbaccess/source/ui/inc/WTabPage.hxx @@ -32,7 +32,7 @@ namespace dbaui OCopyTableWizard* m_pParent; bool m_bFirstTime; // Page is called the first time; should be set in the reset method - OWizardPage(OCopyTableWizard* pWizard, TabPageParent pParent, const OUString& rUIXMLDescription, const OString& rID); + OWizardPage(weld::Container* pPage, OCopyTableWizard* pWizard, const OUString& rUIXMLDescription, const OString& rID); public: virtual ~OWizardPage() override; diff --git a/dbaccess/source/ui/inc/WTypeSelect.hxx b/dbaccess/source/ui/inc/WTypeSelect.hxx index aafdd9e94f9b..767c533f25e8 100644 --- a/dbaccess/source/ui/inc/WTypeSelect.hxx +++ b/dbaccess/source/ui/inc/WTypeSelect.hxx @@ -51,7 +51,7 @@ namespace dbaui virtual OUString getAutoIncrementValue() const override; public: - OWizTypeSelectControl(TabPageParent pParent, OWizTypeSelect* pParentTabPage); + OWizTypeSelectControl(weld::Container* pPage, OWizTypeSelect* pParentTabPage); virtual ~OWizTypeSelectControl() override; virtual css::uno::Reference< css::sdbc::XDatabaseMetaData> getMetaData() override; @@ -136,14 +136,14 @@ namespace dbaui virtual bool LeavePage() override; virtual OUString GetTitle() const override; - OWizTypeSelect(OCopyTableWizard* pWizard, TabPageParent pParent, SvStream* pStream = nullptr); + OWizTypeSelect(weld::Container* pParent, OCopyTableWizard* pWizard, SvStream* pStream = nullptr); virtual ~OWizTypeSelect() override; void setDisplayRow(sal_Int32 _nRow) { m_nDisplayRow = _nRow - 1; } void setDuplicateName(bool _bDuplicateName) { m_bDuplicateName = _bDuplicateName; } }; - typedef std::unique_ptr<OWizTypeSelect> (*TypeSelectionPageFactory)(OCopyTableWizard*, TabPageParent, SvStream&); + typedef std::unique_ptr<OWizTypeSelect> (*TypeSelectionPageFactory)(weld::Container*, OCopyTableWizard*, SvStream&); } #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_WTYPESELECT_HXX diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx index fe3b15b869a6..4ab6480ca136 100644 --- a/dbaccess/source/ui/misc/WCPage.cxx +++ b/dbaccess/source/ui/misc/WCPage.cxx @@ -48,8 +48,8 @@ using namespace ::com::sun::star::sdbcx; namespace CopyTableOperation = css::sdb::application::CopyTableOperation; -OCopyTable::OCopyTable(OCopyTableWizard* pWizard, TabPageParent pParent) - : OWizardPage(pWizard, pParent, "dbaccess/ui/copytablepage.ui", "CopyTablePage") +OCopyTable::OCopyTable(weld::Container* pPage, OCopyTableWizard* pWizard) + : OWizardPage(pPage, pWizard, "dbaccess/ui/copytablepage.ui", "CopyTablePage") , m_bPKeyAllowed(false) , m_bUseHeaderAllowed(true) , m_nOldOperation(0) diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx index 5939edaacbed..d137ef8ea7a7 100644 --- a/dbaccess/source/ui/misc/WColumnSelect.cxx +++ b/dbaccess/source/ui/misc/WColumnSelect.cxx @@ -43,8 +43,8 @@ namespace CopyTableOperation = ::com::sun::star::sdb::application::CopyTableOper OUString OWizColumnSelect::GetTitle() const { return DBA_RES(STR_WIZ_COLUMN_SELECT_TITEL); } -OWizardPage::OWizardPage(OCopyTableWizard* pWizard, TabPageParent pParent, const OUString& rUIXMLDescription, const OString& rID) - : ::vcl::OWizardPage(pParent, rUIXMLDescription, rID) +OWizardPage::OWizardPage(weld::Container* pPage, OCopyTableWizard* pWizard, const OUString& rUIXMLDescription, const OString& rID) + : ::vcl::OWizardPage(pPage, pWizard, rUIXMLDescription, rID) , m_pParent(pWizard) , m_bFirstTime(true) { @@ -55,8 +55,8 @@ OWizardPage::~OWizardPage() } // OWizColumnSelect -OWizColumnSelect::OWizColumnSelect(OCopyTableWizard* pWizard, TabPageParent pParent) - : OWizardPage(pWizard, pParent, "dbaccess/ui/applycolpage.ui", "ApplyColPage") +OWizColumnSelect::OWizColumnSelect(weld::Container* pPage, OCopyTableWizard* pWizard) + : OWizardPage(pPage, pWizard, "dbaccess/ui/applycolpage.ui", "ApplyColPage") , m_xOrgColumnNames(m_xBuilder->weld_tree_view("from")) , m_xColumn_RH(m_xBuilder->weld_button("colrh")) , m_xColumns_RH(m_xBuilder->weld_button("colsrh")) diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx index e4c26e74e0a8..98ec40a808b6 100644 --- a/dbaccess/source/ui/misc/WCopyTable.cxx +++ b/dbaccess/source/ui/misc/WCopyTable.cxx @@ -566,26 +566,26 @@ OCopyTableWizard::OCopyTableWizard(weld::Window* pParent, const OUString& _rDefa m_sName = ::dbtools::composeTableName(m_xDestConnection->getMetaData(),sCatalog,sSchema,sTable,false,::dbtools::EComposeRule::InTableDefinitions); } - std::unique_ptr<OCopyTable> xPage1(new OCopyTable(this, CreatePageContainer())); + std::unique_ptr<OCopyTable> xPage1(new OCopyTable(CreatePageContainer(), this)); xPage1->disallowUseHeaderLine(); if ( !bAllowViews ) xPage1->disallowViews(); xPage1->setCreateStyleAction(); AddWizardPage(std::move(xPage1)); - AddWizardPage( std::make_unique<OWizNameMatching>(this, CreatePageContainer() ) ); - AddWizardPage( std::make_unique<OWizColumnSelect>(this, CreatePageContainer() ) ); - AddWizardPage( std::make_unique<OWizNormalExtend>(this, CreatePageContainer() ) ); + AddWizardPage( std::make_unique<OWizNameMatching>(CreatePageContainer(), this)); + AddWizardPage( std::make_unique<OWizColumnSelect>(CreatePageContainer(), this)); + AddWizardPage( std::make_unique<OWizNormalExtend>(CreatePageContainer(), this)); ActivatePage(); m_xAssistant->set_current_page(0); } -TabPageParent OCopyTableWizard::CreatePageContainer() +weld::Container* OCopyTableWizard::CreatePageContainer() { OString sIdent(OString::number(m_nPageCount)); weld::Container* pPageContainer = m_xAssistant->append_page(sIdent); - return TabPageParent(pPageContainer, this); + return pPageContainer; } OCopyTableWizard::OCopyTableWizard( weld::Window* pParent, const OUString& _rDefaultName, sal_Int16 _nOperation, @@ -620,14 +620,14 @@ OCopyTableWizard::OCopyTableWizard( weld::Window* pParent, const OUString& _rDef m_xInteractionHandler = InteractionHandler::createWithParent(m_xContext, nullptr); - std::unique_ptr<OCopyTable> xPage1(new OCopyTable(this, CreatePageContainer())); + std::unique_ptr<OCopyTable> xPage1(new OCopyTable(CreatePageContainer(), this)); xPage1->disallowViews(); xPage1->setCreateStyleAction(); AddWizardPage(std::move(xPage1)); - AddWizardPage( std::make_unique<OWizNameMatching>( this, CreatePageContainer() ) ); - AddWizardPage( std::make_unique<OWizColumnSelect>( this, CreatePageContainer() ) ); - AddWizardPage( (*_pTypeSelectionPageFactory)( this, CreatePageContainer(), _rTypeSelectionPageArg ) ); + AddWizardPage(std::make_unique<OWizNameMatching>(CreatePageContainer(), this)); + AddWizardPage(std::make_unique<OWizColumnSelect>(CreatePageContainer(), this)); + AddWizardPage((*_pTypeSelectionPageFactory)(CreatePageContainer(), this, _rTypeSelectionPageArg)); ActivatePage(); diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx index 47539c27ae6b..c7726e9462f8 100644 --- a/dbaccess/source/ui/misc/WNameMatch.cxx +++ b/dbaccess/source/ui/misc/WNameMatch.cxx @@ -33,8 +33,8 @@ using namespace ::dbaui; // OWizColumnSelect -OWizNameMatching::OWizNameMatching(OCopyTableWizard* pWizard, TabPageParent pParent) - : OWizardPage(pWizard, pParent, "dbaccess/ui/namematchingpage.ui", "NameMatching") +OWizNameMatching::OWizNameMatching(weld::Container* pPage, OCopyTableWizard* pWizard) + : OWizardPage(pPage, pWizard, "dbaccess/ui/namematchingpage.ui", "NameMatching") , m_xTABLE_LEFT(m_xBuilder->weld_label("leftlabel")) , m_xTABLE_RIGHT(m_xBuilder->weld_label("rightlabel")) , m_xCTRL_LEFT(m_xBuilder->weld_tree_view("left")) diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx index a9bf1af33e40..7d561b899772 100644 --- a/dbaccess/source/ui/misc/WTypeSelect.cxx +++ b/dbaccess/source/ui/misc/WTypeSelect.cxx @@ -44,8 +44,8 @@ using namespace ::com::sun::star::util; using namespace ::com::sun::star::sdbc; // OWizTypeSelectControl -OWizTypeSelectControl::OWizTypeSelectControl(TabPageParent pParent, OWizTypeSelect* pParentTabPage) - : OFieldDescControl(pParent, nullptr) +OWizTypeSelectControl::OWizTypeSelectControl(weld::Container* pPage, OWizTypeSelect* pParentTabPage) + : OFieldDescControl(pPage, nullptr, nullptr) , m_pParentTabPage(pParentTabPage) { } @@ -207,12 +207,12 @@ OUString OWizTypeSelectControl::getAutoIncrementValue() const return m_pParentTabPage->m_sAutoIncrementValue; } -OWizTypeSelect::OWizTypeSelect(OCopyTableWizard* pWizard, TabPageParent pParent, SvStream* pStream) - : OWizardPage(pWizard, pParent, "dbaccess/ui/typeselectpage.ui", "TypeSelect") +OWizTypeSelect::OWizTypeSelect(weld::Container* pPage, OCopyTableWizard* pWizard, SvStream* pStream) + : OWizardPage(pPage, pWizard, "dbaccess/ui/typeselectpage.ui", "TypeSelect") , m_xColumnNames(new OWizTypeSelectList(m_xBuilder->weld_tree_view("columnnames"))) , m_xColumns(m_xBuilder->weld_label("columns")) , m_xControlContainer(m_xBuilder->weld_container("control_container")) - , m_xTypeControl(VclPtr<OWizTypeSelectControl>::Create(TabPageParent(m_xControlContainer.get(), pWizard), this)) + , m_xTypeControl(VclPtr<OWizTypeSelectControl>::Create(m_xControlContainer.get(), this)) , m_xAutoType(m_xBuilder->weld_label("autotype")) , m_xAutoFt(m_xBuilder->weld_label("autolabel")) , m_xAutoEt(m_xBuilder->weld_spin_button("auto")) diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx index e88813e1fc6b..4d3f3d3b8c8e 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx +++ b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx @@ -36,7 +36,8 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::sdbc; using namespace dbaui; -OTableFieldControl::OTableFieldControl( vcl::Window* pParent, OTableDesignHelpBar* pHelpBar) :OFieldDescControl(pParent,pHelpBar) +OTableFieldControl::OTableFieldControl(vcl::Window* pParent, OTableDesignHelpBar* pHelpBar) + : OFieldDescControl(nullptr, pParent, pHelpBar) { } |