Bug 146045 - Print preview is off B5 (JIS) shows up as 176mmx216mm print preview
Summary: Print preview is off B5 (JIS) shows up as 176mmx216mm print preview
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Print-Dialog
  Show dependency treegraph
 
Reported: 2021-12-04 13:40 UTC by Telesto
Modified: 2021-12-13 16:25 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (12.04 KB, application/vnd.oasis.opendocument.text)
2021-12-04 16:23 UTC, Telesto
Details
Screenshot (65.14 KB, image/jpeg)
2021-12-04 16:23 UTC, Telesto
Details
Screencast (866.55 KB, video/mp4)
2021-12-08 09:40 UTC, Telesto
Details
Screencast of 6.2 (446.62 KB, video/mp4)
2021-12-08 09:45 UTC, Telesto
Details
Screencast 6.2 (951.57 KB, video/mp4)
2021-12-08 09:56 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-12-04 13:40:00 UTC
Description:
Print preview is off B5 (JIS) shows up as 176mmx216mm print preview

Steps to Reproduce:
1. open the attached file
2. Press Print button -> look at the preview

Motivation: bug 145354 

Actual Results:
176mmx216mm

Expected Results:
B5 jis?


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: ddc57169ac8d1de00403dbb09fef5221beaa0f3d
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2021-12-04 13:41:38 UTC
Still fine in
Version: 7.0.0.0.beta1+ (x64)
Build ID: 2891e91a513520d68ea2b8c59c14335861a15253
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 2 raal 2021-12-04 15:28:18 UTC
Please attach test file. Thanks
Comment 3 Telesto 2021-12-04 16:23:18 UTC
Created attachment 176695 [details]
Example file
Comment 4 Telesto 2021-12-04 16:23:57 UTC
Created attachment 176696 [details]
Screenshot
Comment 5 raal 2021-12-04 17:29:38 UTC
Confirm in 7.4
Comment 6 raal 2021-12-04 17:41:25 UTC
This seems to have begun at the below commit.
Adding Cc: to Tor Lillqvist; Could you possibly take a look at this one?
Thanks
 19ea678fa97b7b603e87c7216fb98e2e1bc7a185 is the first bad commit
commit 19ea678fa97b7b603e87c7216fb98e2e1bc7a185
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Wed Nov 3 12:34:45 2021 +0100

    source 65081542d2dabdf17820d62abdc5a22d3734e52d

https://git.libreoffice.org/core/+/65081542d2dabdf17820d62abdc5a22d3734e52d
tdf#145354: Ensure displayed paper name matches displayed paper dimensions
Comment 7 How can I remove my account? 2021-12-04 19:49:28 UTC
I hate printing. It just is not possible to make it work. Feel free to revert anything I have done that concerns printing. I don't want to touch it any more.
Comment 8 Telesto 2021-12-04 23:27:34 UTC
(In reply to Tor Lillqvist from comment #7)
> I hate printing. It just is not possible to make it work.
I still love printing; I hate the dialog & code ;-) And well a lot of developers struggled had that experience already.. 

> Feel free to revert anything I have done that concerns printing. I don't want to touch it any more.
Based on the commit message and the experience with previous developers working on this, I would opt for a revert. Less is more here. I actually distrust any commit made regarding paper size and stuff since the commit for bug 91362 (including the commit of bug 91362 itself ;-) 

Plenty of developers have tried to fix-up issues after that, without much of success. So the code is bad, and probably polluted even more by developers not realizing how screwed the code actually is.

I still don't push commits. 
Should I actually ask someone else to arrange the revert? Like Xisco. Or is this more the temporal frustration speaking; I don't touch that area of the code anymore...
Comment 9 How can I remove my account? 2021-12-04 23:53:33 UTC
Yep, I will revert 65081542d2dabdf17820d62abdc5a22d3734e52d . https://gerrit.libreoffice.org/c/core/+/126373
Comment 10 Telesto 2021-12-08 09:40:18 UTC
Created attachment 176789 [details]
Screencast

Well horribly broken it is after the revert all sorts of page sizes and orientations in the preview for different printers. See screencast

In different shapes and forms, but also in 6.3. In 6.2 everything less insane (still broken, though)
Comment 11 Telesto 2021-12-08 09:45:27 UTC
Created attachment 176790 [details]
Screencast of 6.2

Predictable but switching between B5 ISO and B5 JIS depending.. Not sure if this a feature or bug. The printer might support or B5 or B5 JIS?

Same behaviour in 3.5.7.2
Comment 12 Telesto 2021-12-08 09:56:11 UTC
Created attachment 176791 [details]
Screencast 6.2

Testing how print preview reacts on a number of different paper sizes for various printers.. Apparently driver implementation and support page sizes matter for preview results?
Comment 13 Justin L 2021-12-09 11:18:22 UTC
(In reply to Tor Lillqvist from comment #9)
> Yep, I will revert 65081542d2dabdf17820d62abdc5a22d3734e52d .
> https://gerrit.libreoffice.org/c/core/+/126373

Done on Dec 6 for LO 7.4.
commit d2ca15952de167b6236139d53f6757a7c0d22d0a
author	Tor Lillqvist on Mon Dec 06 12:55:35 2021 +0100
    Revert "tdf#145354: Ensure displayed paper name matches displayed paper ..."

    It causes tdf#146045.

    This reverts commit 65081542d2dabdf17820d62abdc5a22d3734e52d


So LO 7.3 is still affected at this point. I initiated a backport.
Comment 14 Telesto 2021-12-09 11:26:09 UTC
(In reply to Justin L from comment #13)
> So LO 7.3 is still affected at this point. I initiated a backport.

FWIW; it might actually be bit better with the patch present, after the revert is big mess (which was actually the case for some time, though. Needs a bibisect with 6.3 repro
Comment 15 Justin L 2021-12-11 06:46:11 UTC
(In reply to Justin L from comment #13)
> So LO 7.3 is still affected at this point. I initiated a backport.
merged.