summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-12 14:32:11 +0200
committerNoel Grandin <noel@peralex.com>2014-12-19 08:50:29 +0200
commit4cbba98601ae16cda1739e1e81d697592bb31213 (patch)
treee9dab946f962455656c76479ee63c6b41d139dc1 /oox
parenta3181adc11bc707680424551369a24b3c65de921 (diff)
remove operator>> and operator<< methods
in favour of ReadXXX/WriteXXX methods Change-Id: I849fd10c689fb9834ae9974e430dc337adc68755
Diffstat (limited to 'oox')
-rw-r--r--oox/source/crypto/AgileEngine.cxx3
-rw-r--r--oox/source/crypto/DocumentDecryption.cxx3
-rw-r--r--oox/source/crypto/Standard2007Engine.cxx9
-rw-r--r--oox/source/ole/olehelper.cxx2
4 files changed, 7 insertions, 10 deletions
diff --git a/oox/source/crypto/AgileEngine.cxx b/oox/source/crypto/AgileEngine.cxx
index 3ae847a9994a..d207cf533a7f 100644
--- a/oox/source/crypto/AgileEngine.cxx
+++ b/oox/source/crypto/AgileEngine.cxx
@@ -146,8 +146,7 @@ bool AgileEngine::decrypt(
BinaryXInputStream& aInputStream,
BinaryXOutputStream& aOutputStream)
{
- sal_uInt32 totalSize;
- aInputStream >> totalSize; // Document unencrypted size - 4 bytes
+ sal_uInt32 totalSize = aInputStream.readuInt32(); // Document unencrypted size - 4 bytes
aInputStream.skip( 4 ); // Reserved 4 Bytes
vector<sal_uInt8> keyDataSalt = mInfo.keyDataSalt;
diff --git a/oox/source/crypto/DocumentDecryption.cxx b/oox/source/crypto/DocumentDecryption.cxx
index fc93e0b46a31..5d5e6466d813 100644
--- a/oox/source/crypto/DocumentDecryption.cxx
+++ b/oox/source/crypto/DocumentDecryption.cxx
@@ -327,8 +327,7 @@ bool DocumentDecryption::readEncryptionInfo()
BinaryXInputStream aBinaryInputStream( xEncryptionInfo, true );
- sal_uInt32 aVersion;
- aBinaryInputStream >> aVersion;
+ sal_uInt32 aVersion = aBinaryInputStream.readuInt32();
switch (aVersion)
{
diff --git a/oox/source/crypto/Standard2007Engine.cxx b/oox/source/crypto/Standard2007Engine.cxx
index 311fea7f930e..bcaba3052aeb 100644
--- a/oox/source/crypto/Standard2007Engine.cxx
+++ b/oox/source/crypto/Standard2007Engine.cxx
@@ -182,9 +182,8 @@ bool Standard2007Engine::decrypt(
BinaryXInputStream& aInputStream,
BinaryXOutputStream& aOutputStream)
{
- sal_uInt32 totalSize;
- aInputStream >> totalSize; // Document unencrypted size - 4 bytes
- aInputStream.skip( 4 ); // Reserved 4 Bytes
+ aInputStream.skip(4); // Document unencrypted size - 4 bytes
+ aInputStream.skip(4); // Reserved 4 Bytes
vector<sal_uInt8> iv;
Decrypt aDecryptor(mKey, iv, Crypto::AES_128_ECB);
@@ -227,9 +226,9 @@ bool Standard2007Engine::writeEncryptionInfo(const OUString& password, BinaryXOu
sal_uInt32 encryptionHeaderSize = static_cast<sal_uInt32>(sizeof(EncryptionStandardHeader));
- rStream << mInfo.header.flags;
+ rStream.WriteUInt32( mInfo.header.flags );
sal_uInt32 headerSize = encryptionHeaderSize + cspNameSize;
- rStream << headerSize;
+ rStream.WriteUInt32( headerSize );
rStream.writeMemory(&mInfo.header, encryptionHeaderSize);
rStream.writeUnicodeArray(lclCspName);
diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx
index a87f290cc94e..66d8554a21e3 100644
--- a/oox/source/ole/olehelper.cxx
+++ b/oox/source/ole/olehelper.cxx
@@ -426,7 +426,7 @@ void OleFormCtrlExportHelper::exportName( const Reference< XOutputStream >& rxOu
{
oox::BinaryXOutputStream aOut( rxOut, false );
aOut.writeUnicodeArray( maName );
- aOut << sal_Int32(0);
+ aOut.WriteInt32(0);
}
void OleFormCtrlExportHelper::exportCompObj( const Reference< XOutputStream >& rxOut )