bit 0 is bit 0

They say they use big-endian bit diagrams, but just to confuse you.

Change-Id: I7fd6bb58c721f1dca2f6ecbaae90d516746762f0
This commit is contained in:
Eike Rathke
2014-04-08 11:34:49 +02:00
parent a65e9fd24d
commit 5bce64e475
2 changed files with 2 additions and 2 deletions

View File

@@ -371,7 +371,7 @@ void ImportExcel8::Feat( void )
aProt.mnAreserved = aIn.ReaduInt32(); aProt.mnAreserved = aIn.ReaduInt32();
aProt.mnPasswordVerifier = aIn.ReaduInt32(); aProt.mnPasswordVerifier = aIn.ReaduInt32();
aProt.maTitle = aIn.ReadUniString(); aProt.maTitle = aIn.ReadUniString();
if ((aProt.mnAreserved & 0x80000000) == 0x80000000) if ((aProt.mnAreserved & 0x00000001) == 0x00000001)
{ {
sal_uInt32 nCbSD = aIn.ReaduInt32(); sal_uInt32 nCbSD = aIn.ReaduInt32();
// TODO: could here be some sanity check applied to not allocate 4GB? // TODO: could here be some sanity check applied to not allocate 4GB?

View File

@@ -1492,7 +1492,7 @@ void XclExpSheetEnhancedProtection::WriteBody( XclExpStream& rStrm )
rStrm << maEnhancedProtection.mnAreserved; // 1 bit A and 31 bits reserved rStrm << maEnhancedProtection.mnAreserved; // 1 bit A and 31 bits reserved
rStrm << maEnhancedProtection.mnPasswordVerifier; // wPassword rStrm << maEnhancedProtection.mnPasswordVerifier; // wPassword
rStrm << XclExpString( maEnhancedProtection.maTitle); // stTitle rStrm << XclExpString( maEnhancedProtection.maTitle); // stTitle
bool bSDContainer = ((maEnhancedProtection.mnAreserved & 0x80000000) == 0x80000000); bool bSDContainer = ((maEnhancedProtection.mnAreserved & 0x00000001) == 0x00000001);
sal_uInt32 nCbSD = maEnhancedProtection.maSecurityDescriptor.size(); sal_uInt32 nCbSD = maEnhancedProtection.maSecurityDescriptor.size();
SAL_WARN_IF( bSDContainer && nCbSD < 20, "sc.filter", SAL_WARN_IF( bSDContainer && nCbSD < 20, "sc.filter",
"XclExpSheetEnhancedProtection A flag indicates container but cbSD < 20"); "XclExpSheetEnhancedProtection A flag indicates container but cbSD < 20");