Bug 111423 - Page format not changing to "User" upon small change in page width
Summary: Page format not changing to "User" upon small change in page width
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: x86-64 (AMD64) All
: low trivial
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval, preBibisect, regression
Depends on:
Blocks:
 
Reported: 2017-08-06 21:57 UTC by Andy M
Modified: 2021-02-22 08:12 UTC (History)
4 users (show)

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 Andy M 2017-08-06 21:57:07 UTC
Description:
A small change to the width isn't changing the format from "Letter" to "User". 

(Presumably a rounding error when comparing floats.)

Steps to Reproduce:
1. Open LibreOffice and create new Writer doc
2. Add some text
3. Format->Page and open the Page tab
4. (Letter Format is set by default)
5. Click the up arrow to change the width from "21.59 cm" to "21.60 cm"


Actual Results:  
The Format dropdown remains at "Letter".

Expected Results:
The Format dropdown should change to "User".


Reproducible: Always

User Profile Reset: No

Additional Info:
Version: 5.4.0.3
Build ID: 7556cbc6811c9d992f4064ab9287069087d7f62c
CPU threads: 8; OS: Mac OS X 10.12.6; UI render: default; 
Locale: en-CA (en_CA.UTF-8); Calc: group


User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0
Comment 1 Alex Thurgood 2017-08-07 08:34:34 UTC
@Andy : Letter format is only the default for certain locale / language versions of LibreOffice. Does this also occur in other locale environments, where the default page size is A4 for example ?
Comment 2 Alex Thurgood 2017-08-07 08:38:56 UTC
For example, testing with 

Version: 6.0.0.0.alpha0+
Build ID: 4dd34cd4b829bdc1679b11f19e957313f11620cd
CPU threads: 4; OS: Mac OS X 10.12.6; UI render: default; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group

where A4 is the default page size, I can not reproduce the issue. As soon as I modify the default page dimension either horizontally or vertically, the PageSize dropdown gets set to user.

To me, this problems seems limited to en-US and en-Ca versions of LibreOffice where the default page size is Letter. This might tie in to the printing problems encountered with the same locale versions and default page size.
Comment 3 Andy M 2017-08-07 13:07:53 UTC
Thanks Alex.

I'm not sure reading your response if you set it to Letter and tried to reproduce? I think you should be able to reproduce this by using version 5.4.0 and just setting it to Letter in step 4 and do step 5.

To me it looks like a rounding issue with the contents of the dropdown.

A4 is 21.00 and 29.70, but letter is 21.59 and 27.94.

Clicking the up arrow changes 21.59 to 21.60. My guess is that the code that's checking for a change to a non-standard size is rounding during the comparison to items in the list (i.e. it thinks 21.59 and 21.60 are the same, so it stays on Letter).
Comment 4 Al Maloney 2017-08-08 01:25:37 UTC
On Mac OS 10.12.6, using

Version: 5.4.0.3
Build ID: 7556cbc6811c9d992f4064ab9287069087d7f62c
CPU threads: 4; OS: Mac OS X 10.12.6; UI render: default; 
Locale: en-CA (en_US.UTF-8);

When I change the width of Letter size by .01 increments
- 21.62 or greater - the name changes to User
- 21.56 or less - the name changes to User
- the range 21.57 to 21.61 - the name stays as Letter
Comment 5 Alex Thurgood 2017-08-09 15:11:03 UTC
Confirming Al's findings in comment 4 with

Version: 6.0.0.0.alpha0+
Build ID: 9f2a105aa1467224b662980f6d1c4a42e5d8bdfe
CPU threads: 4; OS: Mac OS X 10.12.6; UI render: default; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group

Let's confirm this bug - if it is a rounding error, then it should be fixed, if it is a UI synchronisation error then that should also be fixed.
Comment 6 Alex Thurgood 2017-08-09 15:12:44 UTC
If someone could test with earlier versions we might be able to determine whether it is also a regression.
Comment 7 Al Maloney 2017-08-09 19:58:55 UTC
Alex
I find the same issue with

