[Libreoffice-bugs] [Bug 144097] New: [FILEOPEN] XLSX Inconsistent handling of protection in the presence of fonts

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Aug 26 07:40:42 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=144097

            Bug ID: 144097
           Summary: [FILEOPEN] XLSX Inconsistent handling of protection in
                    the presence of fonts
           Product: LibreOffice
           Version: 7.0.0.3 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: dev at sheetjs.com

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210826/d79e961a/attachment.htm>


More information about the Libreoffice-bugs mailing list