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 /extensions/source | |
parent | disinherit OWizardPage and SfxTabPage from vcl TabPage (diff) | |
download | core-deb37c44ecfb8f6aa7c2ceec4771b0505fa7b6bb.tar.gz core-deb37c44ecfb8f6aa7c2ceec4771b0505fa7b6bb.zip |
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 'extensions/source')
27 files changed, 94 insertions, 102 deletions
diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx index 952c4a1f78da..d420a3658791 100644 --- a/extensions/source/abpilot/abpfinalpage.cxx +++ b/extensions/source/abpilot/abpfinalpage.cxx @@ -42,8 +42,8 @@ namespace abp return pFilter; } - FinalPage::FinalPage(OAddressBookSourcePilot* pDialog, TabPageParent pPageParent) - : AddressBookSourcePage(pDialog, pPageParent, "modules/sabpilot/ui/datasourcepage.ui", + FinalPage::FinalPage(weld::Container* pPage, OAddressBookSourcePilot* pWizard) + : AddressBookSourcePage(pPage, pWizard, "modules/sabpilot/ui/datasourcepage.ui", "DataSourcePage") , m_xLocation(new URLBox(m_xBuilder->weld_combo_box("location"))) , m_xBrowse(m_xBuilder->weld_button("browse")) @@ -57,8 +57,8 @@ namespace abp m_xLocation->SetSmartProtocol(INetProtocol::File); m_xLocation->DisableHistory(); - m_xLocationController.reset( new svx::DatabaseLocationInputController(pDialog->getORB(), - *m_xLocation, *m_xBrowse, *pPageParent.GetFrameWeld()) ); + m_xLocationController.reset( new svx::DatabaseLocationInputController(pWizard->getORB(), + *m_xLocation, *m_xBrowse, *pWizard->getDialog()) ); m_xName->connect_changed( LINK(this, FinalPage, OnEntryNameModified) ); m_xLocation->connect_changed( LINK(this, FinalPage, OnComboNameModified) ); diff --git a/extensions/source/abpilot/abpfinalpage.hxx b/extensions/source/abpilot/abpfinalpage.hxx index e919b79dbd9a..c4cc6bccf6c0 100644 --- a/extensions/source/abpilot/abpfinalpage.hxx +++ b/extensions/source/abpilot/abpfinalpage.hxx @@ -46,7 +46,7 @@ namespace abp StringBag m_aInvalidDataSourceNames; public: - explicit FinalPage(OAddressBookSourcePilot* pDialog, TabPageParent pPageParent); + explicit FinalPage(weld::Container* pPage, OAddressBookSourcePilot* pController); virtual ~FinalPage() override; private: diff --git a/extensions/source/abpilot/abspage.cxx b/extensions/source/abpilot/abspage.cxx index 640fa30b0afb..774ed245e0b0 100644 --- a/extensions/source/abpilot/abspage.cxx +++ b/extensions/source/abpilot/abspage.cxx @@ -20,18 +20,15 @@ #include "abspage.hxx" #include "abspilot.hxx" - namespace abp { - - using namespace ::svt; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; - AddressBookSourcePage::AddressBookSourcePage(OAddressBookSourcePilot* pParent, TabPageParent pPageParent, const OUString& rUIXMLDescription, const OString& rID) - : AddressBookSourcePage_Base(pPageParent, rUIXMLDescription, rID) - , m_pDialog(pParent) + AddressBookSourcePage::AddressBookSourcePage(weld::Container* pPage, OAddressBookSourcePilot* pDialog, const OUString& rUIXMLDescription, const OString& rID) + : AddressBookSourcePage_Base(pPage, pDialog, rUIXMLDescription, rID) + , m_pDialog(pDialog) { } diff --git a/extensions/source/abpilot/abspage.hxx b/extensions/source/abpilot/abspage.hxx index a7298e1270f5..b10ee599c144 100644 --- a/extensions/source/abpilot/abspage.hxx +++ b/extensions/source/abpilot/abspage.hxx @@ -37,7 +37,7 @@ namespace abp OAddressBookSourcePilot* m_pDialog; protected: - AddressBookSourcePage(OAddressBookSourcePilot *pParent, TabPageParent pPageParent, const OUString& rUIXMLDescription, const OString& rID); + AddressBookSourcePage(weld::Container* pPage, OAddressBookSourcePilot* pController, const OUString& rUIXMLDescription, const OString& rID); protected: // helper diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx index 231adb51c3a9..e6e16d118076 100644 --- a/extensions/source/abpilot/abspilot.cxx +++ b/extensions/source/abpilot/abspilot.cxx @@ -370,27 +370,25 @@ namespace abp { 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); std::unique_ptr<vcl::OWizardPage> xRet; switch (_nState) { case STATE_SELECT_ABTYPE: - xRet = std::make_unique<TypeSelectionPage>( this, aParent ); + xRet = std::make_unique<TypeSelectionPage>(pPageContainer, this); break; case STATE_INVOKE_ADMIN_DIALOG: - xRet = std::make_unique<AdminDialogInvokationPage>( this, aParent ); + xRet = std::make_unique<AdminDialogInvokationPage>(pPageContainer, this); break; case STATE_TABLE_SELECTION: - xRet = std::make_unique<TableSelectionPage>( this, aParent ); + xRet = std::make_unique<TableSelectionPage>(pPageContainer, this); break; case STATE_MANUAL_FIELD_MAPPING: - xRet = std::make_unique<FieldMappingPage>( this, aParent ); + xRet = std::make_unique<FieldMappingPage>(pPageContainer, this); break; case STATE_FINAL_CONFIRM: - xRet = std::make_unique<FinalPage>( this, aParent ); + xRet = std::make_unique<FinalPage>(pPageContainer, this); break; default: assert(false && "OAddressBookSourcePilot::createPage: invalid state!"); diff --git a/extensions/source/abpilot/admininvokationpage.cxx b/extensions/source/abpilot/admininvokationpage.cxx index f1a2127b6237..2f51d8639896 100644 --- a/extensions/source/abpilot/admininvokationpage.cxx +++ b/extensions/source/abpilot/admininvokationpage.cxx @@ -23,8 +23,8 @@ namespace abp { - AdminDialogInvokationPage::AdminDialogInvokationPage(OAddressBookSourcePilot* pDialog, TabPageParent pPageParent) - : AddressBookSourcePage(pDialog, pPageParent, "modules/sabpilot/ui/invokeadminpage.ui", "InvokeAdminPage") + AdminDialogInvokationPage::AdminDialogInvokationPage(weld::Container* pPage, OAddressBookSourcePilot* pController) + : AddressBookSourcePage(pPage, pController, "modules/sabpilot/ui/invokeadminpage.ui", "InvokeAdminPage") , m_xInvokeAdminDialog(m_xBuilder->weld_button("settings")) , m_xErrorMessage(m_xBuilder->weld_label("warning")) { diff --git a/extensions/source/abpilot/admininvokationpage.hxx b/extensions/source/abpilot/admininvokationpage.hxx index b5dcaaeaeaed..5765e1fd5c33 100644 --- a/extensions/source/abpilot/admininvokationpage.hxx +++ b/extensions/source/abpilot/admininvokationpage.hxx @@ -31,7 +31,7 @@ namespace abp std::unique_ptr<weld::Label> m_xErrorMessage; public: - explicit AdminDialogInvokationPage(OAddressBookSourcePilot* pDialog, TabPageParent pPageParent); + explicit AdminDialogInvokationPage(weld::Container* pPage, OAddressBookSourcePilot* pDialog); virtual ~AdminDialogInvokationPage() override; private: // BuilderPage overridables diff --git a/extensions/source/abpilot/fieldmappingpage.cxx b/extensions/source/abpilot/fieldmappingpage.cxx index 54e2ab86e7ed..1652723fda99 100644 --- a/extensions/source/abpilot/fieldmappingpage.cxx +++ b/extensions/source/abpilot/fieldmappingpage.cxx @@ -25,8 +25,8 @@ namespace abp { - FieldMappingPage::FieldMappingPage(OAddressBookSourcePilot* pDialog, TabPageParent pPageParent) - : AddressBookSourcePage(pDialog, pPageParent, "modules/sabpilot/ui/fieldassignpage.ui", "FieldAssignPage") + FieldMappingPage::FieldMappingPage(weld::Container* pPage, OAddressBookSourcePilot* pController) + : AddressBookSourcePage(pPage, pController, "modules/sabpilot/ui/fieldassignpage.ui", "FieldAssignPage") , m_xInvokeDialog(m_xBuilder->weld_button("assign")) , m_xHint(m_xBuilder->weld_label("hint")) { diff --git a/extensions/source/abpilot/fieldmappingpage.hxx b/extensions/source/abpilot/fieldmappingpage.hxx index 63b5b2158832..1423da470b25 100644 --- a/extensions/source/abpilot/fieldmappingpage.hxx +++ b/extensions/source/abpilot/fieldmappingpage.hxx @@ -30,7 +30,7 @@ namespace abp std::unique_ptr<weld::Button> m_xInvokeDialog; std::unique_ptr<weld::Label> m_xHint; public: - explicit FieldMappingPage(OAddressBookSourcePilot* pDialog, TabPageParent pPageParent); + explicit FieldMappingPage(weld::Container* pPage, OAddressBookSourcePilot* pController); virtual ~FieldMappingPage() override; private: // OWizardPage overridables diff --git a/extensions/source/abpilot/tableselectionpage.cxx b/extensions/source/abpilot/tableselectionpage.cxx index a897326902ac..585a5ea3d5ae 100644 --- a/extensions/source/abpilot/tableselectionpage.cxx +++ b/extensions/source/abpilot/tableselectionpage.cxx @@ -27,8 +27,8 @@ namespace abp { - TableSelectionPage::TableSelectionPage(OAddressBookSourcePilot* pDialog, TabPageParent pPageParent) - : AddressBookSourcePage(pDialog, pPageParent, "modules/sabpilot/ui/selecttablepage.ui", "SelectTablePage") + TableSelectionPage::TableSelectionPage(weld::Container* pPage, OAddressBookSourcePilot* pController) + : AddressBookSourcePage(pPage, pController, "modules/sabpilot/ui/selecttablepage.ui", "SelectTablePage") , m_xTableList(m_xBuilder->weld_tree_view("table")) { m_xTableList->connect_changed( LINK( this, TableSelectionPage, OnTableSelected ) ); diff --git a/extensions/source/abpilot/tableselectionpage.hxx b/extensions/source/abpilot/tableselectionpage.hxx index 35f2e40e6cc3..2f96aeb60bd2 100644 --- a/extensions/source/abpilot/tableselectionpage.hxx +++ b/extensions/source/abpilot/tableselectionpage.hxx @@ -30,7 +30,7 @@ namespace abp std::unique_ptr<weld::TreeView> m_xTableList; public: - explicit TableSelectionPage(OAddressBookSourcePilot* pDialog, TabPageParent pPageParent); + explicit TableSelectionPage(weld::Container* pPage, OAddressBookSourcePilot* pController); virtual ~TableSelectionPage() override; private: // OWizardPage overridables diff --git a/extensions/source/abpilot/typeselectionpage.cxx b/extensions/source/abpilot/typeselectionpage.cxx index 394b6889cefb..3aac37ef7dcb 100644 --- a/extensions/source/abpilot/typeselectionpage.cxx +++ b/extensions/source/abpilot/typeselectionpage.cxx @@ -31,8 +31,8 @@ namespace abp using namespace ::com::sun::star::sdbc; // TypeSelectionPage - TypeSelectionPage::TypeSelectionPage(OAddressBookSourcePilot* pDialog, TabPageParent pPageParent) - : AddressBookSourcePage(pDialog, pPageParent, "modules/sabpilot/ui/selecttypepage.ui", "SelectTypePage") + TypeSelectionPage::TypeSelectionPage(weld::Container* pPage, OAddressBookSourcePilot* pDialog) + : AddressBookSourcePage(pPage, pDialog, "modules/sabpilot/ui/selecttypepage.ui", "SelectTypePage") , m_xEvolution(m_xBuilder->weld_radio_button("evolution")) , m_xEvolutionGroupwise(m_xBuilder->weld_radio_button("groupwise")) , m_xEvolutionLdap(m_xBuilder->weld_radio_button("evoldap")) diff --git a/extensions/source/abpilot/typeselectionpage.hxx b/extensions/source/abpilot/typeselectionpage.hxx index ef8a609cd6ad..7488495f20c0 100644 --- a/extensions/source/abpilot/typeselectionpage.hxx +++ b/extensions/source/abpilot/typeselectionpage.hxx @@ -55,7 +55,7 @@ namespace abp std::vector< ButtonItem > m_aAllTypes; public: - explicit TypeSelectionPage(OAddressBookSourcePilot* pDialog, TabPageParent pPageParent); + explicit TypeSelectionPage(weld::Container* pPage, OAddressBookSourcePilot* pController); virtual ~TypeSelectionPage() override; // retrieves the currently selected type diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index 2d006f60ed30..a1d4617225f6 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -51,6 +51,7 @@ #include <com/sun/star/container/XNameContainer.hpp> #include <svl/urihelper.hxx> #include <tools/debug.hxx> +#include <vcl/weld.hxx> #include "datman.hxx" #include "bibresid.hxx" #include "bibmod.hxx" @@ -63,6 +64,7 @@ #include <strings.hrc> #include <helpids.h> #include <connectivity/dbtools.hxx> +#include <connectivity/dbtools.hxx> #include <memory> using namespace ::com::sun::star; diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx index 0488e15745b5..a36efe9b550a 100644 --- a/extensions/source/bibliography/framectr.cxx +++ b/extensions/source/bibliography/framectr.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <vcl/waitobj.hxx> #include <com/sun/star/util/URL.hpp> #include <vcl/stdtext.hxx> #include <comphelper/types.hxx> @@ -49,6 +48,7 @@ #include <sot/exchange.hxx> #include <sot/formats.hxx> #include <vcl/edit.hxx> +#include <vcl/weld.hxx> #include <osl/mutex.hxx> #include <unordered_map> diff --git a/extensions/source/bibliography/framectr.hxx b/extensions/source/bibliography/framectr.hxx index 8b6209c1d98b..21e5f7b23fae 100644 --- a/extensions/source/bibliography/framectr.hxx +++ b/extensions/source/bibliography/framectr.hxx @@ -27,6 +27,8 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/frame/XDispatchInformationProvider.hpp> #include <cppuhelper/implbase.hxx> +#include <rtl/ref.hxx> +#include <tools/link.hxx> #include <vector> #include <memory> diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx index 79d8c1920640..513d02050679 100644 --- a/extensions/source/dbpilots/commonpagesdbp.cxx +++ b/extensions/source/dbpilots/commonpagesdbp.cxx @@ -54,8 +54,8 @@ namespace dbp using namespace ::com::sun::star::task; using namespace ::comphelper; - OTableSelectionPage::OTableSelectionPage(OControlWizard* pParent, TabPageParent pPageParent) - : OControlWizardPage(pParent, pPageParent, "modules/sabpilot/ui/tableselectionpage.ui", "TableSelectionPage") + OTableSelectionPage::OTableSelectionPage(weld::Container* pPage, OControlWizard* pWizard) + : OControlWizardPage(pPage, pWizard, "modules/sabpilot/ui/tableselectionpage.ui", "TableSelectionPage") , m_xTable(m_xBuilder->weld_tree_view("table")) , m_xDatasource(m_xBuilder->weld_tree_view("datasource")) , m_xDatasourceLabel(m_xBuilder->weld_label("datasourcelabel")) @@ -343,8 +343,8 @@ namespace dbp lcl_fillEntries(*m_xTable, aQueryNames, BMP_QUERY, CommandType::QUERY); } - OMaybeListSelectionPage::OMaybeListSelectionPage(OControlWizard* pParent, TabPageParent pPageParent, const OUString& rUIXMLDescription, const OString& rID) - : OControlWizardPage(pParent, pPageParent, rUIXMLDescription, rID) + OMaybeListSelectionPage::OMaybeListSelectionPage(weld::Container* pPage, OControlWizard* pWizard, const OUString& rUIXMLDescription, const OString& rID) + : OControlWizardPage(pPage, pWizard, rUIXMLDescription, rID) , m_pYes(nullptr) , m_pNo(nullptr) , m_pList(nullptr) @@ -403,8 +403,8 @@ namespace dbp m_pNo->grab_focus(); } - ODBFieldPage::ODBFieldPage(OControlWizard* pParent, TabPageParent pPageParent) - : OMaybeListSelectionPage(pParent, pPageParent, "modules/sabpilot/ui/optiondbfieldpage.ui", "OptionDBField") + ODBFieldPage::ODBFieldPage(weld::Container* pPage, OControlWizard* pWizard) + : OMaybeListSelectionPage(pPage, pWizard, "modules/sabpilot/ui/optiondbfieldpage.ui", "OptionDBField") , m_xDescription(m_xBuilder->weld_label("explLabel")) , m_xStoreYes(m_xBuilder->weld_radio_button("yesRadiobutton")) , m_xStoreNo(m_xBuilder->weld_radio_button("noRadiobutton")) diff --git a/extensions/source/dbpilots/commonpagesdbp.hxx b/extensions/source/dbpilots/commonpagesdbp.hxx index 70b750dfadb6..08ddd560ab84 100644 --- a/extensions/source/dbpilots/commonpagesdbp.hxx +++ b/extensions/source/dbpilots/commonpagesdbp.hxx @@ -38,7 +38,7 @@ namespace dbp m_xDSContext; public: - explicit OTableSelectionPage(OControlWizard* pParent, TabPageParent pPageParent); + explicit OTableSelectionPage(weld::Container* pPage, OControlWizard* pParent); virtual ~OTableSelectionPage() override; private: @@ -67,7 +67,7 @@ namespace dbp weld::ComboBox* m_pList; public: - OMaybeListSelectionPage(OControlWizard* pParent, TabPageParent pPageParent, const OUString& rUIXMLDescription, const OString& rID); + OMaybeListSelectionPage(weld::Container* pPage, OControlWizard* pWizard, const OUString& rUIXMLDescription, const OString& rID); virtual ~OMaybeListSelectionPage() override; protected: @@ -97,7 +97,7 @@ namespace dbp std::unique_ptr<weld::ComboBox> m_xStoreWhere; public: - explicit ODBFieldPage(OControlWizard* pParent, TabPageParent pPageParent); + explicit ODBFieldPage(weld::Container* pPage, OControlWizard* pWizard); virtual ~ODBFieldPage() override; protected: diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx index e8aaed73991b..740c821571b2 100644 --- a/extensions/source/dbpilots/controlwizard.cxx +++ b/extensions/source/dbpilots/controlwizard.cxx @@ -73,9 +73,9 @@ namespace dbp OAccessRegulator() { } }; - OControlWizardPage::OControlWizardPage(OControlWizard* pDialog, TabPageParent pPageParent, const OUString& rUIXMLDescription, const OString& rID) - : OControlWizardPage_Base(pPageParent, rUIXMLDescription, rID) - , m_pDialog(pDialog) + OControlWizardPage::OControlWizardPage(weld::Container* pPage, OControlWizard* pWizard, const OUString& rUIXMLDescription, const OString& rID) + : OControlWizardPage_Base(pPage, pWizard, rUIXMLDescription, rID) + , m_pDialog(pWizard) { m_xContainer->set_size_request(m_xContainer->get_approximate_digit_width() * WIZARD_SIZE_X, m_xContainer->get_text_height() * WIZARD_SIZE_Y); diff --git a/extensions/source/dbpilots/controlwizard.hxx b/extensions/source/dbpilots/controlwizard.hxx index d8590356fd2d..f918a5a94ab8 100644 --- a/extensions/source/dbpilots/controlwizard.hxx +++ b/extensions/source/dbpilots/controlwizard.hxx @@ -62,7 +62,7 @@ namespace dbp css::uno::Reference< css::sdbc::XConnection > getFormConnection() const; public: - OControlWizardPage(OControlWizard* pDialog, TabPageParent pPageParent, const OUString& rUIXMLDescription, const OString& rID); + OControlWizardPage(weld::Container* pPage, OControlWizard* pWizard, const OUString& rUIXMLDescription, const OString& rID); virtual ~OControlWizardPage() override; protected: diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx index 2fc497e720bf..aba9a1f46506 100644 --- a/extensions/source/dbpilots/gridwizard.cxx +++ b/extensions/source/dbpilots/gridwizard.cxx @@ -220,15 +220,13 @@ namespace dbp { 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 GW_STATE_DATASOURCE_SELECTION: - return std::make_unique<OTableSelectionPage>(this, aParent); + return std::make_unique<OTableSelectionPage>(pPageContainer, this); case GW_STATE_FIELDSELECTION: - return std::make_unique<OGridFieldsSelection>(this, aParent); + return std::make_unique<OGridFieldsSelection>(pPageContainer, this); } return nullptr; @@ -283,8 +281,8 @@ namespace dbp return true; } - OGridFieldsSelection::OGridFieldsSelection(OGridWizard* pParent, TabPageParent pPageParent) - : OGridPage(pParent, pPageParent, "modules/sabpilot/ui/gridfieldsselectionpage.ui", "GridFieldsSelection") + OGridFieldsSelection::OGridFieldsSelection(weld::Container* pPage, OGridWizard* pWizard) + : OGridPage(pPage, pWizard, "modules/sabpilot/ui/gridfieldsselectionpage.ui", "GridFieldsSelection") , m_xExistFields(m_xBuilder->weld_tree_view("existingfields")) , m_xSelectOne(m_xBuilder->weld_button("fieldright")) , m_xSelectAll(m_xBuilder->weld_button("allfieldsright")) diff --git a/extensions/source/dbpilots/gridwizard.hxx b/extensions/source/dbpilots/gridwizard.hxx index c96a86d3271f..c8258cd88b2d 100644 --- a/extensions/source/dbpilots/gridwizard.hxx +++ b/extensions/source/dbpilots/gridwizard.hxx @@ -61,8 +61,8 @@ namespace dbp class OGridPage : public OControlWizardPage { public: - OGridPage(OGridWizard* pParent, TabPageParent pPageParent, const OUString& rUIXMLDescription, const OString& rID) - : OControlWizardPage(pParent, pPageParent, rUIXMLDescription, rID) + OGridPage(weld::Container* pPage, OGridWizard* pWizard, const OUString& rUIXMLDescription, const OString& rID) + : OControlWizardPage(pPage, pWizard, rUIXMLDescription, rID) { } protected: @@ -79,7 +79,7 @@ namespace dbp std::unique_ptr<weld::TreeView> m_xSelFields; public: - explicit OGridFieldsSelection(OGridWizard* pParent, TabPageParent pPageParent); + explicit OGridFieldsSelection(weld::Container* pPage, OGridWizard* pWizard); virtual ~OGridFieldsSelection() override; private: diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx index 031433b391a7..4ea1fc2ec369 100644 --- a/extensions/source/dbpilots/groupboxwiz.cxx +++ b/extensions/source/dbpilots/groupboxwiz.cxx @@ -64,25 +64,23 @@ namespace dbp { 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 GBW_STATE_OPTIONLIST: - return std::make_unique<ORadioSelectionPage>(this, aParent); + return std::make_unique<ORadioSelectionPage>(pPageContainer, this); case GBW_STATE_DEFAULTOPTION: - return std::make_unique<ODefaultFieldSelectionPage>(this, aParent); + return std::make_unique<ODefaultFieldSelectionPage>(pPageContainer, this); case GBW_STATE_OPTIONVALUES: - return std::make_unique<OOptionValuesPage>(this, aParent); + return std::make_unique<OOptionValuesPage>(pPageContainer, this); case GBW_STATE_DBFIELD: - return std::make_unique<OOptionDBFieldPage>(this, aParent); + return std::make_unique<OOptionDBFieldPage>(pPageContainer, this); case GBW_STATE_FINALIZE: - return std::make_unique<OFinalizeGBWPage>(this, aParent); + return std::make_unique<OFinalizeGBWPage>(pPageContainer, this); } return nullptr; @@ -169,8 +167,8 @@ namespace dbp return OControlWizard::onFinish(); } - ORadioSelectionPage::ORadioSelectionPage(OControlWizard* pParent, TabPageParent pPageParent) - : OGBWPage(pParent, pPageParent, "modules/sabpilot/ui/groupradioselectionpage.ui", "GroupRadioSelectionPage") + ORadioSelectionPage::ORadioSelectionPage(weld::Container* pPage, OControlWizard* pWizard) + : OGBWPage(pPage, pWizard, "modules/sabpilot/ui/groupradioselectionpage.ui", "GroupRadioSelectionPage") , m_xRadioName(m_xBuilder->weld_entry("radiolabels")) , m_xMoveRight(m_xBuilder->weld_button("toright")) , m_xMoveLeft(m_xBuilder->weld_button("toleft")) @@ -297,8 +295,8 @@ namespace dbp } } - ODefaultFieldSelectionPage::ODefaultFieldSelectionPage(OControlWizard* pParent, TabPageParent pPageParent) - : OMaybeListSelectionPage(pParent, pPageParent, "modules/sabpilot/ui/defaultfieldselectionpage.ui", "DefaultFieldSelectionPage") + ODefaultFieldSelectionPage::ODefaultFieldSelectionPage(weld::Container* pPage, OControlWizard* pWizard) + : OMaybeListSelectionPage(pPage, pWizard, "modules/sabpilot/ui/defaultfieldselectionpage.ui", "DefaultFieldSelectionPage") , m_xDefSelYes(m_xBuilder->weld_radio_button("defaultselectionyes")) , m_xDefSelNo(m_xBuilder->weld_radio_button("defaultselectionno")) , m_xDefSelection(m_xBuilder->weld_combo_box("defselectionfield")) @@ -335,8 +333,8 @@ namespace dbp return true; } - OOptionValuesPage::OOptionValuesPage(OControlWizard* pParent, TabPageParent pPageParent) - : OGBWPage(pParent, pPageParent, "modules/sabpilot/ui/optionvaluespage.ui", "OptionValuesPage") + OOptionValuesPage::OOptionValuesPage(weld::Container* pPage, OControlWizard* pWizard) + : OGBWPage(pPage, pWizard, "modules/sabpilot/ui/optionvaluespage.ui", "OptionValuesPage") , m_xValue(m_xBuilder->weld_entry("optionvalue")) , m_xOptions(m_xBuilder->weld_tree_view("radiobuttons")) , m_nLastSelection(::vcl::WizardTypes::WizardState(-1)) @@ -411,8 +409,8 @@ namespace dbp return true; } - OOptionDBFieldPage::OOptionDBFieldPage(OControlWizard* pParent, TabPageParent pPageParent) - : ODBFieldPage(pParent, pPageParent) + OOptionDBFieldPage::OOptionDBFieldPage(weld::Container* pPage, OControlWizard* pWizard) + : ODBFieldPage(pPage, pWizard) { setDescriptionText(compmodule::ModuleRes(RID_STR_GROUPWIZ_DBFIELD)); } @@ -422,8 +420,8 @@ namespace dbp return static_cast<OGroupBoxWizard*>(getDialog())->getSettings().sDBField; } - OFinalizeGBWPage::OFinalizeGBWPage(OControlWizard* pParent, TabPageParent pPageParent) - : OGBWPage(pParent, pPageParent, "modules/sabpilot/ui/optionsfinalpage.ui", "OptionsFinalPage") + OFinalizeGBWPage::OFinalizeGBWPage(weld::Container* pPage, OControlWizard* pWizard) + : OGBWPage(pPage, pWizard, "modules/sabpilot/ui/optionsfinalpage.ui", "OptionsFinalPage") , m_xName(m_xBuilder->weld_entry("nameit")) { } diff --git a/extensions/source/dbpilots/groupboxwiz.hxx b/extensions/source/dbpilots/groupboxwiz.hxx index 19a10f9f29c0..b9f375865323 100644 --- a/extensions/source/dbpilots/groupboxwiz.hxx +++ b/extensions/source/dbpilots/groupboxwiz.hxx @@ -66,8 +66,8 @@ namespace dbp class OGBWPage : public OControlWizardPage { public: - OGBWPage(OControlWizard* pParent, TabPageParent pPageParent, const OUString& rUIXMLDescription, const OString& rID) - : OControlWizardPage(pParent, pPageParent, rUIXMLDescription, rID) + OGBWPage(weld::Container* pPage, OControlWizard* pWizard, const OUString& rUIXMLDescription, const OString& rID) + : OControlWizardPage(pPage, pWizard, rUIXMLDescription, rID) { } @@ -83,7 +83,7 @@ namespace dbp std::unique_ptr<weld::TreeView> m_xExistingRadios; public: - explicit ORadioSelectionPage(OControlWizard* pParent, TabPageParent pPageParent); + explicit ORadioSelectionPage(weld::Container* pPage, OControlWizard* pWizard); virtual ~ORadioSelectionPage() override; private: @@ -109,7 +109,7 @@ namespace dbp std::unique_ptr<weld::ComboBox> m_xDefSelection; public: - explicit ODefaultFieldSelectionPage(OControlWizard* pParent, TabPageParent pPageParent); + explicit ODefaultFieldSelectionPage(weld::Container* pPage, OControlWizard* pWizard); virtual ~ODefaultFieldSelectionPage() override; private: @@ -130,7 +130,7 @@ namespace dbp m_nLastSelection; public: - explicit OOptionValuesPage(OControlWizard* pParent, TabPageParent pPageParent); + explicit OOptionValuesPage(weld::Container* pPage, OControlWizard* pWizard); virtual ~OOptionValuesPage() override; private: @@ -149,7 +149,7 @@ namespace dbp class OOptionDBFieldPage : public ODBFieldPage { public: - explicit OOptionDBFieldPage(OControlWizard* pParent, TabPageParent pPageParent); + explicit OOptionDBFieldPage(weld::Container* pPage, OControlWizard* pWizard); protected: // ODBFieldPage overridables @@ -161,7 +161,7 @@ namespace dbp std::unique_ptr<weld::Entry> m_xName; public: - explicit OFinalizeGBWPage(OControlWizard* pParent, TabPageParent pPageParent); + explicit OFinalizeGBWPage(weld::Container* pPage, OControlWizard* pWizard); virtual ~OFinalizeGBWPage() override; private: diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx index 55107a19bf07..f7be36c12af3 100644 --- a/extensions/source/dbpilots/listcombowizard.cxx +++ b/extensions/source/dbpilots/listcombowizard.cxx @@ -87,21 +87,19 @@ namespace dbp { 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 LCW_STATE_DATASOURCE_SELECTION: - return std::make_unique<OTableSelectionPage>(this, aParent); + return std::make_unique<OTableSelectionPage>(pPageContainer, this); case LCW_STATE_TABLESELECTION: - return std::make_unique<OContentTableSelection>(this, aParent); + return std::make_unique<OContentTableSelection>(pPageContainer, this); case LCW_STATE_FIELDSELECTION: - return std::make_unique<OContentFieldSelection>(this, aParent); + return std::make_unique<OContentFieldSelection>(pPageContainer, this); case LCW_STATE_FIELDLINK: - return std::make_unique<OLinkFieldsPage>(this, aParent); + return std::make_unique<OLinkFieldsPage>(pPageContainer, this); case LCW_STATE_COMBODBFIELD: - return std::make_unique<OComboDBFieldPage>(this, aParent); + return std::make_unique<OComboDBFieldPage>(pPageContainer, this); } return nullptr; @@ -262,8 +260,8 @@ namespace dbp return aColumnNames; } - OContentTableSelection::OContentTableSelection(OListComboWizard* pParent, TabPageParent pPageParent) - : OLCPage(pParent, pPageParent, "modules/sabpilot/ui/contenttablepage.ui", "TableSelectionPage") + OContentTableSelection::OContentTableSelection(weld::Container* pPage, OListComboWizard* pWizard) + : OLCPage(pPage, pWizard, "modules/sabpilot/ui/contenttablepage.ui", "TableSelectionPage") , m_xSelectTable(m_xBuilder->weld_tree_view("table")) { enableFormDatasourceDisplay(); @@ -338,8 +336,8 @@ namespace dbp return true; } - OContentFieldSelection::OContentFieldSelection(OListComboWizard* pParent, TabPageParent pPageParent) - : OLCPage(pParent, pPageParent, "modules/sabpilot/ui/contentfieldpage.ui", "FieldSelectionPage") + OContentFieldSelection::OContentFieldSelection(weld::Container* pPage, OListComboWizard* pWizard) + : OLCPage(pPage, pWizard, "modules/sabpilot/ui/contentfieldpage.ui", "FieldSelectionPage") , m_xSelectTableField(m_xBuilder->weld_tree_view("selectfield")) , m_xDisplayedField(m_xBuilder->weld_entry("displayfield")) , m_xInfo(m_xBuilder->weld_label("info")) @@ -394,8 +392,8 @@ namespace dbp return true; } - OLinkFieldsPage::OLinkFieldsPage(OListComboWizard* pParent, TabPageParent pPageParent) - : OLCPage(pParent, pPageParent, "modules/sabpilot/ui/fieldlinkpage.ui", "FieldLinkPage") + OLinkFieldsPage::OLinkFieldsPage(weld::Container* pPage, OListComboWizard* pWizard) + : OLCPage(pPage, pWizard, "modules/sabpilot/ui/fieldlinkpage.ui", "FieldLinkPage") , m_xValueListField(m_xBuilder->weld_combo_box("valuefield")) , m_xTableField(m_xBuilder->weld_combo_box("listtable")) { @@ -458,8 +456,8 @@ namespace dbp return true; } - OComboDBFieldPage::OComboDBFieldPage(OControlWizard* pParent, TabPageParent pPageParent) - : ODBFieldPage(pParent, pPageParent) + OComboDBFieldPage::OComboDBFieldPage(weld::Container* pPage, OControlWizard* pWizard) + : ODBFieldPage(pPage, pWizard) { setDescriptionText(compmodule::ModuleRes(RID_STR_COMBOWIZ_DBFIELD)); } diff --git a/extensions/source/dbpilots/listcombowizard.hxx b/extensions/source/dbpilots/listcombowizard.hxx index caa2335f1d0d..d01d270f858b 100644 --- a/extensions/source/dbpilots/listcombowizard.hxx +++ b/extensions/source/dbpilots/listcombowizard.hxx @@ -51,7 +51,7 @@ namespace dbp public: OListComboWizard( - weld::Window* _pParent, + weld::Window* pParent, const css::uno::Reference< css::beans::XPropertySet >& _rxObjectModel, const css::uno::Reference< css::uno::XComponentContext >& _rxContext ); @@ -78,8 +78,8 @@ namespace dbp class OLCPage : public OControlWizardPage { public: - OLCPage(OListComboWizard* pParent, TabPageParent pPageParent, const OUString& rUIXMLDescription, const OString& rID) - : OControlWizardPage(pParent, pPageParent, rUIXMLDescription, rID) + OLCPage(weld::Container* pPage, OListComboWizard* pWizard, const OUString& rUIXMLDescription, const OString& rID) + : OControlWizardPage(pPage, pWizard, rUIXMLDescription, rID) { } @@ -97,7 +97,7 @@ namespace dbp std::unique_ptr<weld::TreeView> m_xSelectTable; public: - explicit OContentTableSelection(OListComboWizard* pParent, TabPageParent pPageParent); + explicit OContentTableSelection(weld::Container* pPage, OListComboWizard* pWizard); virtual ~OContentTableSelection() override; private: @@ -120,7 +120,7 @@ namespace dbp std::unique_ptr<weld::Label> m_xInfo; public: - explicit OContentFieldSelection(OListComboWizard* pParent, TabPageParent pPageParent); + explicit OContentFieldSelection(weld::Container* pPage, OListComboWizard* pWizard); virtual ~OContentFieldSelection() override; private: @@ -139,7 +139,7 @@ namespace dbp std::unique_ptr<weld::ComboBox> m_xTableField; public: - explicit OLinkFieldsPage(OListComboWizard* pParent, TabPageParent pPageParent); + explicit OLinkFieldsPage(weld::Container* pPage, OListComboWizard* pWizard); virtual ~OLinkFieldsPage() override; private: @@ -159,7 +159,7 @@ namespace dbp class OComboDBFieldPage : public ODBFieldPage { public: - explicit OComboDBFieldPage(OControlWizard* pParent, TabPageParent pPageParent); + explicit OComboDBFieldPage(weld::Container* pPage, OControlWizard* pWizard); protected: // BuilderPage overridables diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 128307f30456..220e915f4d24 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -2720,8 +2720,7 @@ namespace pcr if ( !fnCreatePage ) throw RuntimeException(); // caught below - TabPageParent aParent(aDialog.get_content_area(), &aDialog); - aDialog.SetTabPage((*fnCreatePage)(aParent, &aCoreSet)); + aDialog.SetTabPage((*fnCreatePage)(aDialog.get_content_area(), &aDialog, &aCoreSet)); _rClearBeforeDialog.clear(); if ( RET_OK == aDialog.run() ) |