diff options
author | Tor Lillqvist <tml@collabora.com> | 2017-03-06 20:42:46 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-03-26 21:31:03 +0200 |
commit | ca7dccdea4c6c22fe7e9c651a50e5466e26f3ce2 (patch) | |
tree | 7249575c3d5d06286efc1424197f560a0100ed30 | |
parent | bb10cc531e3b6590f8951968be94733f1690a0b8 (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.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx index a1a2a75443d4..6bbbdbb45f3c 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)) ); } |