diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-09-20 20:29:36 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-09-26 09:54:18 +0200 |
commit | a37e559ed123789f6bc8f7972242d6461ce692ab (patch) | |
tree | 7c6304b4541335b2bb706efda58b882132fe3819 /extensions | |
parent | b3f249c1351642be6f2774230ff80a6d20bd1401 (diff) |
disinherit OWizardPage and SfxTabPage from vcl TabPage
Now that there's no need to support weld/unwelded mixes of
pages in dialog any more.
inherit from a BuilderPage which contains a Builder and
Toplevel container
BuilderPage Activate and Deactivate replace TabPage ActivatePage and
DeactivatePage, allowing disambiguation wrt SfxTabPage ActivatePage and
DeactivatePage.
Change-Id: I5706e50fd92f712a25328ee9791e054bb9ad9812
Reviewed-on: https://gerrit.libreoffice.org/79317
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'extensions')
25 files changed, 107 insertions, 124 deletions
diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx index b94331e6da11..952c4a1f78da 100644 --- a/extensions/source/abpilot/abpfinalpage.cxx +++ b/extensions/source/abpilot/abpfinalpage.cxx @@ -70,13 +70,7 @@ namespace abp FinalPage::~FinalPage() { - disposeOnce(); - } - - void FinalPage::dispose() - { m_xLocationController.reset(); - AddressBookSourcePage::dispose(); } bool FinalPage::isValidName() const @@ -156,9 +150,9 @@ namespace abp return true; } - void FinalPage::ActivatePage() + void FinalPage::Activate() { - AddressBookSourcePage::ActivatePage(); + AddressBookSourcePage::Activate(); // get the names of all data sources ODataSourceContext aContext( getORB() ); @@ -173,9 +167,9 @@ namespace abp OnEmbed(*m_xEmbed); } - void FinalPage::DeactivatePage() + void FinalPage::Deactivate() { - AddressBookSourcePage::DeactivatePage(); + AddressBookSourcePage::Deactivate(); // default the "next" button, again getDialog()->defaultButton( WizardButtonFlags::NEXT ); diff --git a/extensions/source/abpilot/abpfinalpage.hxx b/extensions/source/abpilot/abpfinalpage.hxx index a4d7330c9f59..e919b79dbd9a 100644 --- a/extensions/source/abpilot/abpfinalpage.hxx +++ b/extensions/source/abpilot/abpfinalpage.hxx @@ -48,16 +48,15 @@ namespace abp public: explicit FinalPage(OAddressBookSourcePilot* pDialog, TabPageParent pPageParent); virtual ~FinalPage() override; - virtual void dispose() override; private: // OWizardPage overridables virtual void initializePage() override; virtual bool commitPage( ::vcl::WizardTypes::CommitPageReason _eReason ) override; - // TabDialog overridables - virtual void ActivatePage() override; - virtual void DeactivatePage() override; + // BuilderPage overridables + virtual void Activate() override; + virtual void Deactivate() override; // OImportPage overridables virtual bool canAdvance() const override; diff --git a/extensions/source/abpilot/abspage.cxx b/extensions/source/abpilot/abspage.cxx index 646bec495186..640fa30b0afb 100644 --- a/extensions/source/abpilot/abspage.cxx +++ b/extensions/source/abpilot/abspage.cxx @@ -35,15 +35,15 @@ namespace abp { } - void AddressBookSourcePage::ActivatePage() + void AddressBookSourcePage::Activate() { - AddressBookSourcePage_Base::ActivatePage(); + AddressBookSourcePage_Base::Activate(); m_pDialog->updateTravelUI(); } - void AddressBookSourcePage::DeactivatePage() + void AddressBookSourcePage::Deactivate() { - AddressBookSourcePage_Base::DeactivatePage(); + AddressBookSourcePage_Base::Deactivate(); m_pDialog->enableButtons(WizardButtonFlags::NEXT, true); } diff --git a/extensions/source/abpilot/abspage.hxx b/extensions/source/abpilot/abspage.hxx index 9c8816f68b7a..a7298e1270f5 100644 --- a/extensions/source/abpilot/abspage.hxx +++ b/extensions/source/abpilot/abspage.hxx @@ -48,9 +48,9 @@ namespace abp AddressSettings& getSettings(); const AddressSettings& getSettings() const; - // TabDialog overridables - virtual void ActivatePage() override; - virtual void DeactivatePage() override; + // BuilderPage overridables + virtual void Activate() override; + virtual void Deactivate() override; }; } // namespace abp diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx index 02eca7b3e28e..231adb51c3a9 100644 --- a/extensions/source/abpilot/abspilot.cxx +++ b/extensions/source/abpilot/abspilot.cxx @@ -366,31 +366,31 @@ namespace abp return m_aNewDataSource.connect(m_xAssistant.get()); } - VclPtr<TabPage> OAddressBookSourcePilot::createPage(WizardState _nState) + std::unique_ptr<BuilderPage> OAddressBookSourcePilot::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); - VclPtr<vcl::OWizardPage> pRet; + std::unique_ptr<vcl::OWizardPage> xRet; switch (_nState) { case STATE_SELECT_ABTYPE: - pRet = VclPtr<TypeSelectionPage>::Create( this, aParent ); + xRet = std::make_unique<TypeSelectionPage>( this, aParent ); break; case STATE_INVOKE_ADMIN_DIALOG: - pRet = VclPtr<AdminDialogInvokationPage>::Create( this, aParent ); + xRet = std::make_unique<AdminDialogInvokationPage>( this, aParent ); break; case STATE_TABLE_SELECTION: - pRet = VclPtr<TableSelectionPage>::Create( this, aParent ); + xRet = std::make_unique<TableSelectionPage>( this, aParent ); break; case STATE_MANUAL_FIELD_MAPPING: - pRet = VclPtr<FieldMappingPage>::Create( this, aParent ); + xRet = std::make_unique<FieldMappingPage>( this, aParent ); break; case STATE_FINAL_CONFIRM: - pRet = VclPtr<FinalPage>::Create( this, aParent ); + xRet = std::make_unique<FinalPage>( this, aParent ); break; default: assert(false && "OAddressBookSourcePilot::createPage: invalid state!"); @@ -399,7 +399,7 @@ namespace abp m_xAssistant->set_page_title(sIdent, getStateDisplayName(_nState)); - return pRet; + return xRet; } void OAddressBookSourcePilot::impl_updateRoadmap( AddressSourceType _eType ) diff --git a/extensions/source/abpilot/abspilot.hxx b/extensions/source/abpilot/abspilot.hxx index 6f274dc2e241..f959af24224d 100644 --- a/extensions/source/abpilot/abspilot.hxx +++ b/extensions/source/abpilot/abspilot.hxx @@ -64,7 +64,7 @@ namespace abp private: // OWizardMachine overridables - virtual VclPtr<TabPage> createPage( WizardState _nState ) override; + virtual std::unique_ptr<BuilderPage> createPage( WizardState _nState ) override; virtual void enterState( WizardState _nState ) override; virtual bool prepareLeaveCurrentState( CommitPageReason _eReason ) override; virtual bool onFinish() override; diff --git a/extensions/source/abpilot/admininvokationpage.cxx b/extensions/source/abpilot/admininvokationpage.cxx index 5658677ef63d..f1a2127b6237 100644 --- a/extensions/source/abpilot/admininvokationpage.cxx +++ b/extensions/source/abpilot/admininvokationpage.cxx @@ -35,9 +35,9 @@ namespace abp { } - void AdminDialogInvokationPage::ActivatePage() + void AdminDialogInvokationPage::Activate() { - AddressBookSourcePage::ActivatePage(); + AddressBookSourcePage::Activate(); m_xInvokeAdminDialog->grab_focus(); } diff --git a/extensions/source/abpilot/admininvokationpage.hxx b/extensions/source/abpilot/admininvokationpage.hxx index c29b3dad75a2..b5dcaaeaeaed 100644 --- a/extensions/source/abpilot/admininvokationpage.hxx +++ b/extensions/source/abpilot/admininvokationpage.hxx @@ -34,8 +34,10 @@ namespace abp explicit AdminDialogInvokationPage(OAddressBookSourcePilot* pDialog, TabPageParent pPageParent); virtual ~AdminDialogInvokationPage() override; private: - // TabDialog overridables - virtual void ActivatePage() override; + // BuilderPage overridables + virtual void Activate() override; + + // OWizard overridables virtual void initializePage() override; // OImportPage overridables diff --git a/extensions/source/abpilot/fieldmappingpage.cxx b/extensions/source/abpilot/fieldmappingpage.cxx index 93a2ca733bda..54e2ab86e7ed 100644 --- a/extensions/source/abpilot/fieldmappingpage.cxx +++ b/extensions/source/abpilot/fieldmappingpage.cxx @@ -37,9 +37,9 @@ namespace abp { } - void FieldMappingPage::ActivatePage() + void FieldMappingPage::Activate() { - AddressBookSourcePage::ActivatePage(); + AddressBookSourcePage::Activate(); m_xInvokeDialog->grab_focus(); } diff --git a/extensions/source/abpilot/fieldmappingpage.hxx b/extensions/source/abpilot/fieldmappingpage.hxx index 8aaebbefbfee..63b5b2158832 100644 --- a/extensions/source/abpilot/fieldmappingpage.hxx +++ b/extensions/source/abpilot/fieldmappingpage.hxx @@ -36,8 +36,8 @@ namespace abp // OWizardPage overridables virtual void initializePage() override; - // TabDialog overridables - virtual void ActivatePage() override; + // BuilderPage overridables + virtual void Activate() override; DECL_LINK(OnInvokeDialog, weld::Button&, void); diff --git a/extensions/source/abpilot/tableselectionpage.cxx b/extensions/source/abpilot/tableselectionpage.cxx index 3d56a33fb8bf..a897326902ac 100644 --- a/extensions/source/abpilot/tableselectionpage.cxx +++ b/extensions/source/abpilot/tableselectionpage.cxx @@ -39,9 +39,9 @@ namespace abp { } - void TableSelectionPage::ActivatePage() + void TableSelectionPage::Activate() { - AddressBookSourcePage::ActivatePage(); + AddressBookSourcePage::Activate(); m_xTableList->grab_focus(); } diff --git a/extensions/source/abpilot/tableselectionpage.hxx b/extensions/source/abpilot/tableselectionpage.hxx index f25258bc894a..35f2e40e6cc3 100644 --- a/extensions/source/abpilot/tableselectionpage.hxx +++ b/extensions/source/abpilot/tableselectionpage.hxx @@ -37,8 +37,8 @@ namespace abp virtual void initializePage() override; virtual bool commitPage( ::vcl::WizardTypes::CommitPageReason _eReason ) override; - // TabDialog overridables - virtual void ActivatePage() override; + // BuilderPage overridables + virtual void Activate() override; // OImportPage overridables virtual bool canAdvance() const override; diff --git a/extensions/source/abpilot/typeselectionpage.cxx b/extensions/source/abpilot/typeselectionpage.cxx index a9f68fd1afd3..394b6889cefb 100644 --- a/extensions/source/abpilot/typeselectionpage.cxx +++ b/extensions/source/abpilot/typeselectionpage.cxx @@ -134,21 +134,15 @@ namespace abp TypeSelectionPage::~TypeSelectionPage() { - disposeOnce(); - } - - void TypeSelectionPage::dispose() - { for (auto & elem : m_aAllTypes) { elem.m_bVisible = false; } - AddressBookSourcePage::dispose(); } - void TypeSelectionPage::ActivatePage() + void TypeSelectionPage::Activate() { - AddressBookSourcePage::ActivatePage(); + AddressBookSourcePage::Activate(); for (auto const& elem : m_aAllTypes) { @@ -162,9 +156,9 @@ namespace abp getDialog()->enableButtons(WizardButtonFlags::PREVIOUS, false); } - void TypeSelectionPage::DeactivatePage() + void TypeSelectionPage::Deactivate() { - AddressBookSourcePage::DeactivatePage(); + AddressBookSourcePage::Deactivate(); getDialog()->enableButtons(WizardButtonFlags::PREVIOUS, true); } diff --git a/extensions/source/abpilot/typeselectionpage.hxx b/extensions/source/abpilot/typeselectionpage.hxx index cf5c537b39f0..ef8a609cd6ad 100644 --- a/extensions/source/abpilot/typeselectionpage.hxx +++ b/extensions/source/abpilot/typeselectionpage.hxx @@ -57,7 +57,6 @@ namespace abp public: explicit TypeSelectionPage(OAddressBookSourcePilot* pDialog, TabPageParent pPageParent); virtual ~TypeSelectionPage() override; - virtual void dispose() override; // retrieves the currently selected type AddressSourceType getSelectedType() const; @@ -67,9 +66,9 @@ namespace abp virtual void initializePage() override; virtual bool commitPage( ::vcl::WizardTypes::CommitPageReason _eReason ) override; - // TabDialog overridables - virtual void ActivatePage() override; - virtual void DeactivatePage() override; + // BuilderPage overridables + virtual void Activate() override; + virtual void Deactivate() override; // OImportPage overridables virtual bool canAdvance() const override; diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx index fdd5c727e583..79d8c1920640 100644 --- a/extensions/source/dbpilots/commonpagesdbp.cxx +++ b/extensions/source/dbpilots/commonpagesdbp.cxx @@ -83,9 +83,9 @@ namespace dbp { } - void OTableSelectionPage::ActivatePage() + void OTableSelectionPage::Activate() { - OControlWizardPage::ActivatePage(); + OControlWizardPage::Activate(); m_xDatasource->grab_focus(); } @@ -392,11 +392,11 @@ namespace dbp m_pList->set_sensitive(m_pYes->get_active()); } - void OMaybeListSelectionPage::ActivatePage() + void OMaybeListSelectionPage::Activate() { - OControlWizardPage::ActivatePage(); + OControlWizardPage::Activate(); - DBG_ASSERT(m_pYes, "OMaybeListSelectionPage::ActivatePage: no controls announced!"); + DBG_ASSERT(m_pYes, "OMaybeListSelectionPage::Activate: no controls announced!"); if (m_pYes->get_active()) m_pList->grab_focus(); else @@ -410,7 +410,7 @@ namespace dbp , m_xStoreNo(m_xBuilder->weld_radio_button("noRadiobutton")) , m_xStoreWhere(m_xBuilder->weld_combo_box("storeInFieldCombobox")) { - SetText(compmodule::ModuleRes(RID_STR_OPTION_DB_FIELD_TITLE)); + SetPageTitle(compmodule::ModuleRes(RID_STR_OPTION_DB_FIELD_TITLE)); announceControls(*m_xStoreYes, *m_xStoreNo, *m_xStoreWhere); } @@ -429,7 +429,6 @@ namespace dbp implInitialize(getDBFieldSetting()); } - bool ODBFieldPage::commitPage( ::vcl::WizardTypes::CommitPageReason _eReason ) { if (!OMaybeListSelectionPage::commitPage(_eReason)) diff --git a/extensions/source/dbpilots/commonpagesdbp.hxx b/extensions/source/dbpilots/commonpagesdbp.hxx index 66a9ea48a832..70b750dfadb6 100644 --- a/extensions/source/dbpilots/commonpagesdbp.hxx +++ b/extensions/source/dbpilots/commonpagesdbp.hxx @@ -42,8 +42,8 @@ namespace dbp virtual ~OTableSelectionPage() override; private: - // TabPage overridables - void ActivatePage() override; + // BuilderPage overridables + void Activate() override; // OWizardPage overridables virtual void initializePage() override; @@ -73,8 +73,8 @@ namespace dbp protected: DECL_LINK( OnRadioSelected, weld::Button&, void ); - // TabPage overridables - void ActivatePage() override; + // BuilderPage overridables + void Activate() override; // own helper void announceControls( diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx index ba4dc948e0c0..e8aaed73991b 100644 --- a/extensions/source/dbpilots/controlwizard.cxx +++ b/extensions/source/dbpilots/controlwizard.cxx @@ -43,8 +43,8 @@ #include <tools/urlobj.hxx> #include <osl/diagnose.h> -#define WINDOW_SIZE_X 240 -#define WINDOW_SIZE_Y 185 +#define WIZARD_SIZE_X 60 +#define WIZARD_SIZE_Y 23 namespace dbp { @@ -77,8 +77,8 @@ namespace dbp : OControlWizardPage_Base(pPageParent, rUIXMLDescription, rID) , m_pDialog(pDialog) { - ::Size aPageSize(LogicToPixel(::Size(WINDOW_SIZE_X, WINDOW_SIZE_Y), MapMode(MapUnit::MapAppFont))); - m_xContainer->set_size_request(aPageSize.Width(), aPageSize.Height()); + m_xContainer->set_size_request(m_xContainer->get_approximate_digit_width() * WIZARD_SIZE_X, + m_xContainer->get_text_height() * WIZARD_SIZE_Y); } OControlWizardPage::~OControlWizardPage() diff --git a/extensions/source/dbpilots/controlwizard.hxx b/extensions/source/dbpilots/controlwizard.hxx index 884992bfa30a..d8590356fd2d 100644 --- a/extensions/source/dbpilots/controlwizard.hxx +++ b/extensions/source/dbpilots/controlwizard.hxx @@ -140,9 +140,6 @@ namespace dbp void implDetermineForm(); void implDeterminePage(); void implDetermineShape(); - - // made private. Not to be used by derived (or external) classes - using OControlWizard_Base::ActivatePage; }; diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx index 7da39e065439..2fc497e720bf 100644 --- a/extensions/source/dbpilots/gridwizard.cxx +++ b/extensions/source/dbpilots/gridwizard.cxx @@ -216,7 +216,7 @@ namespace dbp } } - VclPtr<TabPage> OGridWizard::createPage(WizardState _nState) + std::unique_ptr<BuilderPage> OGridWizard::createPage(WizardState _nState) { OString sIdent(OString::number(_nState)); weld::Container* pPageContainer = m_xAssistant->append_page(sIdent); @@ -226,12 +226,12 @@ namespace dbp switch (_nState) { case GW_STATE_DATASOURCE_SELECTION: - return VclPtr<OTableSelectionPage>::Create(this, aParent); + return std::make_unique<OTableSelectionPage>(this, aParent); case GW_STATE_FIELDSELECTION: - return VclPtr<OGridFieldsSelection>::Create(this, aParent); + return std::make_unique<OGridFieldsSelection>(this, aParent); } - return VclPtr<TabPage>(); + return nullptr; } vcl::WizardTypes::WizardState OGridWizard::determineNextState( WizardState _nCurrentState ) const @@ -309,9 +309,9 @@ namespace dbp { } - void OGridFieldsSelection::ActivatePage() + void OGridFieldsSelection::Activate() { - OGridPage::ActivatePage(); + OGridPage::Activate(); m_xExistFields->grab_focus(); } diff --git a/extensions/source/dbpilots/gridwizard.hxx b/extensions/source/dbpilots/gridwizard.hxx index a0756f6295f5..c96a86d3271f 100644 --- a/extensions/source/dbpilots/gridwizard.hxx +++ b/extensions/source/dbpilots/gridwizard.hxx @@ -47,7 +47,7 @@ namespace dbp private: // OWizardMachine overridables - virtual VclPtr<TabPage> createPage( WizardState _nState ) override; + virtual std::unique_ptr<BuilderPage> createPage( WizardState _nState ) override; virtual WizardState determineNextState( WizardState _nCurrentState ) const override; virtual void enterState( WizardState _nState ) override; virtual bool leaveState( WizardState _nState ) override; @@ -83,8 +83,8 @@ namespace dbp virtual ~OGridFieldsSelection() override; private: - // TabPage overridables - virtual void ActivatePage() override; + // BuilderPage overridables + virtual void Activate() override; // OWizardPage overridables virtual void initializePage() override; diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx index 8ec840f4a353..031433b391a7 100644 --- a/extensions/source/dbpilots/groupboxwiz.cxx +++ b/extensions/source/dbpilots/groupboxwiz.cxx @@ -60,7 +60,7 @@ namespace dbp return FormComponentType::GROUPBOX == _nClassId; } - VclPtr<TabPage> OGroupBoxWizard::createPage(::vcl::WizardTypes::WizardState _nState) + std::unique_ptr<BuilderPage> OGroupBoxWizard::createPage(::vcl::WizardTypes::WizardState _nState) { OString sIdent(OString::number(_nState)); weld::Container* pPageContainer = m_xAssistant->append_page(sIdent); @@ -70,19 +70,19 @@ namespace dbp switch (_nState) { case GBW_STATE_OPTIONLIST: - return VclPtr<ORadioSelectionPage>::Create(this, aParent); + return std::make_unique<ORadioSelectionPage>(this, aParent); case GBW_STATE_DEFAULTOPTION: - return VclPtr<ODefaultFieldSelectionPage>::Create(this, aParent); + return std::make_unique<ODefaultFieldSelectionPage>(this, aParent); case GBW_STATE_OPTIONVALUES: - return VclPtr<OOptionValuesPage>::Create(this, aParent); + return std::make_unique<OOptionValuesPage>(this, aParent); case GBW_STATE_DBFIELD: - return VclPtr<OOptionDBFieldPage>::Create(this, aParent); + return std::make_unique<OOptionDBFieldPage>(this, aParent); case GBW_STATE_FINALIZE: - return VclPtr<OFinalizeGBWPage>::Create(this, aParent); + return std::make_unique<OFinalizeGBWPage>(this, aParent); } return nullptr; @@ -196,9 +196,9 @@ namespace dbp { } - void ORadioSelectionPage::ActivatePage() + void ORadioSelectionPage::Activate() { - OGBWPage::ActivatePage(); + OGBWPage::Activate(); m_xRadioName->grab_focus(); } @@ -353,9 +353,9 @@ namespace dbp implTraveledOptions(); } - void OOptionValuesPage::ActivatePage() + void OOptionValuesPage::Activate() { - OGBWPage::ActivatePage(); + OGBWPage::Activate(); m_xValue->grab_focus(); } @@ -432,9 +432,9 @@ namespace dbp { } - void OFinalizeGBWPage::ActivatePage() + void OFinalizeGBWPage::Activate() { - OGBWPage::ActivatePage(); + OGBWPage::Activate(); m_xName->grab_focus(); } diff --git a/extensions/source/dbpilots/groupboxwiz.hxx b/extensions/source/dbpilots/groupboxwiz.hxx index 903ac01d93cd..19a10f9f29c0 100644 --- a/extensions/source/dbpilots/groupboxwiz.hxx +++ b/extensions/source/dbpilots/groupboxwiz.hxx @@ -55,7 +55,7 @@ namespace dbp private: // OWizardMachine overridables - virtual VclPtr<TabPage> createPage( WizardState _nState ) override; + virtual std::unique_ptr<BuilderPage> createPage( WizardState _nState ) override; virtual WizardState determineNextState( WizardState _nCurrentState ) const override; virtual void enterState( WizardState _nState ) override; virtual bool onFinish() override; @@ -87,8 +87,8 @@ namespace dbp virtual ~ORadioSelectionPage() override; private: - // TabPage overridables - void ActivatePage() override; + // BuilderPage overridables + void Activate() override; // OWizardPage overridables virtual void initializePage() override; @@ -134,8 +134,8 @@ namespace dbp virtual ~OOptionValuesPage() override; private: - // TabPage overridables - void ActivatePage() override; + // BuilderPage overridables + void Activate() override; // OWizardPage overridables virtual void initializePage() override; @@ -165,8 +165,8 @@ namespace dbp virtual ~OFinalizeGBWPage() override; private: - // TabPage overridables - void ActivatePage() override; + // BuilderPage overridables + void Activate() override; // OWizardPage overridables virtual void initializePage() override; diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx index 3c6e0d94e998..55107a19bf07 100644 --- a/extensions/source/dbpilots/listcombowizard.cxx +++ b/extensions/source/dbpilots/listcombowizard.cxx @@ -83,7 +83,7 @@ namespace dbp return false; } - VclPtr<TabPage> OListComboWizard::createPage(WizardState _nState) + std::unique_ptr<BuilderPage> OListComboWizard::createPage(WizardState _nState) { OString sIdent(OString::number(_nState)); weld::Container* pPageContainer = m_xAssistant->append_page(sIdent); @@ -93,18 +93,18 @@ namespace dbp switch (_nState) { case LCW_STATE_DATASOURCE_SELECTION: - return VclPtr<OTableSelectionPage>::Create(this, aParent); + return std::make_unique<OTableSelectionPage>(this, aParent); case LCW_STATE_TABLESELECTION: - return VclPtr<OContentTableSelection>::Create(this, aParent); + return std::make_unique<OContentTableSelection>(this, aParent); case LCW_STATE_FIELDSELECTION: - return VclPtr<OContentFieldSelection>::Create(this, aParent); + return std::make_unique<OContentFieldSelection>(this, aParent); case LCW_STATE_FIELDLINK: - return VclPtr<OLinkFieldsPage>::Create(this, aParent); + return std::make_unique<OLinkFieldsPage>(this, aParent); case LCW_STATE_COMBODBFIELD: - return VclPtr<OComboDBFieldPage>::Create(this, aParent); + return std::make_unique<OComboDBFieldPage>(this, aParent); } - return VclPtr<TabPage>(); + return nullptr; } vcl::WizardTypes::WizardState OListComboWizard::determineNextState( WizardState _nCurrentState ) const @@ -276,9 +276,9 @@ namespace dbp { } - void OContentTableSelection::ActivatePage() + void OContentTableSelection::Activate() { - OLCPage::ActivatePage(); + OLCPage::Activate(); m_xSelectTable->grab_focus(); } @@ -407,9 +407,9 @@ namespace dbp { } - void OLinkFieldsPage::ActivatePage() + void OLinkFieldsPage::Activate() { - OLCPage::ActivatePage(); + OLCPage::Activate(); m_xValueListField->grab_focus(); } @@ -469,9 +469,9 @@ namespace dbp return static_cast<OListComboWizard*>(getDialog())->getSettings().sLinkedFormField; } - void OComboDBFieldPage::ActivatePage() + void OComboDBFieldPage::Activate() { - ODBFieldPage::ActivatePage(); + ODBFieldPage::Activate(); getDialog()->enableButtons(WizardButtonFlags::FINISH, true); } diff --git a/extensions/source/dbpilots/listcombowizard.hxx b/extensions/source/dbpilots/listcombowizard.hxx index 93f373eaa6d0..caa2335f1d0d 100644 --- a/extensions/source/dbpilots/listcombowizard.hxx +++ b/extensions/source/dbpilots/listcombowizard.hxx @@ -62,7 +62,7 @@ namespace dbp private: // OWizardMachine overridables - virtual VclPtr<TabPage> createPage( WizardState _nState ) override; + virtual std::unique_ptr<BuilderPage> createPage( WizardState _nState ) override; virtual WizardState determineNextState( WizardState _nCurrentState ) const override; virtual void enterState( WizardState _nState ) override; virtual bool leaveState( WizardState _nState ) override; @@ -101,8 +101,8 @@ namespace dbp virtual ~OContentTableSelection() override; private: - // TabPage overridables - virtual void ActivatePage() override; + // BuilderPage overridables + virtual void Activate() override; // OWizardPage overridables virtual void initializePage() override; @@ -143,8 +143,8 @@ namespace dbp virtual ~OLinkFieldsPage() override; private: - // TabPage overridables - virtual void ActivatePage() override; + // BuilderPage overridables + virtual void Activate() override; // OWizardPage overridables virtual void initializePage() override; @@ -162,8 +162,8 @@ namespace dbp explicit OComboDBFieldPage(OControlWizard* pParent, TabPageParent pPageParent); protected: - // TabPage overridables - virtual void ActivatePage() override; + // BuilderPage overridables + virtual void Activate() override; // OWizardPage overridables virtual bool canAdvance() const override; diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 68775d5c940b..128307f30456 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -2721,8 +2721,7 @@ namespace pcr throw RuntimeException(); // caught below TabPageParent aParent(aDialog.get_content_area(), &aDialog); - VclPtr<SfxTabPage> xPage = (*fnCreatePage)(aParent, &aCoreSet); - aDialog.SetTabPage(xPage); + aDialog.SetTabPage((*fnCreatePage)(aParent, &aCoreSet)); _rClearBeforeDialog.clear(); if ( RET_OK == aDialog.run() ) |