Bug 98900 - print selection filter does not recalculate statistics against just the selection, so prints with incorrect field data for the whole document
Summary: print selection filter does not recalculate statistics against just the selec...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Fields Print
  Show dependency treegraph
 
Reported: 2016-03-26 09:23 UTC by Paolo Benvenuto
Modified: 2024-03-10 03:15 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
example document (12.07 KB, text/odt)
2016-04-05 12:02 UTC, Timur
Details
selection printed from example document (24.06 KB, application/x-force-download)
2016-04-05 12:02 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Benvenuto 2016-03-26 09:23:24 UTC
I have a multipage document.

If I print with page range, page numbers are printed correctly.

If I select text across pages and print selection only, all pages get last page number.
Comment 1 Timur 2016-03-28 17:28:17 UTC
When reporting a bug you should "Write the expected behavior and the actual behavior", per https://wiki.documentfoundation.org/QA/BugReport
Here there's no expected behavior, so: how else could this be done and why? Maybe page number or header/footer shouldn't be printed at all. 
I tried MSO, it doesn't let you print selection from multiple pages.
Comment 2 Paolo Benvenuto 2016-04-01 13:31:01 UTC
I expect correct page numbers are printed
Comment 3 Timur 2016-04-04 10:46:28 UTC
Please attach a multi-page document, select text across pages and print selection only, and attach image how page numbers should look (you may add not on printscreen). 
The only thing that comes to mind is to have sth. like "1, 3, 7".
Comment 4 Paolo Benvenuto 2016-04-04 11:19:42 UTC
I don't understand, with a document which has 86 pages, the screenshot I could attach simply would have 86 on all pages.

I expect that if the selection goes from page 33 to page 35, the numbers 33, 34, 35 appear on the printed pages
Comment 5 Timur 2016-04-05 12:02:11 UTC
Created attachment 124084 [details]
example document
Comment 6 Timur 2016-04-05 12:02:54 UTC
Created attachment 124085 [details]
selection printed from example document
Comment 7 Timur 2016-04-05 12:07:19 UTC
Instead of page number, say 3, it would be nice if there were "Selection from pages 1, 2, 3" because it's not pages 1, 2, 3 that are printed, but some selection out of them. 
I don't know whether this is possible, so let's wait for someone to confirm.
Comment 8 Robinson Tryon (qubit) 2016-08-25 05:49:44 UTC Comment hidden (obsolete)
Comment 9 Aron Budea 2016-09-18 15:14:08 UTC
I'm not UX, but I think Timur's suggestion from comment 7 makes a lot of sense, so I'm setting this to NEW in the meantime.
Comment 10 Yousuf Philips (jay) (retired) 2016-09-19 02:08:28 UTC
I would assume that it would print brand new pages numbers starting from 1, as a selection has no page boundaries and would likely be similar to copying and pasting that selection into a new document and then printing.
Comment 11 Aron Budea 2016-09-19 02:27:07 UTC
At first I thought it would be cool if each page listed all the pages its content came from, but I understand it's somewhat tricky, and not everyone might like it (not to mention pathological cases, like selecting dozens of lines from different pages).
Starting from 1 seems feasible.
Comment 12 V Stuart Foote 2016-09-19 12:30:06 UTC
(In reply to Yousuf Philips (jay) from comment #10)
> I would assume that it would print brand new pages numbers starting from 1,
> as a selection has no page boundaries and would likely be similar to copying
> and pasting that selection into a new document and then printing.

That would be my expectation as well.

Seems the print selection filter is not correctly handling the Document data fields--rather than recalculating for just the "print selection", it is assigning the values from the entire document.

The page count is from Statistics -> Pages field. The page number is from the Page -> Page numbers--IIUC the page number is a moving pointer to the next page to be assigned at the end of the source document, so end up the same for the print selection.

Find that if fields for other document Statistics are included in the selection--they also are not recalculated to match the selection, and print with incorrect values. So in addition to Pages, at least Paragraphs, Words, and Characters are likewise incorrect for the print selection.
Comment 13 Heiko Tietze 2016-12-29 10:57:12 UTC
When a selection of pages (like 2-3 or 2,4) is printed the page number is exported correctly. So why should a selection start with 1? (And actually it takes the last page number in my test.) The trick is that you can select parts of page 1 and something from page 3 etc., which is combined together into a new page. So I agree with Jay and Stuart that starting new with 1 is the best choice.

Removing needsUX now.
Comment 14 QA Administrators 2017-12-30 03:29:13 UTC Comment hidden (obsolete)
Comment 15 Xisco Faulí 2020-03-09 13:28:44 UTC
Please add keyword 'needsUXEval' and CC 'libreoffice-ux-advise@lists.freedesktop.org' if input from UX is needed.
Comment 16 QA Administrators 2022-03-10 03:44:53 UTC Comment hidden (obsolete)
Comment 17 QA Administrators 2024-03-10 03:15:09 UTC
Dear Paolo Benvenuto,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug