xmlsecurity/source/helper/UriBindingHelper.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
New commits: commit d2fd70c655b45f1d4ea570fa0455231d5d059709 Author: Noel Grandin <[email protected]> AuthorDate: Sat Dec 30 15:16:26 2023 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Sat Dec 30 19:05:49 2023 +0100 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 <[email protected]> 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; }
