android: replace untitled.odt template with one generated by current LO#15739
Closed
SUGE2016 wants to merge 1 commit intoCollaboraOnline:mainfrom
Closed
android: replace untitled.odt template with one generated by current LO#15739SUGE2016 wants to merge 1 commit intoCollaboraOnline:mainfrom
SUGE2016 wants to merge 1 commit intoCollaboraOnline:mainfrom
Conversation
The original android/templates/untitled.odt (added in 2020,
unchanged for 5 years) is a hand-crafted minimal ODF file:
5 entries, 1268 bytes, content.xml is just 227 bytes,
mimetype is not the first ZIP entry (offset != 0).
Recent versions of the lo-core no longer accept this file as a valid
ODT. Loading it via LibreOfficeKit triggers the "Document is corrupted,
do you want to repair it?" dialog, and after either choice the editor
shows a blank screen.
Replace it with a fresh empty document produced by:
touch empty.txt
soffice --headless --convert-to odt empty.txt
This yields a 7.8 KB, 15-entry, fully spec-compliant ODT that current
LO opens without complaint.
This bug went unnoticed because:
- desktop / web Collabora never creates a new empty ODT — documents
always come from storage
- only the Android (and iOS) "New Document" flow uses these template
files, and the user base is small
Verified on Android (OnePlus 13T, arm64-v8a): "New ODT" now opens
straight into a blank editable document.
untitled.ods and untitled.odp are left untouched (still load fine);
they can be regenerated the same way if a future core regression hits
them.
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Thank you for your contribution! However, the main branch on GitHub is not used for this project. Please submit patches to the main branch of the online repo at https://gerrit.collaboraoffice.com. See CONTRIBUTING.md for details. This PR has been automatically closed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The bundled `android/templates/untitled.odt` (used by the Android "New Document" flow) was hand-crafted in 2020 and has been unchanged for 5 years. Current versions of lo-core no longer accept it as a valid ODT — opening it triggers the "Document is corrupted, do you want to repair it?" dialog, and after either choice the editor shows a blank screen.
This PR regenerates the template using the current LibreOffice.
How to reproduce (before this PR)
ODS / ODP "New Document" flows still work because their templates aren't tripped by the same regression.
Why nobody noticed
The fix
Replace `android/templates/untitled.odt` with a fresh empty document produced by:
```sh
touch empty.txt
soffice --headless --convert-to odt empty.txt
```
Old vs new:
`untitled.ods` and `untitled.odp` are intentionally left untouched — they still load fine. They can be regenerated the same way if a future core regression hits them.
Test plan
Related
A complementary defensive fix in `kit/KitHelper.hpp` (#15738) prevents `documentStatus()` from silently dropping the status reply when LOK returns empty JSON, which is what makes this template bug present as a blank screen instead of a clearer error.
Made with Cursor