Bug 85660 - FILESAVE: Improve source control compatibility of flat ODF files
Summary: FILESAVE: Improve source control compatibility of flat ODF files
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 88298 91098 156428 (view as bug list)
Depends on:
Blocks: ODF-Flat
  Show dependency treegraph
 
Reported: 2014-10-30 20:16 UTC by Nathan Myers
Modified: 2024-09-23 08:22 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Myers 2014-10-30 20:16:20 UTC
I was very happy to find that LO supported a textual file format, because it made LO documents compatible with git, and I could diff document versions.

When I actually tried putting fodt documents into git, I found that the diffs are practically useless because numerous arbitrary numeric identifiers are arbitrarily changed from one save to the next.  I don't think this is a fault of the file format.  Rather, it appears that LO randomly re-assigns the numbers for no outwardly visible reason.

This is a request to preserve "rsid" numbers and text:style-name assignments in fodt files across loads and saves in cases where there is no objectively sound reason not to. 

It would help, too, to limit line lengths to some smallish multiple of 100 bytes where possible, broken preferentially at XML lexeme boundaries.
Comment 1 Matthew Francis 2014-10-31 10:59:37 UTC
At some risk of disabling other potentially useful ODF extensions, you can disable the rsid feature by setting
Tools - Options - Load/Save - ODF format version
to "1.2" rather than the default of "1.2 extended (recommended)"


Pretty-printing the XML of FODT files (a la "xmllint --format") on save could potentially be a useful "Expert Configuration" flag

Setting:
-> NEW
-> Importance: low, enhancement
-> Component: filters and storage
-> Updated title
Comment 2 Yann Diorcet 2015-06-15 08:29:35 UTC
Indeed that help but, not completely.
If i add a character and remove it after (same content than at the start). I have still diffs

-   <text:list xml:id="list102257823223392" text:continue-numbering="true" text:style-name="L17">
+   <text:list xml:id="list102327319664572" text:continue-numbering="true" text:style-name="L17">

A cleaner xml could be very usefull when using SVC
Comment 3 Regina Henschel 2018-07-18 11:59:18 UTC
"pretty printing" is an advanced setting: Tools > Options > Advanced. Click button "Open Expert Configuration". Search for "pretty". Double-click the result line to toggle true/false.

Preserve of xml:id when ever possible, is still an issue.
Comment 4 Stéphane Guillou (stragu) 2023-04-08 07:28:02 UTC
*** Bug 91098 has been marked as a duplicate of this bug. ***
Comment 5 Stéphane Guillou (stragu) 2023-04-08 07:31:06 UTC
*** Bug 88298 has been marked as a duplicate of this bug. ***
Comment 6 Stéphane Guillou (stragu) 2023-08-08 23:47:03 UTC
*** Bug 156428 has been marked as a duplicate of this bug. ***
Comment 7 Vincent Lefevre 2024-09-23 08:22:11 UTC
(In reply to Regina Henschel from comment #3)
> Preserve of xml:id when ever possible, is still an issue.

Styles, thus text:style-name values, also change across LibreOffice versions, e.g. by just saving an ODT file (created with an older LO version) without any modification.