summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2023-12-30 15:16:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-12-30 19:05:49 +0100
commitd2fd70c655b45f1d4ea570fa0455231d5d059709 (patch)
tree9d18eff454849d13a6c77006423e8a6ebcaeaa4e /xmlsecurity
parentec29db74bf5ffba086f5ced6053814d548616f7d (diff)
no need to use SvLockBytes in UriBindingHelper
we already have other, simpler facilities for wrapping streams Change-Id: Icff4cca2d6327dad9c5964ca61d578506009d047 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161445 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/helper/UriBindingHelper.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/xmlsecurity/source/helper/UriBindingHelper.cxx b/xmlsecurity/source/helper/UriBindingHelper.cxx
index f6c36d2c8b36..600f560860a4 100644
--- a/xmlsecurity/source/helper/UriBindingHelper.cxx
+++ b/xmlsecurity/source/helper/UriBindingHelper.cxx
@@ -21,6 +21,7 @@
#include <tools/solar.h>
#include <unotools/streamhelper.hxx>
+#include <unotools/streamwrap.hxx>
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
@@ -54,10 +55,8 @@ uno::Reference< io::XInputStream > SAL_CALL UriBindingHelper::getUriBinding( con
}
else
{
- SvFileStream* pStream = new SvFileStream( uri, StreamMode::READ );
- sal_uInt64 nBytes = pStream->TellEnd();
- SvLockBytesRef xLockBytes = new SvLockBytes( pStream, true );
- xInputStream = new utl::OInputStreamHelper( xLockBytes, nBytes );
+ std::unique_ptr<SvFileStream> pStream(new SvFileStream( uri, StreamMode::READ ));
+ xInputStream = new utl::OInputStreamWrapper( std::move(pStream) );
}
return xInputStream;
}