summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/calc/CConnection.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/calc/CConnection.cxx')
-rw-r--r--connectivity/source/drivers/calc/CConnection.cxx6
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;