summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2017-05-23 15:35:13 +0300
committerAndras Timar <andras.timar@collabora.com>2017-05-30 09:41:23 +0200
commit4784733ad3ae5637deaac35af607927344cc4b3d (patch)
tree66601d7238db9cc8e762840bfc8d6b1fba53df99 /sc/source
parentd9865d2dd322c505d242927937ad5fd9dcd4d6b7 (diff)
tdf#108017 xlsb import: protection settings were reversed
Back in LO4.3, commit 5728a56b20e01d6c9e86a23f20af64a1b68ad604 fdo#70499 selectn of lock/unlocked cells with worksheet protection reversed ...reversed finalizeImport's understanding of maSheetProt.* to match xml import, but then it no longer matched the binary stream import. So, .xlsb imported the opposite of what .xlsx/.xlsm imported. Reviewed-on: https://gerrit.libreoffice.org/37952 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 0d3fcbf809852aab0d0f88272bbfd2e8507d1c5e) Reviewed-on: https://gerrit.libreoffice.org/38041 Change-Id: I2da3967ef52187e4ef36ce7d01b17a4672f61e1c Reviewed-on: https://gerrit.libreoffice.org/38052 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 4fbb8ad023c95266ce0882cd28bdf6703f5b67bf)
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/filter/oox/worksheetsettings.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/sc/source/filter/oox/worksheetsettings.cxx b/sc/source/filter/oox/worksheetsettings.cxx
index 1bbc7a82cbd3..ca956382dc7b 100644
--- a/sc/source/filter/oox/worksheetsettings.cxx
+++ b/sc/source/filter/oox/worksheetsettings.cxx
@@ -215,21 +215,21 @@ void WorksheetSettings::importSheetProtection( SequenceInputStream& rStrm )
maSheetProt.mnPasswordHash = rStrm.readuInt16();
// no flags field for all these boolean flags?!?
maSheetProt.mbSheet = rStrm.readInt32() != 0;
- maSheetProt.mbObjects = rStrm.readInt32() != 0;
- maSheetProt.mbScenarios = rStrm.readInt32() != 0;
- maSheetProt.mbFormatCells = rStrm.readInt32() != 0;
- maSheetProt.mbFormatColumns = rStrm.readInt32() != 0;
- maSheetProt.mbFormatRows = rStrm.readInt32() != 0;
- maSheetProt.mbInsertColumns = rStrm.readInt32() != 0;
- maSheetProt.mbInsertRows = rStrm.readInt32() != 0;
- maSheetProt.mbInsertHyperlinks = rStrm.readInt32() != 0;
- maSheetProt.mbDeleteColumns = rStrm.readInt32() != 0;
- maSheetProt.mbDeleteRows = rStrm.readInt32() != 0;
- maSheetProt.mbSelectLocked = rStrm.readInt32() != 0;
- maSheetProt.mbSort = rStrm.readInt32() != 0;
- maSheetProt.mbAutoFilter = rStrm.readInt32() != 0;
- maSheetProt.mbPivotTables = rStrm.readInt32() != 0;
- maSheetProt.mbSelectUnlocked = rStrm.readInt32() != 0;
+ maSheetProt.mbObjects = rStrm.readInt32() == 0;
+ maSheetProt.mbScenarios = rStrm.readInt32() == 0;
+ maSheetProt.mbFormatCells = rStrm.readInt32() == 0;
+ maSheetProt.mbFormatColumns = rStrm.readInt32() == 0;
+ maSheetProt.mbFormatRows = rStrm.readInt32() == 0;
+ maSheetProt.mbInsertColumns = rStrm.readInt32() == 0;
+ maSheetProt.mbInsertRows = rStrm.readInt32() == 0;
+ maSheetProt.mbInsertHyperlinks = rStrm.readInt32() == 0;
+ maSheetProt.mbDeleteColumns = rStrm.readInt32() == 0;
+ maSheetProt.mbDeleteRows = rStrm.readInt32() == 0;
+ maSheetProt.mbSelectLocked = rStrm.readInt32() == 0;
+ maSheetProt.mbSort = rStrm.readInt32() == 0;
+ maSheetProt.mbAutoFilter = rStrm.readInt32() == 0;
+ maSheetProt.mbPivotTables = rStrm.readInt32() == 0;
+ maSheetProt.mbSelectUnlocked = rStrm.readInt32() == 0;
}
void WorksheetSettings::importChartProtection( SequenceInputStream& rStrm )