diff options
Diffstat (limited to 'xmlhelp')
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/databases.cxx | 8 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/urlparameter.cxx | 5 |
2 files changed, 7 insertions, 6 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; } 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(); } |