Hi, Markus,

I was right about some things, and I was wrong about some other things.

XMLTableStylesContext::EndElement() did use ScXMLImport::InsertStyles() which used ScTable::SetOptimalHeight() (or something similar) to set the row heights. I used ScDocument::EnableAdjustHeight(false) to prevent SetOptimalHeight() from actually doing any work.

ScXMLImport::endDocument() did use ScMyTables::UpdateRowHeights() which used ScTable::SetOptimalHeightOnly() to set the row heights for the visible sheet and any sheets with tabs. I removed the call to this method, and I removed the method itself since nothing else was using it.

Turns out that the row height was already being imported using UNO. ScXMLTableRowContext::EndElement() uses XMLTableStyleContext::FillPropertySet() which uses ScDocument::SetRowHeightOnly() to set the row height to the imported row height values. This remains.

With these changes, the all unit tests passed and visual inspection of the heights appeared correct. Using my slow debug build on my laptop (Intel Core2 Duo T7500 @ 2.20GHz running 32bit GNU/Linux with 3.5GB of ram) and the large test file that you gave me, the total load time was consistently shorter from 1:48 to 1:37.

I'll push my commits to my feature branch so you can see the changes.

Do you think there is something I am missing here? For example, will there ever be a case where row height is not specified, requiring us to calculate the row height?


Respectfully,
Daniel Bankston
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to