Bug 97505 - From Print Preview mode, Print dialog "Pages" field not adjusted when blank pages are suppressed
Summary: From Print Preview mode, Print dialog "Pages" field not adjusted when blank p...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-02 13:59 UTC by V Stuart Foote
Modified: 2016-10-25 19:11 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
test merge document 3page 3sets, auto blanks between (24.46 KB, application/vnd.oasis.opendocument.text)
2016-02-02 14:03 UTC, V Stuart Foote
Details
print dialog picking up page count from preview (54.90 KB, image/png)
2016-02-02 14:04 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description V Stuart Foote 2016-02-02 13:59:46 UTC
In testing enhancement of bug 89708 MAILMERGE: Add option to prevent inserting extra blank pages

Opening the print dialog from the print preview mode (Print button or Ctrl+P) the dialog opens with preview at first page--but the Range and Copies "Pages" field keeps the page from the preview mode, where counts still include the blank pages.

Sample 11 page merge document attached. 3 sets of 3 pages and 2 blanks separators.

STR

1. Open test "mail merge" document
2. Unckeck Tools -> Options -> Writer -> Print: Other "Print automatically inserted blank pages"
3. enter Print preview mode button on Standard toolbar (or <Ctrl><Shit>+O)
4. select "To document End button" on Print Preview toolbar (or <Ctrl><End>)
5. preview mode canvas shows "Page 3 11 / 11"
6. launch Print dialog button (or <Ctrl>+P)

Print dialog preview shows page 1 of 9 that will print. Range and copies "All pages" radio button is selected. But the "Pages" field shows 11--while 11 is the correct 3rd page of the 3rd document--it is really page 9 of the print.

Believe that when "Print automatically inserted blank pages" is unchecked, the dialog should be cleared rather than have an invalid page.
Comment 1 V Stuart Foote 2016-02-02 14:03:39 UTC
Created attachment 122328 [details]
test merge document 3page 3sets, auto blanks between
Comment 2 V Stuart Foote 2016-02-02 14:04:42 UTC
Created attachment 122329 [details]
print dialog picking up page count from preview
Comment 3 V Stuart Foote 2016-02-02 14:15:34 UTC
The other case--Print dialog launched from "Normal" Writer view--does not pass through the blank page counts.

So if on page 11 of the document, print dialog opens with "Pages" field showing 9.

Similar adjustment for automatic blank pages is not made for "Print Preview" mode.
Comment 4 Commit Notification 2016-02-02 18:03:45 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bb01d7bc50e59eb30c0826a000ede52b93074f75

tdf#97505 Account empty pages for print preview

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 V Stuart Foote 2016-02-03 13:54:22 UTC
On Windows 10 Pro 64-bit en-US with
Version: 5.2.0.0.alpha0+
Build ID: 32096592fcf067d50e22090135b542325f5e3e62
CPU Threads: 8; OS Version: Windows 6.19; UI Render: GL; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-02-02_23:59:30
Locale: en-US (en_US)

Behavior of Print dialog launched from Writer "Print Preview" mode now matches that of the Print dialog launched from Writer "Normal" view.  

When "PrintEmptyPages" is set false, count of pages are adjusted as done for bug 89708

Thanks!