Kaydet (Commit) b69457c1 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in OTableSubscriptionDialog

Change-Id: If8fa9edc62f75f41de1392688a169458ce003bda
Reviewed-on: https://gerrit.libreoffice.org/54852Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 07610fee
...@@ -47,10 +47,10 @@ OTableSubscriptionDialog::OTableSubscriptionDialog(vcl::Window* pParent ...@@ -47,10 +47,10 @@ OTableSubscriptionDialog::OTableSubscriptionDialog(vcl::Window* pParent
{ {
m_pImpl->setDataSourceOrName(_aDataSourceName); m_pImpl->setDataSourceOrName(_aDataSourceName);
Reference< XPropertySet > xDatasource = m_pImpl->getCurrentDataSource(); Reference< XPropertySet > xDatasource = m_pImpl->getCurrentDataSource();
m_pOutSet = new SfxItemSet( *_pItems ); m_pOutSet.reset(new SfxItemSet( *_pItems ));
m_pImpl->translateProperties(xDatasource, *m_pOutSet); m_pImpl->translateProperties(xDatasource, *m_pOutSet);
SetInputSet(m_pOutSet); SetInputSet(m_pOutSet.get());
VclPtrInstance<OTableSubscriptionPage> pTabPage(get_content_area(), *m_pOutSet, this); VclPtrInstance<OTableSubscriptionPage> pTabPage(get_content_area(), *m_pOutSet, this);
pTabPage->SetServiceFactory(_rxORB); pTabPage->SetServiceFactory(_rxORB);
...@@ -64,7 +64,7 @@ OTableSubscriptionDialog::~OTableSubscriptionDialog() ...@@ -64,7 +64,7 @@ OTableSubscriptionDialog::~OTableSubscriptionDialog()
void OTableSubscriptionDialog::dispose() void OTableSubscriptionDialog::dispose()
{ {
delete m_pOutSet; m_pOutSet.reset();
SfxSingleTabDialog::dispose(); SfxSingleTabDialog::dispose();
} }
...@@ -110,12 +110,12 @@ Reference< XPropertySet > const & OTableSubscriptionDialog::getCurrentDataSource ...@@ -110,12 +110,12 @@ Reference< XPropertySet > const & OTableSubscriptionDialog::getCurrentDataSource
const SfxItemSet* OTableSubscriptionDialog::getOutputSet() const const SfxItemSet* OTableSubscriptionDialog::getOutputSet() const
{ {
return m_pOutSet; return m_pOutSet.get();
} }
SfxItemSet* OTableSubscriptionDialog::getWriteOutputSet() SfxItemSet* OTableSubscriptionDialog::getWriteOutputSet()
{ {
return m_pOutSet; return m_pOutSet.get();
} }
} // namespace dbaui } // namespace dbaui
......
...@@ -44,7 +44,7 @@ class ODbDataSourceAdministrationHelper; ...@@ -44,7 +44,7 @@ class ODbDataSourceAdministrationHelper;
std::unique_ptr<ODbDataSourceAdministrationHelper> m_pImpl; std::unique_ptr<ODbDataSourceAdministrationHelper> m_pImpl;
bool m_bStopExecution; // set when the dialog should not be executed bool m_bStopExecution; // set when the dialog should not be executed
SfxItemSet* m_pOutSet; std::unique_ptr<SfxItemSet> m_pOutSet;
public: public:
OTableSubscriptionDialog(vcl::Window* pParent OTableSubscriptionDialog(vcl::Window* pParent
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment