diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-08-17 13:19:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-08-27 09:10:04 +0200 |
commit | a6ad198d097fb4a503c8d5831d484ff46721134b (patch) | |
tree | e82ca01e800c5f50ce8db7bd8eb610790ee13c8d /package/source/zippackage/wrapstreamforshare.hxx | |
parent | 03b31a8ad48e3b8a9e54203ff3856702557757b5 (diff) |
tdf#158556 use more comphelper::ByteReader
which avoids a ton of temporary uno::Sequence being created
Change-Id: I237bb69395f692bb0272ca0daec05b81af828e01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171968
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'package/source/zippackage/wrapstreamforshare.hxx')
-rw-r--r-- | package/source/zippackage/wrapstreamforshare.hxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/package/source/zippackage/wrapstreamforshare.hxx b/package/source/zippackage/wrapstreamforshare.hxx index ac8de258842f..adc57862d4ea 100644 --- a/package/source/zippackage/wrapstreamforshare.hxx +++ b/package/source/zippackage/wrapstreamforshare.hxx @@ -22,15 +22,18 @@ #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/io/XSeekable.hpp> +#include <comphelper/bytereader.hxx> #include <comphelper/refcountedmutex.hxx> #include <cppuhelper/implbase.hxx> #include <rtl/ref.hxx> class WrapStreamForShare final : public cppu::WeakImplHelper < css::io::XInputStream - , css::io::XSeekable > + , css::io::XSeekable >, + public comphelper::ByteReader { rtl::Reference< comphelper::RefCountedMutex > m_xMutex; css::uno::Reference < css::io::XInputStream > m_xInStream; + comphelper::ByteReader* mpByteReader; css::uno::Reference < css::io::XSeekable > m_xSeekable; sal_Int64 m_nCurPos; @@ -52,6 +55,8 @@ public: virtual sal_Int64 SAL_CALL getPosition() override; virtual sal_Int64 SAL_CALL getLength() override; + // comphelper::ByteReader + virtual sal_Int32 readSomeBytes(sal_Int8* aData, sal_Int32 nBytesToRead) override; }; #endif |