summaryrefslogtreecommitdiff
path: root/include/vcl/BinaryDataContainer.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-05-18 11:48:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-05-18 15:15:21 +0200
commit5a4d78d9a9b45c7fa387b66f5e310447ec813034 (patch)
tree82e64c853460ae0eb54fd65adb62761e9771d5b6 /include/vcl/BinaryDataContainer.hxx
parent800f9233513a45aa8f8950cf929fd44cb9381d72 (diff)
tdf#63130 reduce large memory copies when reading from BinaryDataContainer
rather than writing a bunch more code, extract the common part from comphelper::SequenceInputStream into a new base class Change-Id: I0d3561e3ca2e748b904128e3b5955e27196d7170 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151943 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/vcl/BinaryDataContainer.hxx')
-rw-r--r--include/vcl/BinaryDataContainer.hxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/vcl/BinaryDataContainer.hxx b/include/vcl/BinaryDataContainer.hxx
index f6f07f0c5ef6..72bd852281ce 100644
--- a/include/vcl/BinaryDataContainer.hxx
+++ b/include/vcl/BinaryDataContainer.hxx
@@ -13,6 +13,7 @@
#include <sal/config.h>
#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/io/XInputStream.hpp>
#include <unotools/tempfile.hxx>
#include <tools/stream.hxx>
#include <vcl/dllapi.h>
@@ -53,6 +54,9 @@ public:
// Returns the data as a readonly stream open for reading
std::shared_ptr<SvStream> getAsStream();
+ // Returns the data as a readonly stream open for reading
+ css::uno::Reference<css::io::XInputStream> getAsXInputStream();
+
/// writes the contents to the given stream
std::size_t writeToStream(SvStream& rStream) const;