Bug 129180 - UI Print dialog shows incorrect paper size by default
Summary: UI Print dialog shows incorrect paper size by default
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.2.0 target:7.1.1 target:7.0.5
Keywords: bibisected, regression
: 132774 139265 (view as bug list)
Depends on:
Blocks: Print-Dialog
  Show dependency treegraph
 
Reported: 2019-12-04 13:49 UTC by NISZ LibreOffice Team
Modified: 2021-11-08 11:07 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Writer (20.18 KB, application/binary)
2019-12-04 13:53 UTC, NISZ LibreOffice Team
Details
Screenshot of the problem in Writer (104.22 KB, image/png)
2019-12-04 13:54 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2019-12-04 13:49:03 UTC
Description:
Attached example document has C5 page size and some text. When this is printed, the Print dialog shows the page size as A4 in the paper size list, while the preview shows the correct size.

Steps to Reproduce:
1.	Open attached document and try to print it

Actual Results:
The print dialog shows the preview as 162mm by 229mm (correct C5 size) but under Page Layout the Paper size dropdown shows A4.

Expected Results:
The Paper size dropdown should show C5 size.


Reproducible: Always


User Profile Reset: No



Additional Info:
LibreOffice details:
Version: 6.5.0.0.alpha0+ (x64)
Build ID: 0faf74a58847a4b87ae43092fe1ca2011bbd1f90
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: GL; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: CL

Also in:
Verzió: 6.3.0.4 (x86)
Build az.: 057fc023c990d676a43019934386b85b21a9ee99
CPU szálak: 4; OS: Windows 6.3; Felületmegjelenítés: GL; VCL: win; 
Területi beállítások: hu-HU (hu_HU); Felület nyelve: hu-HU
Calc: CL

Before 6.3 there was no Paper size dropdown in the old dialog.
Comment 1 NISZ LibreOffice Team 2019-12-04 13:53:48 UTC
Created attachment 156296 [details]
Example file from Writer
Comment 2 NISZ LibreOffice Team 2019-12-04 13:54:55 UTC
Created attachment 156297 [details]
Screenshot of the problem in Writer
Comment 3 Durgapriyanka 2019-12-04 16:20:27 UTC
Thank you for reporting the bug. I can confirm the bug present in

Version: 6.4.0.0.alpha1+ (x86)
Build ID: ec7374ff84c71edfbb30d6e4dc5b486b6df7107f
CPU threads: 2; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-11-10_21:37:30
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 4 BogdanB 2019-12-07 16:56:55 UTC
Confirm it on:
Version: 6.4.0.0.beta1
Build ID: 4d7e5b0c40ed843384704eca3ce21981d4e98920
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ro-RO (ro_RO.UTF-8); UI-Language: en-US
Calc: threaded

And also on:
Version: 6.5.0.0.alpha0+
Build ID: 5030be4e85179147476b1e441eb618fb6ed58235
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-11-28_20:14:48
Locale: ro-RO (ro_RO.UTF-8); UI-Language: en-US
Calc: threaded

Also on
Version: 6.3.3.2
Build ID: a64200df03143b798afd1ec74a12ab50359878ed
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ro-RO (ro_RO.UTF-8); UI-Language: en-US
Calc: threaded

On 6.2 is OK, but this 6.2 was the old look for printing something.
Not very usefull...
Version: 6.2.7.1
Build ID: 23edc44b61b830b7d749943e020e96f5a7df63bf
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ro-RO (ro_RO.UTF-8); UI-Language: en-US
Calc: threaded
Comment 5 NISZ LibreOffice Team 2020-05-07 07:18:38 UTC
*** Bug 132774 has been marked as a duplicate of this bug. ***
Comment 6 Telesto 2020-07-08 08:38:01 UTC
Adding bibisect request.. maybe it points to something
Comment 7 BogdanB 2020-07-08 08:57:30 UTC
Telesto, I think Print Window was reworked in 6.3, so this problem is from it's start in 6.3.
Comment 8 NISZ LibreOffice Team 2020-07-08 13:14:15 UTC
*** Bug 134646 has been marked as a duplicate of this bug. ***
Comment 9 pavlog 2021-01-07 20:49:17 UTC
Bisected it in win32-6.3. 
First bad commit is c2ee336288dcee103f297a55287fbca596a6c7a1
committer	Tomaž Vajngerl 


 c35e4519af538ca104ccf21fdc04060cf7b4289a is the first bad commit
