[Libreoffice-bugs] [Bug 144521] FILESAVE: Stop storing empty cells

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Sep 28 14:40:54 UTC 2021


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

--- Comment #4 from robert at prino.org ---
I've attached three spreadsheets. All of them open and display exactly the same
output, but unzip the ODS files, use, like I did, xmllint
<http://xmlsoft.org/xmllint.html> to format them, and WinMerge to compare the
"content.xml" files, and shiver.

The first file is "original-lift & v100+.ods" 

This is an organically grown spreadsheet. In other words, it's never been
updated with anything other than Calc. I think, but I'm not sure any more that
it started with a single sheet, and in the course of the past decade or so, it
has grown. In many cases I've added tables to existing sheets, only to later
move them to their own sheets, I've inserted columns, deleted columns, ditto
for rows, used different fonts, updated entire columns with "ctrl-1", updated
selected ranges with "ctrl-1", added conditional formats, deleted them, in
other words, I've used a fair amount of the functions in Calc.

The second file is "manual-lift & v100+.ods"

This file is the result of having spent too much time in hospital waiting
rooms. It's the result of unzipping "original-lift & v100+.ods", and manually
editing "content.xml", after inserting "cr/lf" sequences between all "><", and
(obviously) deleting them again before zipping the changed code.

Among the manual changes? 

- replacing nearly duplicate column widths with equal ones
- removing unused fonts
- removing "asian" and "complex" attributes
- removing lots of "<table:table-cell table:number-columns-repeated="XX"/>"
immediately before "</table:table-row>" tags
- probably, not sure any more, changing times with 59.9999999 seconds, setting
the seconds to 00 and adding one minute
- removed the "<table:database-ranges>" section (no clue how it got there, and
even less how to "officially" remove it)

all in all removing about one megabyte of "bloat".

Then I opened the file in Calc, and ***without doing anything to it*** saved it
as the third attached file, "saved-manual-lift & v100+.ods" gave that the
unzip/xmllint treatment, and burst into tears...

Among the tear-inducing changes?

- more than 1,000 "<table:table-cell table:number-columns-repeated="2"/>"
redundant entries
- the never used fonts are back
- columns widths are suddenly changed by minute amounts

And numerous others, the WinMerge generated diff files are huge.

I'd like to end this diatribe with 

1) "The fastest code is the code that is never executed" and 
2) <http://www.ncdm.com/bloat/bloat.htm>

-- 
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/20210928/6110d75b/attachment.htm>


More information about the Libreoffice-bugs mailing list