Apache OpenOffice (AOO) Bugzilla – Issue 45497
Page Preview does not respect "print only selected sheets"
Last modified: 2014-07-11 15:36:58 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.
One for the requirements team as this is not a bug
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).
*** Issue 48531 has been marked as a duplicate of this issue. ***
I think this is a dup of #28417 yes ?
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 ***
In my point of view, issue 22762 describes a different problem.
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.
Created attachment 50013 [details] Sample spreadsheet with multiple sheets.
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.
Created attachment 50014 [details] Proposed Patch.
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.
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
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?
Created attachment 50330 [details] sc-print-selected-sheets.diff
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.
As discussed with OC set to target OOo 3.x.
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.
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
(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.
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