summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2017-03-06 20:42:46 +0200
committerTor Lillqvist <tml@collabora.com>2017-03-08 14:31:14 +0200
commit65e57811d61b95391b3f598d90b703893ecf64f5 (patch)
treebd5e2a497992096d419b15cfd761b5d2cb5afbba
parent1c8684d644d4a711999125c73a548a520d86fd91 (diff)
The 'fLockObj' field of an 'ObjProtect' MUST be 0x0001 says the spec
So generate such a record only when the protection state is on. See https://msdn.microsoft.com/en-us/library/dd922139(v=office.12).aspx Change-Id: I710395527cd53dc47018806e51fcc699e11fb461 (cherry picked from commit 4a332d54b80bbc502ccc98bf924a269e00c10070)
-rw-r--r--sc/source/filter/excel/excdoc.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index 75a767740359..925a522020b2 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -511,7 +511,8 @@ void ExcTable::FillAsTableBinary( SCTAB nCodeNameIdx )
{
Add( new XclExpProtection(true) );
Add( new XclExpBoolRecord(0x00DD, pTabProtect->isOptionEnabled(ScTableProtection::SCENARIOS)) );
- Add( new XclExpBoolRecord(0x0063, pTabProtect->isOptionEnabled(ScTableProtection::OBJECTS)) );
+ if (pTabProtect->isOptionEnabled(ScTableProtection::OBJECTS))
+ Add( new XclExpBoolRecord(0x0063, true ));
Add( new XclExpPassHash(pTabProtect->getPasswordHash(PASSHASH_XL)) );
}