diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-27 11:02:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-27 18:31:21 +0200 |
commit | 030d5c2ad2544c00d779d7e608178c3a3c970cd5 (patch) | |
tree | 9994ab0f9d2cb5abfbc948be8ecafe64f44b9ece /dbaccess/source/ui/querydesign/QueryTableView.cxx | |
parent | c275184ae37d145f428a459a07917e127bd67577 (diff) |
loplugin:makeshared in dbaccess
Change-Id: Idf5f6179771edaf7af85d95e10b092ce0e3344f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92969
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess/source/ui/querydesign/QueryTableView.cxx')
-rw-r--r-- | dbaccess/source/ui/querydesign/QueryTableView.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index 728925e4f600..1847cfe7b5ee 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -303,10 +303,9 @@ void OQueryTableView::NotifyTabConnection(const OQueryTableConnection& rNewConn, if (pTabConn == nullptr) { // the new data ... - OQueryTableConnectionData* pNewData = static_cast< OQueryTableConnectionData*>(rNewConn.GetData()->NewInstance()); + auto pNewData = std::static_pointer_cast<OQueryTableConnectionData>(rNewConn.GetData()->NewInstance()); pNewData->CopyFrom(*rNewConn.GetData()); - TTableConnectionData::value_type aData(pNewData); - VclPtrInstance<OQueryTableConnection> pNewConn(this, aData); + VclPtrInstance<OQueryTableConnection> pNewConn(this, pNewData); GetConnection(pNewConn); connectionModified(this,pNewConn,_bCreateUndoAction); |