GNOME Bugzilla – Bug 662472
failure to correctly autofit row
Last modified: 2011-10-28 18:25:14 UTC
in F10: =pi()*10000 format F10 to scientific number with superscript turn on extension markers in view->viewproperties select row 10 and request autofit. Note that the content in A10 is still truncated at the bottom.
Okay we have: if (!VALUE_IS_STRING (cell->value)) { /* * Mildly cheating to avoid performance problems, See bug * 359392. This assumes that non-strings do not wrap and * that they are all the same height, more or less. */ Sheet const *sheet = cell->base.sheet; height = gnm_style_get_pango_height (gnm_cell_get_style (cell), sheet->rendered_values->context, sheet->last_zoom_factor_used); } else { and in gnm_style_get_pango_height: { PangoAttrList *attrs = gnm_style_get_pango_attrs (style, context, zoom); if (style->pango_attrs_height == -1) { int h; PangoLayout *layout = pango_layout_new (context); pango_layout_set_attributes (layout, attrs); pango_layout_set_text (layout, "+1.23456789E-01", -1); pango_layout_get_pixel_size (layout, NULL, &h); g_object_unref (layout); ((GnmStyle *)style)->pango_attrs_height = h; } pango_attr_list_unref (attrs); return style->pango_attrs_height; } so we are using only the attributes of the style and not of the number format. I would think that if we have a valid rendered value at the given zoom level we should use it! Alternatively we could look at the number format and if it is a scientific format with superscript, we should apply said superscript to the sample text.
Created attachment 200157 [details] [review] proposed patch Before evaluating this patch one might want to read bug #359392 and check the current performance.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.