summaryrefslogtreecommitdiff
path: root/dbaccess/source
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source')
-rw-r--r--dbaccess/source/ui/dlg/dbwizsetup.cxx13
-rw-r--r--dbaccess/source/ui/inc/dbwizsetup.hxx2
2 files changed, 7 insertions, 8 deletions
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 3403203c2e33..03b520739f25 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -141,7 +141,7 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(vcl::Window* _pParent
m_pImpl.reset(new ODbDataSourceAdministrationHelper(_rxORB,this,this));
m_pImpl->setDataSourceOrName(_aDataSourceName);
Reference< XPropertySet > xDatasource = m_pImpl->getCurrentDataSource();
- m_pOutSet = new SfxItemSet( *_pItems->GetPool(), _pItems->GetRanges() );
+ m_pOutSet.reset( new SfxItemSet( *_pItems->GetPool(), _pItems->GetRanges() ) );
m_pImpl->translateProperties(xDatasource, *m_pOutSet);
@@ -264,8 +264,7 @@ ODbTypeWizDialogSetup::~ODbTypeWizDialogSetup()
void ODbTypeWizDialogSetup::dispose()
{
- delete m_pOutSet;
- m_pOutSet = nullptr;
+ m_pOutSet.reset();
m_pGeneralPage.clear();
m_pMySQLIntroPage.clear();
m_pFinalPage.clear();
@@ -388,12 +387,12 @@ void ODbTypeWizDialogSetup::resetPages(const Reference< XPropertySet >& _rxDatas
const SfxItemSet* ODbTypeWizDialogSetup::getOutputSet() const
{
- return m_pOutSet;
+ return m_pOutSet.get();
}
SfxItemSet* ODbTypeWizDialogSetup::getWriteOutputSet()
{
- return m_pOutSet;
+ return m_pOutSet.get();
}
std::pair< Reference<XConnection>,bool> ODbTypeWizDialogSetup::createConnection()
@@ -628,7 +627,7 @@ void ODbTypeWizDialogSetup::saveDatasource()
{
SfxTabPage* pPage = static_cast<SfxTabPage*>(WizardDialog::GetPage(getCurrentState()));
if ( pPage )
- pPage->FillItemSet(m_pOutSet);
+ pPage->FillItemSet(m_pOutSet.get());
}
bool ODbTypeWizDialogSetup::leaveState(WizardState _nState)
@@ -640,7 +639,7 @@ bool ODbTypeWizDialogSetup::leaveState(WizardState _nState)
resetPages(m_pImpl->getCurrentDataSource());
}
SfxTabPage* pPage = static_cast<SfxTabPage*>(WizardDialog::GetPage(_nState));
- return pPage && pPage->DeactivatePage(m_pOutSet) != DeactivateRC::KeepPage;
+ return pPage && pPage->DeactivatePage(m_pOutSet.get()) != DeactivateRC::KeepPage;
}
void ODbTypeWizDialogSetup::setTitle(const OUString& /*_sTitle*/)
diff --git a/dbaccess/source/ui/inc/dbwizsetup.hxx b/dbaccess/source/ui/inc/dbwizsetup.hxx
index 0f0588f9bf68..c84b730fab94 100644
--- a/dbaccess/source/ui/inc/dbwizsetup.hxx
+++ b/dbaccess/source/ui/inc/dbwizsetup.hxx
@@ -58,7 +58,7 @@ class ODbTypeWizDialogSetup final : public svt::RoadmapWizard , public IItemSetH
{
private:
std::unique_ptr<ODbDataSourceAdministrationHelper> m_pImpl;
- SfxItemSet* m_pOutSet;
+ std::unique_ptr<SfxItemSet> m_pOutSet;
OUString m_sURL;
OUString m_sOldURL;
bool m_bIsConnectable : 1;