summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-09-25 07:40:55 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-09-25 09:03:44 +0200
commitc01c3467f159775c9fa5f1bb2408ec3120dc151e (patch)
tree9e78a20826e8a13280d40e1db8df9bdcca0bb83f /ucb
parentb1dd4244b60948a6dd84872799e508effa164cba (diff)
Better use rtl::Reference to hold ref-counted UNO objects
Change-Id: I515ddde31730c95fdeee9f9a64a35605c2d01c2c Reviewed-on: https://gerrit.libreoffice.org/79483 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/file/filtask.cxx19
1 files changed, 10 insertions, 9 deletions
diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx
index b9a83a186dff..3e3afd149c5a 100644
--- a/ucb/source/ucp/file/filtask.cxx
+++ b/ucb/source/ucp/file/filtask.cxx
@@ -43,6 +43,7 @@
#include <com/sun/star/ucb/OpenCommandArgument.hpp>
#include <com/sun/star/ucb/Store.hpp>
#include <comphelper/propertysequence.hxx>
+#include <rtl/ref.hxx>
#include <rtl/uri.hxx>
#include "filtask.hxx"
@@ -716,7 +717,7 @@ TaskManager::open( sal_Int32 CommandId,
const OUString& aUnqPath,
bool bLock )
{
- std::unique_ptr<XInputStream_impl> pInputStream(new XInputStream_impl( aUnqPath, bLock )); // from filinpstr.hxx
+ rtl::Reference<XInputStream_impl> pInputStream(new XInputStream_impl( aUnqPath, bLock )); // from filinpstr.hxx
sal_Int32 ErrorCode = pInputStream->CtorSuccess();
@@ -726,10 +727,10 @@ TaskManager::open( sal_Int32 CommandId,
ErrorCode,
pInputStream->getMinorError() );
- pInputStream.reset();
+ pInputStream.clear();
}
- return uno::Reference< io::XInputStream >( pInputStream.release() );
+ return uno::Reference< io::XInputStream >( pInputStream.get() );
}
@@ -748,7 +749,7 @@ TaskManager::open_rw( sal_Int32 CommandId,
const OUString& aUnqPath,
bool bLock )
{
- std::unique_ptr<XStream_impl> pStream(new XStream_impl( aUnqPath, bLock )); // from filstr.hxx
+ rtl::Reference<XStream_impl> pStream(new XStream_impl( aUnqPath, bLock )); // from filstr.hxx
sal_Int32 ErrorCode = pStream->CtorSuccess();
@@ -758,9 +759,9 @@ TaskManager::open_rw( sal_Int32 CommandId,
ErrorCode,
pStream->getMinorError() );
- pStream.reset();
+ pStream.clear();
}
- return uno::Reference< io::XStream >( pStream.release() );
+ return uno::Reference< io::XStream >( pStream.get() );
}
@@ -781,7 +782,7 @@ TaskManager::ls( sal_Int32 CommandId,
const uno::Sequence< beans::Property >& seq,
const uno::Sequence< NumberedSortingInfo >& seqSort )
{
- std::unique_ptr<XResultSet_impl> p(new XResultSet_impl( this,aUnqPath,OpenMode,seq,seqSort ));
+ rtl::Reference<XResultSet_impl> p(new XResultSet_impl( this,aUnqPath,OpenMode,seq,seqSort ));
sal_Int32 ErrorCode = p->CtorSuccess();
@@ -791,10 +792,10 @@ TaskManager::ls( sal_Int32 CommandId,
ErrorCode,
p->getMinorError() );
- p.reset();
+ p.clear();
}
- return uno::Reference< XDynamicResultSet > ( p.release() );
+ return uno::Reference< XDynamicResultSet > ( p.get() );
}