<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - [FILEOPEN] XLSX Inconsistent handling of protection in the presence of fonts"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=144097">144097</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[FILEOPEN] XLSX Inconsistent handling of protection in the presence of fonts
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>7.0.0.3 release
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Calc
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dev@sheetjs.com
</td>
</tr></table>
<p>
<div>
<pre>Description:
LO does not apply cell protection properties when reading XLSX files with fonts
Steps to Reproduce:
Open attached "bad.xlsx" and try to edit cell C1
Actual Results:
C1 is not editable and LO shows a popup
Expected Results:
C1 is editable (tested against Excel 2019)
Reproducible: Always
User Profile Reset: Yes
Additional Info:
Cells B1 and B2 are editable in `bad.xlsx`. They use the following XF:
```
<xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"
applyNumberFormat="1">
<alignment wrapText="true"/>
<protection hidden="0" locked="0"/>
</xf>
```
Cells C1 and C2 are not editable in `bad.xlsx` even though they should be.
They use the following XF:
```
<xf numFmtId="0" fontId="1" fillId="0" borderId="0" xfId="0"
applyNumberFormat="1" applyFont="1">
<alignment wrapText="true"/>
<protection hidden="0" locked="0"/>
</xf>
```
The presence of `applyFont="1"` is somehow changing LO's parse of the style,
since LO does the right thing for B1/B2 but not for C1/C2.
The `good.xlsx` attachment was generated by manually adding
`applyProtection="1"` and that seems to resolve matters. It seems LO assumes
the default for applyProtection depends on whether `applyFont` is passed. The
correct behavior (comparing with Excel) is to assume applyProtection is true if
there is a protection child element.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>