From f12488405cdfd8555078d15807aafc5ffd1b037b Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Mon, 20 Apr 2015 14:00:04 +0100 Subject: dbaccess: convert new to ::Create. Also convert svtools' WizardShell::createPage. Change-Id: I09bd40ef4748aa2de7b49eeefc95be06b545ea05 --- svtools/source/dialogs/roadmapwizard.cxx | 4 ++-- svtools/source/uno/wizard/wizardshell.cxx | 9 ++++----- svtools/source/uno/wizard/wizardshell.hxx | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) (limited to 'svtools') diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx index 0926d409c1fa..71d751fdf455 100644 --- a/svtools/source/dialogs/roadmapwizard.cxx +++ b/svtools/source/dialogs/roadmapwizard.cxx @@ -532,9 +532,9 @@ namespace svt } - TabPage* RoadmapWizard::createPage( WizardState _nState ) + VclPtr RoadmapWizard::createPage( WizardState _nState ) { - TabPage* pPage( NULL ); + VclPtr pPage; StateDescriptions::const_iterator pos = m_pImpl->aStateDescriptors.find( _nState ); OSL_ENSURE( pos != m_pImpl->aStateDescriptors.end(), diff --git a/svtools/source/uno/wizard/wizardshell.cxx b/svtools/source/uno/wizard/wizardshell.cxx index 4a90e85d59a6..b3504d9d5f55 100644 --- a/svtools/source/uno/wizard/wizardshell.cxx +++ b/svtools/source/uno/wizard/wizardshell.cxx @@ -182,14 +182,14 @@ namespace svt { namespace uno } - TabPage* WizardShell::createPage( WizardState i_nState ) + VclPtr WizardShell::createPage( WizardState i_nState ) { ENSURE_OR_RETURN( m_xController.is(), "WizardShell::createPage: no WizardController!", NULL ); ::boost::shared_ptr< WizardPageController > pController( new WizardPageController( *this, m_xController, impl_stateToPageId( i_nState ) ) ); - TabPage* pPage = pController->getTabPage(); - OSL_ENSURE( pPage != NULL, "WizardShell::createPage: illegal tab page!" ); - if ( pPage == NULL ) + VclPtr pPage = pController->getTabPage(); + OSL_ENSURE( pPage, "WizardShell::createPage: illegal tab page!" ); + if ( !pPage ) { // fallback for ill-behaved clients: empty page pPage = VclPtr::Create( this, 0 ); @@ -200,7 +200,6 @@ namespace svt { namespace uno return pPage; } - IWizardPageController* WizardShell::getPageController( TabPage* i_pCurrentPage ) const { return impl_getController( i_pCurrentPage ).get(); diff --git a/svtools/source/uno/wizard/wizardshell.hxx b/svtools/source/uno/wizard/wizardshell.hxx index 17b4763f5a58..68650dd067cf 100644 --- a/svtools/source/uno/wizard/wizardshell.hxx +++ b/svtools/source/uno/wizard/wizardshell.hxx @@ -53,7 +53,7 @@ namespace svt { namespace uno virtual short Execute() SAL_OVERRIDE; // OWizardMachine overridables - virtual TabPage* createPage( WizardState i_nState ) SAL_OVERRIDE; + virtual VclPtr createPage( WizardState i_nState ) SAL_OVERRIDE; virtual void enterState( WizardState i_nState ) SAL_OVERRIDE; virtual bool leaveState( WizardState i_nState ) SAL_OVERRIDE; virtual OUString getStateDisplayName( WizardState i_nState ) const SAL_OVERRIDE; -- cgit