summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/calc/CDriver.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/calc/CDriver.cxx')
-rw-r--r--connectivity/source/drivers/calc/CDriver.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/connectivity/source/drivers/calc/CDriver.cxx b/connectivity/source/drivers/calc/CDriver.cxx
index 324094ac04df..b7b11cc29176 100644
--- a/connectivity/source/drivers/calc/CDriver.cxx
+++ b/connectivity/source/drivers/calc/CDriver.cxx
@@ -68,12 +68,11 @@ Reference< XConnection > SAL_CALL ODriver::connect( const OUString& url,
if ( ! acceptsURL(url) )
return nullptr;
- OCalcConnection* pCon = new OCalcConnection(this);
+ rtl::Reference<OCalcConnection> pCon = new OCalcConnection(this);
pCon->construct(url,info);
- Reference< XConnection > xCon = pCon;
m_xConnections.push_back(WeakReferenceHelper(*pCon));
- return xCon;
+ return pCon;
}
sal_Bool SAL_CALL ODriver::acceptsURL( const OUString& url )