[GSOC] ODS Row height import

Eike Rathke erack at redhat.com
Tue Jun 26 02:35:52 PDT 2012


Hi,

On Tuesday, 2012-06-26 03:46:47 +0200, Markus Mohrhard wrote:

> > 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.

There's a big difference between ScTable::SetRowHeightOnly() and
ScTable::SetOptimalHeightOnly(), the latter as a side effect also
recalculates formula results if the cell is marked dirty. Just keept
that in mind when removing the call.. if a formula result stored in the
file differs from the actual result (i.e. because some generator updated
only the result or only the formula) row height may be different when
recalculated.


> > 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?

That may be possible, the style:row-height attribute is optional in ODF,
so while we write it out even when style:use-optimal-row-height is set,
other implementations may not.

> 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.

I'm Cc'ing also Noel here, he lately tuned row heights for Excel
import/export and might have some insights to share.

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120626/1a7582da/attachment.pgp>


More information about the LibreOffice mailing list