diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-10 13:23:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-11 07:57:56 +0100 |
commit | 14cb12bde07b8becf69b648ecc6642bdccf8a7cd (patch) | |
tree | e616a44bdeb412b518e8f4fcee20f9aaeb8574e9 /xmlhelp/source/cxxhelp/provider/urlparameter.cxx | |
parent | 5128bf29d5febceaec51854595f23ae487a0cdec (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/urlparameter.cxx')
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/urlparameter.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx index bb1a12bc8243..a4f6d8f89aec 100644 --- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx +++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx @@ -25,6 +25,7 @@ #include <cppuhelper/queryinterface.hxx> #include <comphelper/processfactory.hxx> #include <rtl/uri.hxx> +#include <rtl/ref.hxx> #include <rtl/character.hxx> #include <libxslt/transform.h> #include <libxslt/xsltutils.h> @@ -332,7 +333,7 @@ void URLParameter::open( const Reference< XOutputStream >& xDataSink ) return; // a standard document or else an active help text, plug in the new input stream - std::unique_ptr<InputStreamTransformer> p(new InputStreamTransformer( this,m_pDatabases,isRoot() )); + rtl::Reference<InputStreamTransformer> p(new InputStreamTransformer( this,m_pDatabases,isRoot() )); try { xDataSink->writeBytes( Sequence< sal_Int8 >( reinterpret_cast<const sal_Int8*>(p->getData().getStr()), p->getData().getLength() ) ); @@ -340,7 +341,7 @@ void URLParameter::open( const Reference< XOutputStream >& xDataSink ) catch( const Exception& ) { } - p.reset(); + p.clear(); xDataSink->closeOutput(); } |