diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-22 10:48:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-22 13:37:53 +0100 |
commit | dffe94959ada5297c7c719497395f5dfe66c4d2f (patch) | |
tree | 31df661be83710232caef059baae0ab745449056 /connectivity/source/drivers/calc/CConnection.cxx | |
parent | 2a8e84448ce2a5603f9134ee830c389dbc4fd6b6 (diff) |
loplugin:refcounting in connectivity
Change-Id: Iff2f096e7ee00d9cb29d47462dd7e1963c6b06e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111302
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/drivers/calc/CConnection.cxx')
-rw-r--r-- | connectivity/source/drivers/calc/CConnection.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/connectivity/source/drivers/calc/CConnection.cxx b/connectivity/source/drivers/calc/CConnection.cxx index 9b03d473bda1..78bbf7835169 100644 --- a/connectivity/source/drivers/calc/CConnection.cxx +++ b/connectivity/source/drivers/calc/CConnection.cxx @@ -221,8 +221,7 @@ css::uno::Reference< XTablesSupplier > OCalcConnection::createCatalog() Reference< XTablesSupplier > xTab = m_xCatalog; if(!xTab.is()) { - OCalcCatalog *pCat = new OCalcCatalog(this); - xTab = pCat; + xTab = new OCalcCatalog(this); m_xCatalog = xTab; } return xTab; @@ -247,8 +246,7 @@ Reference< XPreparedStatement > SAL_CALL OCalcConnection::prepareStatement( cons checkDisposed(OConnection_BASE::rBHelper.bDisposed); - auto pStmt = new connectivity::component::OComponentPreparedStatement(this); - Reference< XPreparedStatement > xHoldAlive = pStmt; + rtl::Reference<connectivity::component::OComponentPreparedStatement> pStmt = new connectivity::component::OComponentPreparedStatement(this); pStmt->construct(sql); m_aStatements.push_back(WeakReferenceHelper(*pStmt)); return pStmt; |