diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx index 8209a86bb8d4..fd8e221986f0 100644 --- a/sc/source/filter/excel/excimp8.cxx +++ b/sc/source/filter/excel/excimp8.cxx @@ -371,7 +371,7 @@ void ImportExcel8::Feat( void ) aProt.mnAreserved = aIn.ReaduInt32(); aProt.mnPasswordVerifier = aIn.ReaduInt32(); aProt.maTitle = aIn.ReadUniString(); - if ((aProt.mnAreserved & 0x80000000) == 0x80000000) + if ((aProt.mnAreserved & 0x00000001) == 0x00000001) { sal_uInt32 nCbSD = aIn.ReaduInt32(); // TODO: could here be some sanity check applied to not allocate 4GB? diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index d6c39cead5f0..285fc62b83a0 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -1492,7 +1492,7 @@ void XclExpSheetEnhancedProtection::WriteBody( XclExpStream& rStrm ) rStrm << maEnhancedProtection.mnAreserved; // 1 bit A and 31 bits reserved rStrm << maEnhancedProtection.mnPasswordVerifier; // wPassword rStrm << XclExpString( maEnhancedProtection.maTitle); // stTitle - bool bSDContainer = ((maEnhancedProtection.mnAreserved & 0x80000000) == 0x80000000); + bool bSDContainer = ((maEnhancedProtection.mnAreserved & 0x00000001) == 0x00000001); sal_uInt32 nCbSD = maEnhancedProtection.maSecurityDescriptor.size(); SAL_WARN_IF( bSDContainer && nCbSD < 20, "sc.filter", "XclExpSheetEnhancedProtection A flag indicates container but cbSD < 20");