This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 42c0a318a970f6f7f43d26a8397448d5d5b8bd36
Author: Damjan Jovanovic <dam...@apache.org>
AuthorDate: Sun Mar 17 09:41:22 2024 +0200

    getFlag() isn't happy on Visual Studio 2008, hack it to work.
    
    Patch by: me
---
 main/oox/source/core/encryption.cxx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/main/oox/source/core/encryption.cxx 
b/main/oox/source/core/encryption.cxx
index a94cd095fc..2bdfa8e794 100644
--- a/main/oox/source/core/encryption.cxx
+++ b/main/oox/source/core/encryption.cxx
@@ -97,7 +97,7 @@ StandardEncryptionInfo::StandardEncryptionInfo( 
BinaryInputStream& rStrm ) throw
 {
     char msg[ 1024 ];
     rStrm >> mnFlags;
-    if( getFlag( mnFlags, ENCRYPTINFO_EXTERNAL ) )
+    if( getFlag( mnFlags, (sal_uInt32) ENCRYPTINFO_EXTERNAL ) )
         throw Exception( OUString::createFromAscii( 
"EncryptionInfo::readEncryptionInfo() error: \"Extensible encryption\" is not 
currently supported, please report" ), Reference< XInterface >() );
 
     sal_uInt32 nHeaderSize, nRepeatedFlags;
@@ -130,8 +130,8 @@ StandardEncryptionInfo::StandardEncryptionInfo( 
BinaryInputStream& rStrm ) throw
 
 bool StandardEncryptionInfo::isImplemented()
 {
-    return getFlag( mnFlags, ENCRYPTINFO_CRYPTOAPI ) &&
-        getFlag( mnFlags, ENCRYPTINFO_AES ) &&
+    return getFlag( mnFlags, (sal_uInt32) ENCRYPTINFO_CRYPTOAPI ) &&
+        getFlag( mnFlags, (sal_uInt32) ENCRYPTINFO_AES ) &&
         // algorithm ID 0 defaults to AES128 too, if ENCRYPTINFO_AES flag is 
set
        ( ( mnAlgorithmId == 0 ) || ( mnAlgorithmId == ENCRYPT_ALGO_AES128 ) ) 
&&
        // hash algorithm ID 0 defaults to SHA-1 too

Reply via email to