From 5bce64e4759ee3bd98d34b70d02f9b54550a53ed Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Tue, 8 Apr 2014 11:34:49 +0200 Subject: [PATCH] bit 0 is bit 0 They say they use big-endian bit diagrams, but just to confuse you. Change-Id: I7fd6bb58c721f1dca2f6ecbaae90d516746762f0 --- sc/source/filter/excel/excimp8.cxx | 2 +- sc/source/filter/xcl97/xcl97rec.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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");