diff options
author | Mikhail Voytenko <mav@openoffice.org> | 2010-06-07 09:15:54 +0200 |
---|---|---|
committer | Mikhail Voytenko <mav@openoffice.org> | 2010-06-07 09:15:54 +0200 |
commit | 494270ff91d1617cb69262b409d56a591a1e7c07 (patch) | |
tree | 3b0488f72f26fbc65f98ab049ca123fc30f39e21 /comphelper/source | |
parent | 15f4e8c6b2110c4a39eb6ecb89b9a077354036e2 (diff) |
tl78: #i10000# fix warnings
Diffstat (limited to 'comphelper/source')
-rw-r--r-- | comphelper/source/misc/docpasswordhelper.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx index 858d1ff19bca..fc41eaec3194 100644 --- a/comphelper/source/misc/docpasswordhelper.cxx +++ b/comphelper/source/misc/docpasswordhelper.cxx @@ -120,7 +120,7 @@ sal_uInt32 DocPasswordHelper::GetWordHashAsUINT32( nLowResult = ( ( ( nLowResult >> 14 ) & 0x0001 ) | ( ( nLowResult << 1 ) & 0x7FFF ) ) ^ nChar; } - nLowResult = ( ( ( nLowResult >> 14 ) & 0x001 ) | ( ( nLowResult << 1 ) & 0x7FF ) ) ^ nLen ^ 0xCE4B; + nLowResult = (sal_uInt16)( ( ( ( nLowResult >> 14 ) & 0x001 ) | ( ( nLowResult << 1 ) & 0x7FF ) ) ^ nLen ^ 0xCE4B ); nResult = ( nHighResult << 16 ) | nLowResult; } @@ -135,8 +135,8 @@ Sequence< sal_Int8 > DocPasswordHelper::GetWordHashAsSequence( sal_uInt32 nHash = GetWordHashAsUINT32( aUString ); Sequence< sal_Int8 > aResult( 4 ); aResult[0] = ( nHash >> 24 ); - aResult[1] = ( nHash & 0xFF0000 ); - aResult[2] = ( nHash & 0xFF00 ); + aResult[1] = ( ( nHash >> 16 ) & 0xFF ); + aResult[2] = ( ( nHash >> 8 ) & 0xFF ); aResult[3] = ( nHash & 0xFF ); return aResult; |