After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 700994 - Print Range incorrectly includes hidden cells
Print Range incorrectly includes hidden cells
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Printing
git master
Other Linux
: Normal normal
: ---
Assigned To: Andreas J. Guelzow
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2013-05-25 08:53 UTC by Andreas J. Guelzow
Modified: 2013-05-27 02:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andreas J. Guelzow 2013-05-25 08:53:36 UTC
Fill A1:A1000 with random numbers
Hide column A
set C3 to "Hello World"
print preview

Note that the print preview consists of about 24 sheets when 1 should suffice. The hidden column is considered par to the print range and increases it unnecessarily.
Comment 1 Andreas J. Guelzow 2013-05-27 01:40:46 UTC
We have:

/**
 * sheet_get_extent:
 * @sheet: the sheet
 * @spans_and_merges_extend: optionally extend region for spans and merges.
 *
 * calculates the area occupied by cell data.
 *
 * NOTE: When spans_and_merges_extend is TRUE, this function will calculate
 * all spans.  That might be expensive.
 *
 * NOTE: This refers to *visible* contents.  Cells with empty values, including
 * formulas with such values, are *ignored.
 *
 * Return value: the range.
 **/

 sheet_get_extent seems to exclude cells with empty values, including formulas with such values but does include cells that are hidden. We are using sheet_get_extent for various exporters that as a consequence export hidden cells. I assume that this may be desired, although I could imagine that some users may prefer that hidden content would not be exported.

As a consequence I think we should provide a second function to only calculate the extent of non-hidden cells.
Comment 2 Andreas J. Guelzow 2013-05-27 02:57:42 UTC
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.