summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
Diffstat (limited to 'sax')
-rw-r--r--sax/qa/cppunit/xmlimport.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx
index f7ea3ec92c19..b22f9d268e8a 100644
--- a/sax/qa/cppunit/xmlimport.cxx
+++ b/sax/qa/cppunit/xmlimport.cxx
@@ -65,10 +65,10 @@ Reference< XInputStream > createStreamFromFile (
Reference< XInputStream > xInputStream;
OUString aInStr;
FileBase::getFileURLFromSystemPath(filePath, aInStr);
- SvStream* pStream = utl::UcbStreamHelper::CreateStream(aInStr, StreamMode::READ);
+ std::unique_ptr<SvStream> pStream = utl::UcbStreamHelper::CreateStream(aInStr, StreamMode::READ);
if(pStream == nullptr)
CPPUNIT_ASSERT(false);
- Reference< XStream > xStream(new utl::OStreamWrapper(*pStream));
+ Reference< XStream > xStream(new utl::OStreamWrapper(std::move(pStream)));
xInputStream.set(xStream, UNO_QUERY);
return xInputStream;
}