Commit 486d0778 authored by CharlieC's avatar CharlieC
Browse files

Make sure we bind protection to worksheets after reading.

Resolves #1414

--HG--
branch : 3.0
parent 50f3198ac39a
......@@ -422,7 +422,9 @@ class WorksheetReader(object):
for k in ('print_options', 'page_margins', 'page_setup',
'HeaderFooter', 'auto_filter', 'data_validations',
'sheet_properties', 'views', 'sheet_format',
'row_breaks', 'col_breaks', 'scenarios', 'legacy_drawing'):
'row_breaks', 'col_breaks', 'scenarios', 'legacy_drawing',
'protection',
):
v = getattr(self.parser, k, None)
if v is not None:
setattr(self.ws, k, v)
......
......@@ -390,6 +390,7 @@
</c>
</row>
</sheetData>
<sheetProtection xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" password="DAA7" sheet="1" formatCells="0" formatColumns="0" formatRows="0" insertColumns="0" insertRows="0" insertHyperlinks="0" deleteColumns="0" deleteRows="0" sort="0" autoFilter="0" pivotTables="0"/>
<mergeCells count="8">
<mergeCell ref="G18:H18"/>
<mergeCell ref="G23:H24"/>
......
......@@ -935,7 +935,7 @@ class TestWorksheetReader:
reader.bind_properties()
for k in ('page_margins', 'page_setup', 'views', 'sheet_format',
'legacy_drawing'):
'legacy_drawing', 'protection'):
assert getattr(ws, k) == getattr(reader.parser, k)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment