Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hello Daniel,

2012/6/25 Daniel Bankston <daniel.dev.libreoffice@gmail.com>:
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 still wonder why we need so long to import this document. Anyway
1:37 is already a great improvement.


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?


I'm not sure if we need to recalculate the row height in case of
style:use-optimal-row-height
 but that is something we can figure out later. Except for this case I
currently see no reason why we would need to calculate row height but
Kohei or Eike may have an idea.

Regards,
Markus

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.