From 4d3ad2640332d811d50055df81243fdd813edfc8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 17 Jan 2017 13:00:17 +0200 Subject: manage SvRefBase subclass with tools::SvRef Change-Id: Ieb164a8113c7033e72feece8421dd4ef68961f7a --- sot/source/sdstor/ucbstorage.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sot') diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index 11179f31d118..162b57ccd111 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -2449,7 +2449,7 @@ bool UCBStorage::CopyStorageElement_Impl( UCBStorageElement_Impl& rElement, Base { // copy the streams data // the destination stream must not be open - std::unique_ptr pOtherStream(pDest->OpenStream( rNew, StreamMode::WRITE | StreamMode::SHARE_DENYALL, pImp->m_bDirect )); + tools::SvRef pOtherStream(pDest->OpenStream( rNew, StreamMode::WRITE | StreamMode::SHARE_DENYALL, pImp->m_bDirect )); BaseStorageStream* pStream = nullptr; bool bDeleteStream = false; @@ -2484,7 +2484,7 @@ bool UCBStorage::CopyStorageElement_Impl( UCBStorageElement_Impl& rElement, Base pStorage = rElement.m_xStorage->m_pAntiImpl; if ( !pStorage ) { - pStorage = ( const_cast < UCBStorage* > (this) )->OpenStorage( rElement.m_aName, pImp->m_nMode, pImp->m_bDirect ); + pStorage = const_cast(this)->OpenStorage( rElement.m_aName, pImp->m_nMode, pImp->m_bDirect ); bDeleteStorage = true; } @@ -2492,7 +2492,7 @@ bool UCBStorage::CopyStorageElement_Impl( UCBStorageElement_Impl& rElement, Base UCBStorage* pUCBCopy = dynamic_cast( pStorage ); bool bOpenUCBStorage = pUCBDest && pUCBCopy; - std::unique_ptr pOtherStorage(bOpenUCBStorage ? + tools::SvRef pOtherStorage(bOpenUCBStorage ? pDest->OpenUCBStorage( rNew, StreamMode::WRITE | StreamMode::SHARE_DENYALL, pImp->m_bDirect ) : pDest->OpenOLEStorage( rNew, StreamMode::WRITE | StreamMode::SHARE_DENYALL, pImp->m_bDirect )); -- cgit