diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-15 13:03:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-19 09:29:14 +0200 |
commit | d1dc27fef899ff6cd70873cd945d5312a53e1b3a (patch) | |
tree | 53e4975c8b7af4d493d797d798d42f26fb241c80 /unotools/source/streaming/streamhelper.cxx | |
parent | 2589f8a155d00b22078607ddd0229d155a394f3a (diff) |
add utl::ByteReader pure class
which lets us skip the inefficiency of needing an extra buffer when
reading via XInputStream
Change-Id: Ic5334b7d11ea6a57bc1800f508fc69611a053af1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134348
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools/source/streaming/streamhelper.cxx')
-rw-r--r-- | unotools/source/streaming/streamhelper.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/unotools/source/streaming/streamhelper.cxx b/unotools/source/streaming/streamhelper.cxx index b5f07e6a6a7f..39585ec5f369 100644 --- a/unotools/source/streaming/streamhelper.cxx +++ b/unotools/source/streaming/streamhelper.cxx @@ -22,8 +22,10 @@ #include <com/sun/star/io/BufferSizeExceededException.hpp> #include <com/sun/star/io/IOException.hpp> #include <com/sun/star/io/NotConnectedException.hpp> +#include <comphelper/servicehelper.hxx> #include <o3tl/safeint.hxx> #include <unotools/streamhelper.hxx> +#include <unotools/bytereader.hxx> namespace utl { @@ -118,6 +120,14 @@ void SAL_CALL OInputStreamHelper::acquire() SAL_NOEXCEPT cppu::WeakImplHelper<css::io::XInputStream, css::io::XSeekable>::acquire(); } +ByteReader::~ByteReader() {} + +const css::uno::Sequence< sal_Int8 > & ByteReader::getUnoTunnelId() +{ + static const comphelper::UnoIdInit implId; + return implId.getSeq(); +} + } // namespace utl /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |