diff options
author | Noel Grandin <noel@peralex.com> | 2014-12-12 10:45:32 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-12-12 10:46:23 +0200 |
commit | aa2f02a4dc8a05f49e679a26f2beebb9d66b2325 (patch) | |
tree | bed0e3b1b000fceaf09552bc703d19a236de7bbc /include/oox/ole | |
parent | df46ec0580b625efe8bd747bed54bc4d4d71f073 (diff) |
remove operator>> and operator<< methods
in favour of ReadXXX/WriteXXX methods
Change-Id: I69eebee3a8ce5b40301db7940a1d85915c0bf6f4
Diffstat (limited to 'include/oox/ole')
-rw-r--r-- | include/oox/ole/axbinaryreader.hxx | 4 | ||||
-rw-r--r-- | include/oox/ole/axbinarywriter.hxx | 5 |
2 files changed, 9 insertions, 0 deletions
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<Type>(); 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 ); } |