Issue 82290 - Calc - empty first sheet in workbook does not allow printing from preview
Summary: Calc - empty first sheet in workbook does not allow printing from preview
Alias: None
Product: Calc
Classification: Application
Component: printing (show other issues)
Version: OOo 2.3
Hardware: PC Windows XP
: P3 Trivial with 2 votes (vote)
Target Milestone: ---
Assignee: frank
QA Contact: issues@sc
Keywords: regression
: 84916 (view as issue list)
Depends on:
Reported: 2007-10-05 13:31 UTC by kpalagin
Modified: 2013-08-07 15:14 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

Sample worksheet for print preview bug (30.41 KB, application/vnd.oasis.opendocument.spreadsheet)
2007-10-09 17:15 UTC, fchauvat
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description kpalagin 2007-10-05 13:31:00 UTC
repro steps
1. Using 2.3 or higher start Calc.
2. On Sheet 3 type anything, click File - Page Preview, then File - Print - 
OK. You get error message "There is nothing to print. The selected print range 
or sheet is empty", which is clearly wrong.
3. Close Page Preview and click File - Print - OK - file prints just fine.

Issue seems relevant.
Comment 1 kpalagin 2007-10-05 13:32:25 UTC
Step 2 worked in 2.2.1 and earlier, so setting keyword regression.
Comment 2 fchauvat 2007-10-09 17:14:05 UTC

I can confirm this issue.

The new default option "Print only selected sheets" seems to have strange
behaviour from "Print Preview" window ( all ok in "normal view").

From Print Preview, it works only if you're on the first sheet of the work book.

I will send you an attachment as example.

- You're on second sheet ( a data pilot, 2 pages printing).
- Click "Print preview"
- Click Print => error message "Nothing to print bla bla bla ..."
- Quit print preview mode. Click on first sheet to select it
- Click "Print preview" then click "Print" ... it works !.

Then, quit preview mode ... click on the second sheet and move it in first
position. Click "print preview", then "print" ... it works !

Perhaps a problem relative a bad page counting method in print preview ?

Oh...other thing to try .. 
-Restore the initial sheets position.
-From the second sheet, click "Print Preview"
- In print preview mode, using toolbar buttons preview pages from the first sheet
- Click print ... Something print, but I don't know exactly what ..

Attachment following. 
Comment 3 fchauvat 2007-10-09 17:15:31 UTC
Created attachment 48788 [details]
Sample worksheet for print preview bug
Comment 4 kpalagin 2007-10-10 13:33:37 UTC
More ways to repro the problem:
1. Start 2.3 Calc.
2. Enter random data to fill first 100 of lines.
3. Open print preview, scroll to the second page and click "Print file 
directly" icon - you get error message.
Comment 5 frank 2007-10-10 14:19:15 UTC
Hi Thomas,

using File - Print works, but using the Print Button on the toolbar gives the
error message Nothing to print.

Please have a look at this one.

Comment 6 kpalagin 2007-10-10 14:57:23 UTC
I fail to understand why this regression is not targeted for nearest bugfix 
Comment 7 frank 2007-10-10 16:01:57 UTC
Hi Kyrill,

was targeted to 2.4 as I thought that there is a simple workaround using the
File-Print Menu and Thomas have a tight schedule. Had another look and found out
that the workaround does not work, therefore re-targeted to 2.3.1 .

Comment 8 kpalagin 2007-10-10 19:57:32 UTC
Frank, Thomas,
I understand "tight schedule" reason, but I also understand that many thousands 
(if not millions) of our users could gave been affected for 3 more months. I 
also afraid that developers are unlikely to have more time after 2.3.1, so I 
appreciate targeting this for 2.3.1.
Thank you very much!
Comment 9 thomas.benisch 2007-10-16 09:53:15 UTC
Comment 10 thomas.benisch 2007-10-16 09:55:45 UTC
fixed on CWS dr59

The following files are affected:

Comment 11 kpalagin 2007-10-16 10:18:15 UTC
great job!

Could you tell non-developer types what was wrong?
Thank you very much!

Comment 12 thomas.benisch 2007-10-16 10:38:15 UTC
The reason for this issue is the following. When printing from the
Page Preview with the 'Print only selected sheets' option enabled,
only the sheet which belongs to the currently visible page should
be printed. The bug in the code was simply, that the page number
instead of the sheet number was taken. Therefore if a document
contained only sheets with one print page everything worked fine,
but as soon as a document contained a sheet with more than one
print page, either the correct sheet, the wrong sheet or nothing
was printed.
Comment 13 thomas.benisch 2007-10-23 14:49:37 UTC
TBE->FST: Please verify on CWS dr59.
Comment 14 frank 2007-10-25 12:33:07 UTC
found fixed on cws dr59 using Linux, Solaris and Windows build

Comment 15 frank 2007-12-14 13:12:28 UTC
found integrated on master m239 using Linux, Solaris and Windows build
Comment 16 frank 2008-02-01 09:23:56 UTC
*** Issue 84916 has been marked as a duplicate of this issue. ***