diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-18 15:50:25 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-19 09:31:43 +0200 |
commit | ba91bc19023f3d7158ef9e394665eb5eb89c4037 (patch) | |
tree | 4fdacef635894c2fe0c5a3e16b04b07353654770 /include | |
parent | f320d1edeb2c95a21479baaf6ef77344f8df62e4 (diff) |
fix SequenceOutputStream constness
Change-Id: I6e1039c077602b2cb42702cb4131f9503ef533c2
Diffstat (limited to 'include')
-rw-r--r-- | include/oox/core/filterbase.hxx | 2 | ||||
-rw-r--r-- | include/oox/helper/binaryoutputstream.hxx | 17 |
2 files changed, 16 insertions, 3 deletions
diff --git a/include/oox/core/filterbase.hxx b/include/oox/core/filterbase.hxx index dcbebc122309..3accd63f2872 100644 --- a/include/oox/core/filterbase.hxx +++ b/include/oox/core/filterbase.hxx @@ -196,7 +196,7 @@ public: /** Imports the raw binary data from the specified stream. @return True, if the data could be imported from the stream. */ - bool importBinaryData( StreamDataSequence const & orDataSeq, const OUString& rStreamName ); + bool importBinaryData( StreamDataSequence & orDataSeq, const OUString& rStreamName ); // com.sun.star.lang.XServiceInfo interface ------------------------------- diff --git a/include/oox/helper/binaryoutputstream.hxx b/include/oox/helper/binaryoutputstream.hxx index 2b954a66f49a..21f563227fd8 100644 --- a/include/oox/helper/binaryoutputstream.hxx +++ b/include/oox/helper/binaryoutputstream.hxx @@ -175,7 +175,7 @@ private: construction, the stream points to the beginning of the passed data sequence. The data sequence is expanded automatically while writing to it. */ -class OOX_DLLPUBLIC SequenceOutputStream : public SequenceSeekableStream, public BinaryOutputStream +class OOX_DLLPUBLIC SequenceOutputStream : public BinaryOutputStream { public: /** Constructs the wrapper object for the passed data sequence. @@ -185,13 +185,26 @@ public: wrapper. The data sequence MUST NOT be changed from outside as long as this stream wrapper is used to write to it. */ - explicit SequenceOutputStream( StreamDataSequence const & rData ); + explicit SequenceOutputStream( StreamDataSequence & rData ); /** Writes the passed data sequence. */ virtual void writeData( const StreamDataSequence& rData, size_t nAtomSize = 1 ) override; /** Write nBytes bytes from the (preallocated!) buffer pMem. */ virtual void writeMemory( const void* pMem, sal_Int32 nBytes, size_t nAtomSize = 1 ) override; + + /** Returns the size of the wrapped data sequence. */ + virtual sal_Int64 size() const override; + /** Returns the current stream position. */ + virtual sal_Int64 tell() const override; + /** Seeks the stream to the passed position. */ + virtual void seek( sal_Int64 nPos ) override; + /** Releases the reference to the data sequence. */ + virtual void close() override; + +private: + StreamDataSequence* mpData; ///< Wrapped data sequence. + sal_Int32 mnPos; ///< Current position in the sequence. }; |