Version: 5.3.4.2
Build ID: f82d347ccc0be322489bf7da61d7e4ad13fe2ff3
CPU Threads: 4; OS Version: Mac OS X 10.12.6; UI Render: default; Layout Engine: new; 
Locale: en-CA (en_US.UTF-8); Calc: group

Version: 5.2.7.2
Build ID: 2b7f1e640c46ceb28adf43ee075a6e8b8439ed10
CPU Threads: 4; OS Version: Mac OS X 10.12.6; UI Render: default; 
Locale: en-CA (en_US.UTF-8
Comment 8 Al Maloney 2017-08-21 08:32:33 UTC
On Mac OS X 10.12.6

Using
Version: 5.4.1.1
Build ID: a5be49f0c45fe24a575c7f41559aa8fc79a781a2
CPU threads: 4; OS: Mac OS X 10.12.6; UI render: default; 
Locale: en-CA (en_US.UTF-8); Calc: group

Changing the Width or the Height size by .01 cm increments for other Paper Formats (eg A4, Legal, Japanese Postcard) one can reproduce the problem.
Comment 9 QA Administrators 2018-08-22 02:36:06 UTC Comment hidden (obsolete)
Comment 10 Andy M 2018-08-22 03:40:11 UTC
This is still reproducible using the steps in the first comment.

Version: 6.1.0.3
Build ID: efb621ed25068d70781dc026f7e9c5187a4decd1
CPU threads: 8; OS: Mac OS X 10.12.6; UI render: default; 
Locale: en-CA (en_CA.UTF-8); Calc: group threaded
Comment 11 Richard Chen 2018-11-29 09:21:36 UTC
Bug not reproducible in version

Version: 6.3.0.0.alpha0+ (x64)
Build ID: 0f25a3c36f27fd51453b9a9115f236b83c143684
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-11-27_20:06:55
Locale: zh-TW (zh_TW); UI-Language: en-US
Calc: threaded
Comment 12 QA Administrators 2019-11-30 03:40:35 UTC Comment hidden (obsolete)
Comment 13 eisa01 2020-02-16 00:22:10 UTC
Ok, so this is still present, and also on Windows

My native unit is inches, so there's no problem with changing the Letter size

But, selecting A4 and changing the height from 11.69 accepts also 11.70 as A4

LO 3.3 only accepts 11.69 as A4, so this would be a regression

Version: 6.4.0.3 (x64)
Build ID: b0a288ab3d2d4774cb44b62f04d5d28733ac6df8
CPU threads: 2; OS: Windows 10.0 Build 18363; UI render: default; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 14 Buovjaga 2020-05-03 19:25:39 UTC
(In reply to eisa01 from comment #13)
> But, selecting A4 and changing the height from 11.69 accepts also 11.70 as A4
> 
> LO 3.3 only accepts 11.69 as A4, so this would be a regression

Already seen in the oldest commit of Linux 43all bibisect repo, so can not be bibisected.
Comment 15 Justin L 2021-02-15 13:52:09 UTC
I'm a bit puzzled why anyone would care if such a minor difference is size is ignored.

In any case, this is intentional, via i18nutil/source/utility/paper.cxx's
void PaperInfo::doSloppyFit(bool bAlsoTryRotated)

Obviously, requiring overly specific sizes is also problematic. This function was added along with lots of other "stuff" in
commit 4a3b7bff01e0e97e88f7718314208c4c7d262276
Author: Ivo Hinkelmann
Date:   Fri Jun 12 09:36:34 2009 +0000
    CWS-TOOLING: integrate CWS unifypaper01
Comment 16 eisa01 2021-02-21 20:19:55 UTC
Let's get the opinion of the UX team given comment #15
Comment 17 Heiko Tietze 2021-02-22 08:12:00 UTC
Following Justin's comment 15 it's by design => NAB

(For A4, I can a range of 3mm. With inch the input precision (or the algorithm?) doesn't allow me to modify the size by less 0.01 and I get immediately a user format. MAXSLOPPY is defined as 21, likely TWIPS = 0.37mm/0.01".)