summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-04-17 12:10:27 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-17 12:14:28 +0100
commit0a497cb52a2ffecd94178eed296ba8ae7f526358 (patch)
tree9ca24fc64bc20085dc8f055114b67736cd08119b /svtools
parent0703fc22519b391cece54f9d67012cffd9867765 (diff)
Use VclPtr for OGenericUnoDialog::createDialog.
Change-Id: I0c2040889931a4700735339c5252f8d5fee234ff
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/uno/addrtempuno.cxx8
-rw-r--r--svtools/source/uno/genericunodialog.cxx2
-rw-r--r--svtools/source/uno/wizard/unowizard.cxx8
3 files changed, 9 insertions, 9 deletions
diff --git a/svtools/source/uno/addrtempuno.cxx b/svtools/source/uno/addrtempuno.cxx
index 7b6aba43a7c9..d21a3baefa6f 100644
--- a/svtools/source/uno/addrtempuno.cxx
+++ b/svtools/source/uno/addrtempuno.cxx
@@ -71,7 +71,7 @@ namespace {
protected:
// OGenericUnoDialog overridables
- virtual Dialog* createDialog(vcl::Window* _pParent) SAL_OVERRIDE;
+ virtual VclPtr<Dialog> createDialog(vcl::Window* _pParent) SAL_OVERRIDE;
virtual void implInitialize(const com::sun::star::uno::Any& _rValue) SAL_OVERRIDE;
@@ -212,12 +212,12 @@ namespace {
}
- Dialog* OAddressBookSourceDialogUno::createDialog(vcl::Window* _pParent)
+ VclPtr<Dialog> OAddressBookSourceDialogUno::createDialog(vcl::Window* _pParent)
{
if ( m_xDataSource.is() && !m_sTable.isEmpty() )
- return new AddressBookSourceDialog(_pParent, m_aContext, m_xDataSource, m_sDataSourceName, m_sTable, m_aAliases );
+ return VclPtr<AddressBookSourceDialog>::Create(_pParent, m_aContext, m_xDataSource, m_sDataSourceName, m_sTable, m_aAliases );
else
- return new AddressBookSourceDialog( _pParent, m_aContext );
+ return VclPtr<AddressBookSourceDialog>::Create( _pParent, m_aContext );
}
}
diff --git a/svtools/source/uno/genericunodialog.cxx b/svtools/source/uno/genericunodialog.cxx
index 8c70e93f1184..4b7f82f3d753 100644
--- a/svtools/source/uno/genericunodialog.cxx
+++ b/svtools/source/uno/genericunodialog.cxx
@@ -178,7 +178,7 @@ bool OGenericUnoDialog::impl_ensureDialog_lck()
// the title
OUString sTitle = m_sTitle;
- Dialog* pDialog = createDialog( pParent );
+ VclPtr<Dialog> pDialog = createDialog( pParent );
OSL_ENSURE( pDialog, "OGenericUnoDialog::impl_ensureDialog_lck: createDialog returned nonsense!" );
if ( !pDialog )
return false;
diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx
index 20e44f65b0a7..7fb5d2384f81 100644
--- a/svtools/source/uno/wizard/unowizard.cxx
+++ b/svtools/source/uno/wizard/unowizard.cxx
@@ -136,7 +136,7 @@ namespace {
virtual ~Wizard();
protected:
- virtual Dialog* createDialog( vcl::Window* _pParent ) SAL_OVERRIDE;
+ virtual VclPtr<Dialog> createDialog( vcl::Window* _pParent ) SAL_OVERRIDE;
virtual void destroyDialog() SAL_OVERRIDE;
private:
@@ -268,12 +268,12 @@ namespace {
}
- Dialog* Wizard::createDialog( vcl::Window* i_pParent )
+ VclPtr<Dialog> Wizard::createDialog( vcl::Window* i_pParent )
{
- WizardShell* pDialog( new WizardShell( i_pParent, m_xController, m_aWizardSteps ) );
+ VclPtrInstance<WizardShell> pDialog( i_pParent, m_xController, m_aWizardSteps );
pDialog->SetHelpId( lcl_getHelpId( m_sHelpURL ) );
pDialog->setTitleBase( m_sTitle );
- return pDialog;
+ return pDialog.get();
}