Issue 45497 - Page Preview does not respect "print only selected sheets"
Summary: Page Preview does not respect "print only selected sheets"
Status: CONFIRMED
Alias: None
Product: Calc
Classification: Application
Component: ui (show other issues)
Version: OOo 2.3
Hardware: All All
: P3 Normal with 2 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on: 28417
Blocks:
  Show dependency tree
 
Reported: 2005-03-19 18:32 UTC by gerhard_oettl
Modified: 2014-07-11 15:36 UTC (History)
7 users (show)

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


Attachments
Sample spreadsheet with multiple sheets. (6.55 KB, application/vnd.oasis.opendocument.spreadsheet)
2007-11-30 04:48 UTC, jpryor
no flags Details
Proposed Patch. (2.21 KB, patch)
2007-11-30 04:55 UTC, jpryor
no flags Details | Diff
sc-print-selected-sheets.diff (1.68 KB, patch)
2007-12-15 03:53 UTC, jpryor
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description gerhard_oettl 2005-03-19 18:32:50 UTC
when setting "print only selected tables (or sheets)" in the printer-options the
print is ok, but the preview shows all pages. Looks like preview does not pay
attention to this setting.
Comment 1 frank 2005-04-11 10:49:28 UTC
One for the requirements team as this is not a bug
Comment 2 gerhard_oettl 2005-04-28 23:11:36 UTC
I included this requirement into issue 47681.
May be this violates the "one problem - one issue" guideline, but my goal is to
unify the output-selection (not only restricted to page-preview).
Comment 3 frank 2005-06-07 10:40:59 UTC
*** Issue 48531 has been marked as a duplicate of this issue. ***
Comment 4 hwoarang 2005-06-07 22:38:21 UTC
I think this is a dup of #28417
yes ?
Comment 5 kpalagin 2007-03-03 12:55:46 UTC
Seems to be duplicate of http://www.openoffice.org/issues/show_bug.cgi?
id=22762.
Resolving. 
Please transfer your votes to 22762

*** This issue has been marked as a duplicate of 22762 ***
Comment 6 hwoarang 2007-03-03 13:21:23 UTC
In my point of view, issue 22762 describes a different problem.
Comment 7 jpryor 2007-11-30 04:47:17 UTC
I agree with hwoarang that this describes a different issue than 22762, as 22762
deals with printing selections, while this bug is about a fundamental mismatch
between Print Preview and the *actual* file generated.

Normally (i.e. in every other well-behaving app), Print Preview matches the
output ~exactly, so that if Print Preview shows 2 pages, you actually get two pages.
Comment 8 jpryor 2007-11-30 04:48:32 UTC
Created attachment 50013 [details]
Sample spreadsheet with multiple sheets.
Comment 9 jpryor 2007-11-30 04:53:21 UTC
To reproduce:

1. In Tools -> Options -> OpenOffice.org Calc -> Print, make sure that Print
only selected sheets is selected.

2. Open the attached test.ods file.

3. Select File->Page Preview.  Notice that there are two pages.

4. Close the preview, and select File->Print....  Note that the grayed-out Pages
text box lists "1-2".  Select the Print To File checkbox.  Click OK, and select
a filename, e.g. test.ps.

5. Open test.ps.  It has only one page, thus _not_ matching the output of Page
Preview.
Comment 10 jpryor 2007-11-30 04:55:27 UTC
Created attachment 50014 [details]
Proposed Patch.
Comment 11 jpryor 2007-11-30 04:57:30 UTC
sc-print-selected-sheets.diff is a patch to fix this issue, ensuring that the
Page Preview code and the File->Print dialogs both check the "Print
only selected sheets" setting to ensure consistency with the actual output.
Comment 12 frank 2007-12-03 08:36:55 UTC
Hi Thomas,

as you are working onthe print dialog, this seems to be yours.

Please have a look at the patch and proceed as needed.

Frank
Comment 13 kendy 2007-12-12 14:31:48 UTC
jpryor: Unfortunately the patch does not work (build fails) with m239.  Could 
you please have a look, fix it in ooo-build & attach the new version?
Comment 14 jpryor 2007-12-15 03:53:54 UTC
Created attachment 50330 [details]
sc-print-selected-sheets.diff
Comment 15 jpryor 2007-12-15 04:00:17 UTC
The updated sc-print-selected-sheets.diff patch fixes the following issues:

  * Now applies properly against m239.

  * Behaves properly if the first tab is NOT selected.  (Previously it would 
    always print-preview the first tab, regardless of which tab was selected.)

  * Won't display the "gray screen of nothing" when the Next Page button is 
    pressed.

Alas, there is one problem remaining, which I'm unsure how to fix:
*occasionally*, the Next Page button does NOT disable itself when reaching the
end of the document.

More troubling is that when this happens ScPreviewShell::Execute() is NOT
executed when the button is clicked; normally it IS.

It seems that under some (unknown) condition, the button goes "elsewhere,"
refusing to behave properly.  I currently lack the background to diagnost why
it's misbehaving.
Comment 16 thomas.benisch 2008-05-28 15:11:02 UTC
As discussed with OC set to target OOo 3.x.
Comment 17 thomas.benisch 2010-12-20 16:17:06 UTC
I applied the patch on a DEV300 m94 and found the problem,
that only the current sheet is shown in the preview,
even if more than one sheet is selected.
Comment 18 Rob Weir 2013-03-11 15:05:41 UTC
I'm adding this comment to all open issues with Issue Type == PATCH.  We have 220 such issues, many of them quite old.  I apologize for that.  

We need your help in prioritizing which patches should be integrated into our next release, Apache OpenOffice 4.0.

If you have submitted a patch and think it is applicable for AOO 4.0, please respond with a comment to let us know.

On the other hand, if the patch is no longer relevant, please let us know that as well.

If you have any general questions or want to discuss this further, please send a note to our dev mailing list:  dev@openoffice.apache.org

Thanks!

-Rob
Comment 19 Rainer Bielefeld 2014-06-02 06:44:10 UTC
(a) I doubt that it's common sense that Page preview only should show the
    print result. For that we have the print preview in the print dialog.
(b) On the other hand we do not have such a preview for PDF export, what is a 
    real nuisance. 
(c) LibO 4.2 only shows selected sheets what will be printed.

I do not know the current state of discussion here.
Comment 20 Rainer Bielefeld 2014-06-02 15:55:56 UTC
Additional Info:
(a) There have been some similar reports, partially rejected with reasoning     "Page preview is not a Print preview". May be, but without page preview what respects selected sheets for Print Calc PDF export is not usable  for users who want to Export only particular Tabs.

Example: Spreadhseet with
Sheet 1 introduction
12 Sheets Month of year related contents
Sheet 14 Explications

Try to Export Month (September) related contents with introduction and Explications, you will have to use print dialog to find the pages and then to add wanted pages to PDF export.

(b) If we get a fix for Issue 125027 PDF export dialog needs preview like Print Preview this one might become obsolete, but currently.

(c) Competitors: 
    Only LibO known: Page preview respects selected pages
      But Export does not respect Printer Setting "Only Selected Tabs"
          "Selection only" limits Export to selected Tabs - difficult to 
          understand, but useful for me