summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-19 12:47:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-20 08:19:55 +0200
commitae1139f5b8474bd3056ddc1e25173dc0882b944a (patch)
treeca0407dd24585637f0f55b8f10a48bcd2329578e /dbaccess
parent0f34e96a5ce68a3039f65cd0f896b33f2d20af5f (diff)
loplugin:useuniqueptr in svt::Dialog
Change-Id: Ib13cd74f186de0db1be4414e893b2d4f66048b44 Reviewed-on: https://gerrit.libreoffice.org/59304 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/uno/composerdialogs.cxx2
-rw-r--r--dbaccess/source/ui/uno/unoDirectSql.cxx2
-rw-r--r--dbaccess/source/ui/uno/unosqlmessage.cxx4
3 files changed, 4 insertions, 4 deletions
diff --git a/dbaccess/source/ui/uno/composerdialogs.cxx b/dbaccess/source/ui/uno/composerdialogs.cxx
index 20cc13839470..48d3ce5a6a79 100644
--- a/dbaccess/source/ui/uno/composerdialogs.cxx
+++ b/dbaccess/source/ui/uno/composerdialogs.cxx
@@ -119,7 +119,7 @@ namespace dbaui
if ( !xConnection.is() || !xColumns.is() || !m_xComposer.is() )
{
// can't create the dialog if I have improper settings
- return svt::OGenericUnoDialog::Dialog(nullptr);
+ return svt::OGenericUnoDialog::Dialog();
}
return svt::OGenericUnoDialog::Dialog(createComposerDialog(_pParent, xConnection, xColumns));
diff --git a/dbaccess/source/ui/uno/unoDirectSql.cxx b/dbaccess/source/ui/uno/unoDirectSql.cxx
index 0ad0fce4166d..eb9b92f9159b 100644
--- a/dbaccess/source/ui/uno/unoDirectSql.cxx
+++ b/dbaccess/source/ui/uno/unoDirectSql.cxx
@@ -97,7 +97,7 @@ namespace dbaui
if (!xConnection.is())
{
// can't create the dialog if I have improper settings
- return svt::OGenericUnoDialog::Dialog(nullptr);
+ return svt::OGenericUnoDialog::Dialog();
}
return svt::OGenericUnoDialog::Dialog(VclPtr<DirectSQLDialog>::Create(_pParent, xConnection));
diff --git a/dbaccess/source/ui/uno/unosqlmessage.cxx b/dbaccess/source/ui/uno/unosqlmessage.cxx
index c5b849bdd241..b7d0a5ce4fe0 100644
--- a/dbaccess/source/ui/uno/unosqlmessage.cxx
+++ b/dbaccess/source/ui/uno/unosqlmessage.cxx
@@ -148,10 +148,10 @@ svt::OGenericUnoDialog::Dialog OSQLMessageDialog::createDialog(vcl::Window* _pPa
{
weld::Window* pParent = _pParent ? _pParent->GetFrameWeld() : nullptr;
if ( m_aException.hasValue() )
- return svt::OGenericUnoDialog::Dialog(new OSQLMessageBox(pParent, SQLExceptionInfo(m_aException), MessBoxStyle::Ok | MessBoxStyle::DefaultOk, m_sHelpURL));
+ return svt::OGenericUnoDialog::Dialog(o3tl::make_unique<OSQLMessageBox>(pParent, SQLExceptionInfo(m_aException), MessBoxStyle::Ok | MessBoxStyle::DefaultOk, m_sHelpURL));
OSL_FAIL("OSQLMessageDialog::createDialog : You should use the SQLException property to specify the error to display!");
- return svt::OGenericUnoDialog::Dialog(new OSQLMessageBox(pParent, SQLException()));
+ return svt::OGenericUnoDialog::Dialog(o3tl::make_unique<OSQLMessageBox>(pParent, SQLException()));
}
} // namespace dbaui