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

            Bug ID: 170962
           Summary: CALC - Manually manipulated xml code in ods file
                    prevents Calc from opening the file even the code as
                    such would run
           Product: LibreOffice
           Version: 26.2.0.3 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: minor
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

Description:
Adding a single space character in the wrong position in content.xml hinders
the file from being opened. 

(I'm not sure if this even qualifies as bug as I manually manipulated the ods
file. If not, feel free to close it)

Steps to Reproduce:
1. Open provided file (or follow the steps under "other information" to
recreate the file yourself)

Actual Results:
The file does not open even the code in general is correct.

Expected Results:
Maybe "just run", but the solution could also be to suggest to 'fix' the code.


Reproducible: Always


User Profile Reset: No

Additional Info:
I came across this problem when I wanted to dive deeper into the ods file of
Calc and took a look at content.xml

I pasted the content of an empty file to
https://jsonformatter.org/xml-formatter to 'beautify' the code and make it
easier to read. When I copied the 'beautified' output back as is, the file did
no longer work. I was not _that_ surprised as I may have changed the structure
too much - yet I was eager to find out what *exactly* broke the file.

First I thought that it may is related to inserted TABs or NEWLINEs. I removed
them, but this didn't work. With the help of https://text-compare.com/ I saw
that the different was only in a few spaces in the code.

The 'beautified' code turned this line
> xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"

into this

> xmlns:presentation="urn:oasis:names:tc:opendocument:
>       xmlns:presentation:1.0"

After testing I found out that it's not the NEWLINE or the TAB, but the
existing space character in the section between both quotation marks.

So
> xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"
turns into ________________________________________________\/
> xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns: presentation:1.0"

I know that I'm doing something to the code that is not intended and probably
no sane person would do (so I don't mind if this manual manipulation is closed
as NOTABUG), but I wonder if Calc should really fail at a space in the wrong
position or if it may just should try to either ignore the line or 'fix' it by
removing the space.

LibreOffice:
- Version: 26.2.0.3 (X86_64)
- Build ID: afbbd0df0edb6d40b450b0337ac646b0913a760c
- CPU threads: 12; OS: Linux 6.17; UI render: default; VCL: gtk3
- Locale: de-AT (de_AT.UTF-8); UI: de-DE
- Flatpak
- Calc: threaded

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

Reply via email to