[Libreoffice-bugs] [Bug 128204] ODS file opens slow but after on/off Wrap text automatically it opens very fast (because of adapting row height)
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Fri Jul 2 00:23:45 UTC 2021
https://bugs.documentfoundation.org/show_bug.cgi?id=128204
--- Comment #12 from Kevin Suo <suokunlong at 126.com> ---
ODF Spec.
'''
20.394 style:use-optimal-row-height
The style:use-optimal-row-height attribute specifies that a row height should
be recalculated automatically if content in the row changes.
The defined values for the style:use-optimal-row-height attribute are:
•false: row height should not be recalculated automatically if content in
the row changes.
•true: row height should be recalculated automatically if content in the
row changes.
'''
Well, from this ODF standard, this attribute defines that the row height should
be recalculated if the content in this row is changed (i.e., at the time of
editing), rather than when the document is open. At time of editing when the
row height is recalculated, a new row height value is determined and is saved
to the ODF file.
At file open, the application should use the defined row height value directly
rather than recalculating each of them. For all new ODF spreadsheet docs there
is a defined row height for each row.
The rational of recalculating the row heights at file open as in the commit of
bug 62268 is that for some mannully generated ODF files there is no row height
value defined in the xml file, normally because those programs are not
professional OpenDocument Producers and they simply want an ODF Viewer like
Calc to calculate the row height for them when the file is open by the user.
And I agree that in such case (if there is no defined row height value) Calc
should help to recalculate.
So, consider both bug 62268 and the properly generated ODF filed, the fix
should be:
if rowHeight and rowHeight>0:
finalRowHeight = rowHeight
else:
if useOptimalRowHeight:
(recalculate row height)
finalRowHeight = reCalculatedRowHeight
else:
finalRowHeight = defaultRowHeight
The improvement of the speed for the recalculation of row height is another
issue. However, for large spreadsheets even the fastest calculation may still
cost a lot of time and CPU circles as it need to loop into each row and each
cell.
--
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/20210702/7df43cc5/attachment.htm>
More information about the Libreoffice-bugs
mailing list