commit c35e4519af538ca104ccf21fdc04060cf7b4289a
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Wed Dec 5 08:49:16 2018 -0800

    source c2ee336288dcee103f297a55287fbca596a6c7a1

Adding Cc: to <Tomaž Vajngerl>
Comment 10 Justin L 2021-01-19 14:03:33 UTC
Using bibisect-linux-64-6.3, I confirm that at the initial implementation of the new print dialog, both the preview pane's paper size, and the drop-down size were A4.  (However, if you look at the printer properties, it shows C5 paper, and then if you CANCEL, then the dialog updates both places update to C5.)
That bibisects to Daniel Silva's New Print Dialog Design commits:
 78b5211f3464d7374b2888f2078da387f5a01ae6 is the first bad commit
    source bc0146c2ae43256552c276d2dd86291c98556c42
    
    source bc0146c2ae43256552c276d2dd86291c98556c42
    source 6686eaa079f5557d0f3bbe92781ad9854d8a5ef6
    source 86c60a6af62bf50d5a6e7bc59bb29bfc1983584a
    source 8cbdc6a068ad88fc43a98bd0f88fcb7c4ad3ebd9
    source faf2b0f165e9d9e3160e5d54e3d2e9973facf0b8
    source 07e4261ceaea31a20ab2bc1a76df722ed0bd54c4
    source cff219f792085645a13b4a703882a8984ce78ddc
    source b368e4043582e6785a88b444e148fdffdc2aece1
    source b4601ff6d9261d185cd440ebdbca8d78f3b5d459
    source a0f02b8856fce1ee0eb5f1748c7c7fc04bd568a6
    source 952e4a6ffd95b49d421b6477b3f8e33a6550097f
    source e1bb5b2cd8ecc4db760b1d413e28edc388da5c3e
    source ef9e16fd1720249620c628da66ec856a5629ff2a
    source ff4896a2af1df6138e9246fe1588dfe8c3748f1a
    source 1a2ebd24e5daaefa209dea7f4b1889a8295b5794
    source bc34eaa0a87ff89b07581551991ac83d69f64d63
    source 226ede405ed4549b7652c9a8421af37511e0046a
    source 76e22667625ce8d16dfaa8617a199b774e987a70
    source 5c7fb4b4cd9409f8b92a4bb3fe288ba83ced2502
    source cb443d07d54d6698eff51b5be2c6b56323f10315


The print preview paper size was fixed to show C5 in 6.4
author	Gabor Kelemen on 2019-12-12 17:47:50 +0100
commit 8659c42c4a016722cf6418e6ff1cd34bc5bdf88e
tdf#123076 Get paper size for print preview
Initialize from current paper size which can be different from A4
Comment 11 Justin L 2021-01-19 17:09:06 UTC
This can be "solved" a few ways.
One would be to add to PrintDialog::PrintDialog
+ getJobPageSize();
  setPaperSizes();

Or perhaps better would be to tag along with Gabor's patch and setPaperSizes each time it changes (like changing from brochure to pages per sheet).

However, that still won't address that other common sizes (like A5) don't show up, so there can still be a mismatch between the preview and the combobox size. I wonder if "Automatic" can be added to the paper size as well (although that will complicate that option).
Comment 12 NISZ LibreOffice Team 2021-01-19 17:59:35 UTC
*** Bug 139265 has been marked as a duplicate of this bug. ***
Comment 13 Commit Notification 2021-01-26 10:56:27 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3c85bf2af5ae2f7b180db8f8abf2d4e997491bb9

tdf#129180 Fix default paper size in the dropdown

It will be available in 7.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2021-01-27 14:13:35 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/fdb2b760d9fd3b65ad54bad14a62f3c47374731e

tdf#129180 Fix default paper size in the dropdown

It will be available in 7.1.1.

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

Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2021-01-27 19:47:29 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/c06c59ebdc32edfb22e391eeeb5b4838c6b728e6

tdf#129180 Fix default paper size in the dropdown

It will be available in 7.0.5.

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

Affected users are encouraged to test the fix and report feedback.
Comment 16 NISZ LibreOffice Team 2021-02-08 11:41:27 UTC
Verified in
Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 44b914b1e2616ca8f70e896e653a46ca93610234
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded