summaryrefslogtreecommitdiff
path: root/package/source/xstor/owriteablestream.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-19 13:46:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-19 21:04:48 +0200
commit62531ec1091c7b3f6a3577889a18234790ec716d (patch)
tree72766dd4a58bbf61e2a56adc870d1a73307a9043 /package/source/xstor/owriteablestream.hxx
parent5eb25f6a7ecb215f7bc81116cd930c1dec645e8d (diff)
add ByteWriter to reduce memory copying when writing data
similarly to ByteReader move both of them down to comphelper, since we want to use it from comphelper, and comphelper is "below" unotools in the module dependency graph Change-Id: Ic98fa2268e125fd8e4378fb899ad5f97de721713 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134645 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'package/source/xstor/owriteablestream.hxx')
-rw-r--r--package/source/xstor/owriteablestream.hxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/package/source/xstor/owriteablestream.hxx b/package/source/xstor/owriteablestream.hxx
index 5e87aa3e3047..6c2b657e3160 100644
--- a/package/source/xstor/owriteablestream.hxx
+++ b/package/source/xstor/owriteablestream.hxx
@@ -28,6 +28,7 @@
#include <com/sun/star/packages/XDataSinkEncrSupport.hpp>
#include <com/sun/star/lang/XEventListener.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/embed/XEncryptionProtectedSource2.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/embed/XRelationshipAccess.hpp>
@@ -39,6 +40,7 @@
#include <cppuhelper/weak.hxx>
+#include <comphelper/bytereader.hxx>
#include <comphelper/refcountedmutex.hxx>
#include <comphelper/sequenceashashmap.hxx>
@@ -229,7 +231,9 @@ class OWriteStream : public css::lang::XTypeProvider
, public css::embed::XTransactedObject
, public css::embed::XTransactionBroadcaster
, public css::beans::XPropertySet
+ , public css::lang::XUnoTunnel
, public ::cppu::OWeakObject
+ , public comphelper::ByteWriter
{
friend struct OWriteStream_Impl;
@@ -342,6 +346,12 @@ public:
virtual void SAL_CALL removeTransactionListener(
const css::uno::Reference< css::embed::XTransactionListener >& aListener ) override;
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
+
+ // comphelper::ByteWriter
+ virtual sal_Int32 writeSomeBytes(const sal_Int8* aData, sal_Int32 nBytesToWrite) override;
+
};
#endif