From aa2f02a4dc8a05f49e679a26f2beebb9d66b2325 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 12 Dec 2014 10:45:32 +0200 Subject: remove operator>> and operator<< methods in favour of ReadXXX/WriteXXX methods Change-Id: I69eebee3a8ce5b40301db7940a1d85915c0bf6f4 --- include/oox/ole/axbinaryreader.hxx | 4 ++++ include/oox/ole/axbinarywriter.hxx | 5 +++++ 2 files changed, 9 insertions(+) (limited to 'include/oox/ole') diff --git a/include/oox/ole/axbinaryreader.hxx b/include/oox/ole/axbinaryreader.hxx index 7905e987a941..116d809a25f4 100644 --- a/include/oox/ole/axbinaryreader.hxx +++ b/include/oox/ole/axbinaryreader.hxx @@ -68,6 +68,10 @@ public: position of the wrapped stream at construction time). */ void align( size_t nSize ); + /** Stream operator for all data types supported by the readValue() function. */ + template< typename Type > + AxAlignedInputStream& operator>>( Type& ornValue ) { ornValue = readValue(); return *this; } + /** Aligns the stream according to the passed type and reads a value. */ template< typename Type > Type readAligned() { align( sizeof( Type ) ); return readValue< Type >(); } diff --git a/include/oox/ole/axbinarywriter.hxx b/include/oox/ole/axbinarywriter.hxx index 62029bb2f8ac..05d6c60bc7b9 100644 --- a/include/oox/ole/axbinarywriter.hxx +++ b/include/oox/ole/axbinarywriter.hxx @@ -55,6 +55,11 @@ public: void align( size_t nSize ); void pad( sal_Int32 nBytes, size_t nAtomSize = 1); + + /** Stream operator for all data types supported by the writeValue() function. */ + template< typename Type > + AxAlignedOutputStream& operator<<( Type nValue ) { writeValue( nValue ); return *this; } + /** Aligns the stream according to the passed type and reads a value. */ template< typename Type > void writeAligned( Type nVal ) { align( sizeof( Type ) ); writeValue( nVal ); } -- cgit