summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/uno
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 /dbaccess/source/ui/uno
parent0703fc22519b391cece54f9d67012cffd9867765 (diff)
Use VclPtr for OGenericUnoDialog::createDialog.
Change-Id: I0c2040889931a4700735339c5252f8d5fee234ff
Diffstat (limited to 'dbaccess/source/ui/uno')
-rw-r--r--dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx7
-rw-r--r--dbaccess/source/ui/uno/DBTypeWizDlg.cxx5
-rw-r--r--dbaccess/source/ui/uno/DBTypeWizDlg.hxx2
-rw-r--r--dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx4
-rw-r--r--dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx2
-rw-r--r--dbaccess/source/ui/uno/TableFilterDlg.cxx5
-rw-r--r--dbaccess/source/ui/uno/TableFilterDlg.hxx2
-rw-r--r--dbaccess/source/ui/uno/UserSettingsDlg.cxx5
-rw-r--r--dbaccess/source/ui/uno/UserSettingsDlg.hxx2
-rw-r--r--dbaccess/source/ui/uno/admindlg.cxx5
-rw-r--r--dbaccess/source/ui/uno/admindlg.hxx2
-rw-r--r--dbaccess/source/ui/uno/composerdialogs.cxx10
-rw-r--r--dbaccess/source/ui/uno/composerdialogs.hxx8
-rw-r--r--dbaccess/source/ui/uno/copytablewizard.cxx6
-rw-r--r--dbaccess/source/ui/uno/textconnectionsettings_uno.cxx6
-rw-r--r--dbaccess/source/ui/uno/unoDirectSql.cxx4
-rw-r--r--dbaccess/source/ui/uno/unoDirectSql.hxx2
-rw-r--r--dbaccess/source/ui/uno/unosqlmessage.cxx6
18 files changed, 39 insertions, 44 deletions
diff --git a/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx b/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx
index cf90db45463b..b4c41272ba2d 100644
--- a/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx
+++ b/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx
@@ -63,7 +63,7 @@ namespace dbaui
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const SAL_OVERRIDE;
protected:
// OGenericUnoDialog overridables
- virtual Dialog* createDialog(vcl::Window* _pParent) SAL_OVERRIDE;
+ virtual VclPtr<Dialog> createDialog(vcl::Window* _pParent) SAL_OVERRIDE;
};
OAdvancedSettingsDialog::OAdvancedSettingsDialog(const Reference< XComponentContext >& _rxORB)
@@ -119,10 +119,9 @@ namespace dbaui
describeProperties(aProps);
return new ::cppu::OPropertyArrayHelper(aProps);
}
- Dialog* OAdvancedSettingsDialog::createDialog(vcl::Window* _pParent)
+ VclPtr<Dialog> OAdvancedSettingsDialog::createDialog(vcl::Window* _pParent)
{
- AdvancedSettingsDialog* pDlg = new AdvancedSettingsDialog(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection);
- return pDlg;
+ return VclPtr<AdvancedSettingsDialog>::Create(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection);
}
} // namespace dbaui
diff --git a/dbaccess/source/ui/uno/DBTypeWizDlg.cxx b/dbaccess/source/ui/uno/DBTypeWizDlg.cxx
index bc1873982ea0..f7cf6b6f15d8 100644
--- a/dbaccess/source/ui/uno/DBTypeWizDlg.cxx
+++ b/dbaccess/source/ui/uno/DBTypeWizDlg.cxx
@@ -92,10 +92,9 @@ Reference<XPropertySetInfo> SAL_CALL ODBTypeWizDialog::getPropertySetInfo() thr
return new ::cppu::OPropertyArrayHelper(aProps);
}
-Dialog* ODBTypeWizDialog::createDialog(vcl::Window* _pParent)
+VclPtr<Dialog> ODBTypeWizDialog::createDialog(vcl::Window* _pParent)
{
- ODbTypeWizDialog* pDlg = new ODbTypeWizDialog(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection);
- return pDlg;
+ return VclPtr<ODbTypeWizDialog>::Create(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection);
}
} // namespace dbaui
diff --git a/dbaccess/source/ui/uno/DBTypeWizDlg.hxx b/dbaccess/source/ui/uno/DBTypeWizDlg.hxx
index 4a3a265a6a68..7c3b4105f682 100644
--- a/dbaccess/source/ui/uno/DBTypeWizDlg.hxx
+++ b/dbaccess/source/ui/uno/DBTypeWizDlg.hxx
@@ -55,7 +55,7 @@ public:
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const SAL_OVERRIDE;
protected:
// OGenericUnoDialog overridables
- virtual Dialog* createDialog(vcl::Window* _pParent) SAL_OVERRIDE;
+ virtual VclPtr<Dialog> createDialog(vcl::Window* _pParent) SAL_OVERRIDE;
};
} // namespace dbaui
diff --git a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx
index 6bfbabab11ed..25e9c4c1d705 100644
--- a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx
+++ b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx
@@ -106,9 +106,9 @@ Reference<XPropertySetInfo> SAL_CALL ODBTypeWizDialogSetup::getPropertySetInfo(
return new ::cppu::OPropertyArrayHelper(aProps);
}
-Dialog* ODBTypeWizDialogSetup::createDialog(vcl::Window* _pParent)
+VclPtr<Dialog> ODBTypeWizDialogSetup::createDialog(vcl::Window* _pParent)
{
- return new ODbTypeWizDialogSetup(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection);
+ return VclPtr<ODbTypeWizDialogSetup>::Create(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection);
}
void ODBTypeWizDialogSetup::executedDialog(sal_Int16 _nExecutionResult)
diff --git a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx
index 45f0c7b50e8c..cea42280df7b 100644
--- a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx
+++ b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx
@@ -57,7 +57,7 @@ public:
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const SAL_OVERRIDE;
protected:
// OGenericUnoDialog overridables
- virtual Dialog* createDialog(vcl::Window* _pParent) SAL_OVERRIDE;
+ virtual VclPtr<Dialog> createDialog(vcl::Window* _pParent) SAL_OVERRIDE;
virtual void executedDialog(sal_Int16 _nExecutionResult) SAL_OVERRIDE;
};
diff --git a/dbaccess/source/ui/uno/TableFilterDlg.cxx b/dbaccess/source/ui/uno/TableFilterDlg.cxx
index 9f284263bb1e..fcbf26bf6059 100644
--- a/dbaccess/source/ui/uno/TableFilterDlg.cxx
+++ b/dbaccess/source/ui/uno/TableFilterDlg.cxx
@@ -92,10 +92,9 @@ Reference<XPropertySetInfo> SAL_CALL OTableFilterDialog::getPropertySetInfo() t
return new ::cppu::OPropertyArrayHelper(aProps);
}
-Dialog* OTableFilterDialog::createDialog(vcl::Window* _pParent)
+VclPtr<Dialog> OTableFilterDialog::createDialog(vcl::Window* _pParent)
{
- OTableSubscriptionDialog* pDlg = new OTableSubscriptionDialog(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection);
- return pDlg;
+ return VclPtr<OTableSubscriptionDialog>::Create(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection);
}
} // namespace dbaui
diff --git a/dbaccess/source/ui/uno/TableFilterDlg.hxx b/dbaccess/source/ui/uno/TableFilterDlg.hxx
index 408457ea8cc1..28d84259cf68 100644
--- a/dbaccess/source/ui/uno/TableFilterDlg.hxx
+++ b/dbaccess/source/ui/uno/TableFilterDlg.hxx
@@ -55,7 +55,7 @@ public:
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const SAL_OVERRIDE;
protected:
// OGenericUnoDialog overridables
- virtual Dialog* createDialog(vcl::Window* _pParent) SAL_OVERRIDE;
+ virtual VclPtr<Dialog> createDialog(vcl::Window* _pParent) SAL_OVERRIDE;
};
} // namespace dbaui
diff --git a/dbaccess/source/ui/uno/UserSettingsDlg.cxx b/dbaccess/source/ui/uno/UserSettingsDlg.cxx
index e66d888c25a1..7d3627acc2ba 100644
--- a/dbaccess/source/ui/uno/UserSettingsDlg.cxx
+++ b/dbaccess/source/ui/uno/UserSettingsDlg.cxx
@@ -92,10 +92,9 @@ Reference<XPropertySetInfo> SAL_CALL OUserSettingsDialog::getPropertySetInfo()
return new ::cppu::OPropertyArrayHelper(aProps);
}
-Dialog* OUserSettingsDialog::createDialog(vcl::Window* _pParent)
+VclPtr<Dialog> OUserSettingsDialog::createDialog(vcl::Window* _pParent)
{
- OUserAdminDlg* pDlg = new OUserAdminDlg(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection, m_xActiveConnection);
- return pDlg;
+ return VclPtr<OUserAdminDlg>::Create(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection, m_xActiveConnection);
}
} // namespace dbaui
diff --git a/dbaccess/source/ui/uno/UserSettingsDlg.hxx b/dbaccess/source/ui/uno/UserSettingsDlg.hxx
index 043fa1a52410..e0394e99b358 100644
--- a/dbaccess/source/ui/uno/UserSettingsDlg.hxx
+++ b/dbaccess/source/ui/uno/UserSettingsDlg.hxx
@@ -55,7 +55,7 @@ public:
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const SAL_OVERRIDE;
protected:
// OGenericUnoDialog overridables
- virtual Dialog* createDialog(vcl::Window* _pParent) SAL_OVERRIDE;
+ virtual VclPtr<Dialog> createDialog(vcl::Window* _pParent) SAL_OVERRIDE;
};
} // namespace dbaui
diff --git a/dbaccess/source/ui/uno/admindlg.cxx b/dbaccess/source/ui/uno/admindlg.cxx
index f2f52d656174..097156925efc 100644
--- a/dbaccess/source/ui/uno/admindlg.cxx
+++ b/dbaccess/source/ui/uno/admindlg.cxx
@@ -92,10 +92,9 @@ Reference<XPropertySetInfo> SAL_CALL ODataSourcePropertyDialog::getPropertySetI
return new ::cppu::OPropertyArrayHelper(aProps);
}
-Dialog* ODataSourcePropertyDialog::createDialog(vcl::Window* _pParent)
+VclPtr<Dialog> ODataSourcePropertyDialog::createDialog(vcl::Window* _pParent)
{
-
- ODbAdminDialog* pDialog = new ODbAdminDialog(_pParent, m_pDatasourceItems, m_aContext);
+ VclPtrInstance<ODbAdminDialog> pDialog(_pParent, m_pDatasourceItems, m_aContext);
// the initial selection
if ( m_aInitialSelection.hasValue() )
diff --git a/dbaccess/source/ui/uno/admindlg.hxx b/dbaccess/source/ui/uno/admindlg.hxx
index c791129851f3..e2300420566f 100644
--- a/dbaccess/source/ui/uno/admindlg.hxx
+++ b/dbaccess/source/ui/uno/admindlg.hxx
@@ -55,7 +55,7 @@ public:
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const SAL_OVERRIDE;
protected:
// OGenericUnoDialog overridables
- virtual Dialog* createDialog(vcl::Window* _pParent) SAL_OVERRIDE;
+ virtual VclPtr<Dialog> createDialog(vcl::Window* _pParent) SAL_OVERRIDE;
};
} // namespace dbaui
diff --git a/dbaccess/source/ui/uno/composerdialogs.cxx b/dbaccess/source/ui/uno/composerdialogs.cxx
index 373badf7492c..a4b29d889ecf 100644
--- a/dbaccess/source/ui/uno/composerdialogs.cxx
+++ b/dbaccess/source/ui/uno/composerdialogs.cxx
@@ -77,7 +77,7 @@ namespace dbaui
IMPLEMENT_PROPERTYCONTAINER_DEFAULTS( ComposerDialog )
- Dialog* ComposerDialog::createDialog(vcl::Window* _pParent)
+ VclPtr<Dialog> ComposerDialog::createDialog(vcl::Window* _pParent)
{
// obtain all the objects needed for the dialog
Reference< XConnection > xConnection;
@@ -140,9 +140,9 @@ namespace dbaui
return static_cast< XServiceInfo* >(new RowsetFilterDialog( comphelper::getComponentContext(_rxORB)));
}
- Dialog* RowsetFilterDialog::createComposerDialog( vcl::Window* _pParent, const Reference< XConnection >& _rxConnection, const Reference< XNameAccess >& _rxColumns )
+ VclPtr<Dialog> RowsetFilterDialog::createComposerDialog( vcl::Window* _pParent, const Reference< XConnection >& _rxConnection, const Reference< XNameAccess >& _rxColumns )
{
- return new DlgFilterCrit( _pParent, m_aContext, _rxConnection, m_xComposer, _rxColumns );
+ return VclPtr<DlgFilterCrit>::Create( _pParent, m_aContext, _rxConnection, m_xComposer, _rxColumns );
}
void SAL_CALL RowsetFilterDialog::initialize( const Sequence< Any >& aArguments ) throw (Exception, RuntimeException, std::exception)
@@ -188,9 +188,9 @@ namespace dbaui
return static_cast< XServiceInfo* >(new RowsetOrderDialog( comphelper::getComponentContext(_rxORB)));
}
- Dialog* RowsetOrderDialog::createComposerDialog( vcl::Window* _pParent, const Reference< XConnection >& _rxConnection, const Reference< XNameAccess >& _rxColumns )
+ VclPtr<Dialog> RowsetOrderDialog::createComposerDialog( vcl::Window* _pParent, const Reference< XConnection >& _rxConnection, const Reference< XNameAccess >& _rxColumns )
{
- return new DlgOrderCrit( _pParent, _rxConnection, m_xComposer, _rxColumns );
+ return VclPtr<DlgOrderCrit>::Create( _pParent, _rxConnection, m_xComposer, _rxColumns );
}
void SAL_CALL RowsetOrderDialog::initialize( const Sequence< Any >& aArguments ) throw (Exception, RuntimeException, std::exception)
diff --git a/dbaccess/source/ui/uno/composerdialogs.hxx b/dbaccess/source/ui/uno/composerdialogs.hxx
index 4eb6fe8c2de1..3423427d89af 100644
--- a/dbaccess/source/ui/uno/composerdialogs.hxx
+++ b/dbaccess/source/ui/uno/composerdialogs.hxx
@@ -62,7 +62,7 @@ namespace dbaui
protected:
// own overridables
- virtual Dialog* createComposerDialog(
+ virtual VclPtr<Dialog> createComposerDialog(
vcl::Window* _pParent,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxColumns
@@ -70,7 +70,7 @@ namespace dbaui
private:
// OGenericUnoDialog overridables
- virtual Dialog* createDialog(vcl::Window* _pParent) SAL_OVERRIDE;
+ virtual VclPtr<Dialog> createDialog(vcl::Window* _pParent) SAL_OVERRIDE;
};
// RowsetFilterDialog
@@ -85,7 +85,7 @@ namespace dbaui
protected:
// own overridables
- virtual Dialog* createComposerDialog(
+ virtual VclPtr<Dialog> createComposerDialog(
vcl::Window* _pParent,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxColumns
@@ -110,7 +110,7 @@ namespace dbaui
protected:
// own overridables
- virtual Dialog* createComposerDialog(
+ virtual VclPtr<Dialog> createComposerDialog(
vcl::Window* _pParent,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxColumns
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index b6e307ffaa13..e5ac251907a6 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -193,7 +193,7 @@ namespace dbaui
virtual ~CopyTableWizard();
// OGenericUnoDialog overridables
- virtual Dialog* createDialog( vcl::Window* _pParent ) SAL_OVERRIDE;
+ virtual VclPtr<Dialog> createDialog( vcl::Window* _pParent ) SAL_OVERRIDE;
virtual void executedDialog( sal_Int16 _nExecutionResult ) SAL_OVERRIDE;
private:
@@ -1514,12 +1514,12 @@ void SAL_CALL CopyTableWizard::initialize( const Sequence< Any >& _rArguments )
return new ::cppu::OPropertyArrayHelper( aProps );
}
-Dialog* CopyTableWizard::createDialog( vcl::Window* _pParent )
+VclPtr<Dialog> CopyTableWizard::createDialog( vcl::Window* _pParent )
{
OSL_PRECOND( isInitialized(), "CopyTableWizard::createDialog: not initialized!" );
// this should have been prevented in ::execute already
- OCopyTableWizard* pWizard = new OCopyTableWizard(
+ VclPtrInstance<OCopyTableWizard> pWizard(
_pParent,
m_sDestinationTable,
m_nOperation,
diff --git a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx
index d0c4969b57fb..9744b5af026b 100644
--- a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx
+++ b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx
@@ -104,7 +104,7 @@ namespace dbaui
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;
protected:
using OTextConnectionSettingsDialog_BASE::getFastPropertyValue;
@@ -204,9 +204,9 @@ namespace dbaui
return new ::cppu::OPropertyArrayHelper( aProps );
}
- Dialog* OTextConnectionSettingsDialog::createDialog(vcl::Window* _pParent)
+ VclPtr<Dialog> OTextConnectionSettingsDialog::createDialog(vcl::Window* _pParent)
{
- return new TextConnectionSettingsDialog( _pParent, *m_pDatasourceItems );
+ return VclPtr<TextConnectionSettingsDialog>::Create( _pParent, *m_pDatasourceItems );
}
void OTextConnectionSettingsDialog::implInitialize(const Any& _rValue)
diff --git a/dbaccess/source/ui/uno/unoDirectSql.cxx b/dbaccess/source/ui/uno/unoDirectSql.cxx
index 9f752dac81d0..94b57f10f090 100644
--- a/dbaccess/source/ui/uno/unoDirectSql.cxx
+++ b/dbaccess/source/ui/uno/unoDirectSql.cxx
@@ -78,7 +78,7 @@ namespace dbaui
IMPLEMENT_PROPERTYCONTAINER_DEFAULTS( ODirectSQLDialog )
- Dialog* ODirectSQLDialog::createDialog(vcl::Window* _pParent)
+ VclPtr<Dialog> ODirectSQLDialog::createDialog(vcl::Window* _pParent)
{
// obtain all the objects needed for the dialog
Reference< XConnection > xConnection = m_xActiveConnection;
@@ -99,7 +99,7 @@ namespace dbaui
// can't create the dialog if I have improper settings
return NULL;
- return new DirectSQLDialog( _pParent, xConnection);
+ return VclPtr<DirectSQLDialog>::Create( _pParent, xConnection );
}
void ODirectSQLDialog::implInitialize(const Any& _rValue)
{
diff --git a/dbaccess/source/ui/uno/unoDirectSql.hxx b/dbaccess/source/ui/uno/unoDirectSql.hxx
index 43844874009e..d3330170b538 100644
--- a/dbaccess/source/ui/uno/unoDirectSql.hxx
+++ b/dbaccess/source/ui/uno/unoDirectSql.hxx
@@ -57,7 +57,7 @@ namespace dbaui
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;
};
diff --git a/dbaccess/source/ui/uno/unosqlmessage.cxx b/dbaccess/source/ui/uno/unosqlmessage.cxx
index df635164f7fe..4f381a77793b 100644
--- a/dbaccess/source/ui/uno/unosqlmessage.cxx
+++ b/dbaccess/source/ui/uno/unosqlmessage.cxx
@@ -141,13 +141,13 @@ Reference<XPropertySetInfo> SAL_CALL OSQLMessageDialog::getPropertySetInfo() th
return new ::cppu::OPropertyArrayHelper(aProps);
}
-Dialog* OSQLMessageDialog::createDialog(vcl::Window* _pParent)
+VclPtr<Dialog> OSQLMessageDialog::createDialog(vcl::Window* _pParent)
{
if ( m_aException.hasValue() )
- return new OSQLMessageBox( _pParent, SQLExceptionInfo( m_aException ), WB_OK | WB_DEF_OK, m_sHelpURL );
+ return VclPtr<OSQLMessageBox>::Create( _pParent, SQLExceptionInfo( m_aException ), WB_OK | WB_DEF_OK, m_sHelpURL );
OSL_FAIL("OSQLMessageDialog::createDialog : You should use the SQLException property to specify the error to display!");
- return new OSQLMessageBox(_pParent, SQLException());
+ return VclPtr<OSQLMessageBox>::Create(_pParent, SQLException());
}
} // namespace dbaui