summaryrefslogtreecommitdiff
path: root/xmlhelp/source/cxxhelp/provider/databases.cxx
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-02-10 13:23:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-02-11 07:57:56 +0100
commit14cb12bde07b8becf69b648ecc6642bdccf8a7cd (patch)
treee616a44bdeb412b518e8f4fcee20f9aaeb8574e9 /xmlhelp/source/cxxhelp/provider/databases.cxx
parent5128bf29d5febceaec51854595f23ae487a0cdec (diff)
loplugin:refcounting generalise type checking
Change-Id: Ia013878ac9c2918d8eaf9aab16b291d8211e708f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110700 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlhelp/source/cxxhelp/provider/databases.cxx')
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 583de4123e88..1f1a2868c477 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -24,6 +24,7 @@
#include <rtl/character.hxx>
#include <rtl/uri.hxx>
#include <rtl/ustrbuf.hxx>
+#include <rtl/ref.hxx>
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/awt/Toolkit.hpp>
#include <com/sun/star/i18n/Collator.hpp>
@@ -802,15 +803,14 @@ Reference< XHierarchicalNameAccess > Databases::jarFile( const OUString& jar,
Sequence< Any > aArguments( 2 );
- std::unique_ptr<XInputStream_impl> p(new XInputStream_impl( zipFile ));
+ rtl::Reference<XInputStream_impl> p(new XInputStream_impl( zipFile ));
if( p->CtorSuccess() )
{
- Reference< XInputStream > xInputStream( p.release() );
- aArguments[ 0 ] <<= xInputStream;
+ aArguments[ 0 ] <<= Reference< XInputStream >( p.get() );
}
else
{
- p.reset();
+ p.clear();
aArguments[ 0 ] <<= zipFile;
}