diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-04-20 14:00:04 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-20 15:13:23 +0100 |
commit | f12488405cdfd8555078d15807aafc5ffd1b037b (patch) | |
tree | 487b1ae6138d7f2c320a9846289ee7c422d5b8a3 /svtools/source/uno | |
parent | b8bc9023a3190cd93150fb14c2e37ad4deb8b435 (diff) |
dbaccess: convert new to ::Create.
Also convert svtools' WizardShell::createPage.
Change-Id: I09bd40ef4748aa2de7b49eeefc95be06b545ea05
Diffstat (limited to 'svtools/source/uno')
-rw-r--r-- | svtools/source/uno/wizard/wizardshell.cxx | 9 | ||||
-rw-r--r-- | svtools/source/uno/wizard/wizardshell.hxx | 2 |
2 files changed, 5 insertions, 6 deletions
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<TabPage> 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<TabPage> pPage = pController->getTabPage(); + OSL_ENSURE( pPage, "WizardShell::createPage: illegal tab page!" ); + if ( !pPage ) { // fallback for ill-behaved clients: empty page pPage = VclPtr<TabPage>::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<TabPage> 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; |