Bug 114684 - Entering invalid print range (with two hyphenated numbers greater than max page number) prints last page
Summary: Entering invalid print range (with two hyphenated numbers greater than max pa...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:6.1.0
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-25 00:37 UTC by Mike Kaganski
Modified: 2017-12-25 09:04 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2017-12-25 00:37:19 UTC
If in print dialog, one enters too big page number as a single page (say, 20 for 10-paged document), nothing would print, and no preview visible ("No pages" text shown).

If, however, one enters a range of two numbers separated by hyphen, both of which are too big (say, 30-40 for said 10-paged document), then last document page is displayed in preview and printed.

The same is true for open range (30-), and for too small numbers (like 0-0, and -0).

Expected behaviour is that ranges that entirely are outside of possible pages range must not create print output.
Comment 1 Mike Kaganski 2017-12-25 00:48:23 UTC
A patch is submitted to gerrit: https://gerrit.libreoffice.org/47052
Comment 2 Commit Notification 2017-12-25 09:03:40 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#114684: don't print pages for ranges completely outside ...

It will be available in 6.1.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.