summaryrefslogtreecommitdiff
path: root/include/vcl/BinaryDataContainer.hxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2023-04-01 12:40:58 +0100
committerMichael Meeks <michael.meeks@collabora.com>2023-04-03 10:30:10 +0200
commit0bd949f4412249e5ecd63716efcc55d92d120da9 (patch)
tree1c4600acf34ddbc9f68fd47fcb8df0eefe2b15cc /include/vcl/BinaryDataContainer.hxx
parent56ae7d01505fdae421109cfc78449230ba589d79 (diff)
BinaryDataContainer: pure re-factor to encapsulate stream copying.
Change-Id: Iab24e8d18bf7badbca672fbdbf455f78d08f41a0 Signed-off-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149905 Tested-by: Jenkins
Diffstat (limited to 'include/vcl/BinaryDataContainer.hxx')
-rw-r--r--include/vcl/BinaryDataContainer.hxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/vcl/BinaryDataContainer.hxx b/include/vcl/BinaryDataContainer.hxx
index e6e13cd340d8..0d5be69f512c 100644
--- a/include/vcl/BinaryDataContainer.hxx
+++ b/include/vcl/BinaryDataContainer.hxx
@@ -41,16 +41,17 @@ public:
BinaryDataContainer& operator=(BinaryDataContainer&& rBinaryDataContainer) noexcept = default;
- size_t getSize() const { return mpData ? mpData->size() : 0; }
- bool isEmpty() const { return !mpData || mpData->empty(); }
- const sal_uInt8* getData() const { return mpData ? mpData->data() : nullptr; }
+ size_t getSize() const;
+ bool isEmpty() const;
+ const sal_uInt8* getData() const;
+
// Returns the data as a stream open for reading
SvMemoryStream getMemoryStream();
+ std::size_t writeToStream(SvStream& rStream) const;
size_t calculateHash() const;
auto cbegin() const { return mpData->cbegin(); }
-
auto cend() const { return mpData->cend(); }
};