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

            Bug ID: 173397
           Summary: FILESAVE XLSX: lowercase threaded-comment GUID is
                    written to legacy comments XML, violating ST_Guid
           Product: LibreOffice
           Version: 26.8.0.0 alpha0+ master
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

Description:
When an XLSX containing threaded comments with lowercase GUIDs is opened and
saved, Calc writes the same lowercase GUID into the legacy comments part
(xl/comments*.xml). The OOXML ST_Guid lexical form only allows uppercase A-F,
so the saved file is rejected by strict consumers such as openpyxl 3.1.5.

Steps to Reproduce:
1. Open an XLSX containing a threaded comment whose id in
xl/threadedComments/threadedComment1.xml is a lowercase GUID, for example
{9436a6b9-43c7-42a3-8dce-f4993c54ffe3}.
2. Save the workbook as XLSX in Calc 26.8.0.3. A headless load/store reproduces
the same problem.
3. Inspect xl/comments1.xml, or load the saved workbook with openpyxl 3.1.5.

Actual Results:
Calc writes a legacy comment such as <comment ...
guid="{9436a6b9-43c7-42a3-8dce-f4993c54ffe3}">. openpyxl then raises ValueError
because the value does not match the ST_Guid pattern.

Expected Results:
The exported legacy comment GUID is schema-compliant (uppercase A-F), for
example {9436A6B9-43C7-42A3-8DCE-F4993C54FFE3}, and the saved XLSX loads in
strict OOXML consumers.


Reproducible: Always


User Profile Reset: No

Additional Info:
Regression: LibreOffice 26.2.5.2 does not produce the invalid legacy-comment
GUID; reproduced with LibreOffice 26.8.0.3 680(Build:3) on Linux x86_64.

The behavior appears to have been introduced by the threaded-comment export
commit:
https://github.com/LibreOffice/core/commit/f31a5ce3774476067c12043e85e2fca1295fde37

ST_Guid schema definition:
https://learn.microsoft.com/en-us/openspecs/office_file_formats/ms-oshared/2f3a48cb-3142-403c-962a-fa02061b7d9b

The original reproducer contains private business data and is therefore not
attached.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to