Bug 143956 - Writer Templates are in Format Size A4 instead of Letter for Default - English (USA)
Summary: Writer Templates are in Format Size A4 instead of Letter for Default - Englis...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.2 rc
Hardware: All All
: medium enhancement
Assignee: Laurent Balland
URL:
Whiteboard: target:7.4.0 target:7.3.4 target:7.5.0
Keywords:
Depends on:
Blocks: Templates
  Show dependency treegraph
 
Reported: 2021-08-19 15:32 UTC by Eek! A Bug. Kill it!
Modified: 2023-01-05 11:31 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
First set of new templates without page size (87.42 KB, application/zip)
2021-09-02 06:16 UTC, Laurent Balland
Details
New set for Styles templates without page size (29.50 KB, application/zip)
2021-09-03 15:20 UTC, Laurent Balland
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eek! A Bug. Kill it! 2021-08-19 15:32:56 UTC
Description:
With the Language Settings for the User Interface set to Default - English (USA), the Writer Templates are all (except Resume) in Format Size A4 instead of Letter. Additionally, the Page Format Margin settings for Normal (0.75") are incorrect, as the page should be 7" wide with that margin setting--not whatever oddball setting it has had for the past how many ever versions it has been since first reported.

Steps to Reproduce:
Go to File > Templates > Manage Templates.

Actual Results:
All Templates (except Resume) are in A4 Format size instead of Letter Format size for English (USA).

Expected Results:
All Templates in Letter Format size.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.2.0.2 (x64) / LibreOffice Community
Build ID: 614be4f5c67816389257027dc5e56c801a547089
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: default; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 1 Roman Kuznetsov 2021-08-24 14:24:24 UTC
UX-team, should we have many templates sets  for different languages or countries?
Comment 2 Adolfo Jayme Barrientos 2021-08-24 16:41:14 UTC
Yes, we should. This is one important aspect of localization, which in turn creates a better UX for users.

In Mexico we use Letter instead of A4 as well. As a child, when they would teach us to create letters in the computer lab (oh, Windows 98 nostalgia), they would have us change the paper size to Letter and we wouldn’t undestand why that step was necessary. We didn’t even know what “A4” meant lmao
Comment 3 Laurent Balland 2021-08-25 10:02:09 UTC
Page size of bundled templates are defined in XML code of each template:
- CV: https://opengrok.libreoffice.org/xref/core/extras/source/templates/personal/CV/styles.xml#145
- Resume: https://opengrok.libreoffice.org/xref/core/extras/source/templates/personal/Resume1page/styles.xml#137

They are not language dependent.

One solution would be to create 2 templates per template (one A4, one Letter). So user will see twice more templates as previously (18 instead of 9).

Another solution would be to create two "Standard" page styles per template, and user would simply have to change its page style.

Content of these templates are outdated, and English only. They may also be removed. Localization of each template would require a important work for l10n teams.

To have language dependent templates, something similar to autotext should be done... In the old ages of OOo, it used to have language dependent templates.
Comment 4 Heiko Tietze 2021-08-25 12:47:06 UTC
(In reply to Laurent BP from comment #3)
> One solution would be...

How about cleaning up the templates as we do for Impress and remove the page size entry?

> Content of these templates are outdated, and English only.

Fully signed.
Comment 5 Laurent Balland 2021-08-26 08:23:01 UTC
(In reply to Heiko Tietze from comment #4)
> (In reply to Laurent BP from comment #3)
> > One solution would be...
> 
> How about cleaning up the templates as we do for Impress and remove the page
> size entry?
Good trick! It works. I propose a patch, or you do?
Comment 6 Heiko Tietze 2021-08-26 08:26:18 UTC
(In reply to Laurent BP from comment #5)
> Good trick! It works. I propose a patch, or you do?

You did a great job for Impress, looking forward another patch.
Comment 7 Laurent Balland 2021-09-02 06:16:58 UTC
Created attachment 174720 [details]
First set of new templates without page size

Could you test these templates and check that they work as expected: page size is defined according to your locale settings?
Other enhancement are detailed in commit messages [1], [2] and [3]

[1] https://gerrit.libreoffice.org/c/core/+/121130
[2] https://gerrit.libreoffice.org/c/core/+/121175
[3] https://gerrit.libreoffice.org/c/core/+/121267
Comment 8 Laurent Balland 2021-09-03 15:20:30 UTC
Created attachment 174762 [details]
New set for Styles templates without page size

This second file contains 3 templates to replace "styles" Writer templates: Modern, Default and Simple.

Could you test them to check if page size is correctly defined according to your locale settings?

Check [4] for other updates

[4] https://gerrit.libreoffice.org/c/core/+/121610
Comment 9 Laurent Balland 2021-12-04 08:58:16 UTC
Any user feedback?
Simply unzip attachment 174720 [details] and attachment 174762 [details] and open templates to check page size and general behavior of the template. Report here any success or bug.
Comment 10 BogdanB 2021-12-04 11:40:54 UTC
I tested now the CV template and Modern Business Letter and looks good. The format is my locale format, A4, and the language is local one.

What I don't understand is why it is not working Autocorrect if I am typing wrong in my language. Automatic Spell Checking is cheked. I don't know if the bug is from here, or is another thing.

Laurent, please try to write something in your own language in a Template and see if you get autocorrection.

Version: 7.3.0.0.beta1+ / LibreOffice Community
Build ID: 81b26582ed62db40e2be701ddefede7d8230d0d2
CPU threads: 4; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 11 BogdanB 2021-12-04 11:43:19 UTC
The templates you have zip to this bug are working well, even with autocorrection and also with size of the paper. 

I was testing before the default Templates from LibreOffice 7.3. There seems to be a problem.
Comment 12 Commit Notification 2021-12-05 16:40:19 UTC
Laurent BP committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/87882007a1dd90a8f88b06ee20068b413b8ff0fe

tdf#143956 Remove page size of Writer templates

It will be available in 7.4.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 13 Commit Notification 2021-12-05 16:41:30 UTC
Laurent BP committed a patch related to this issue.
It has been pushed to "master":

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

tdf#143956 Remove page size of Writer templates 2

It will be available in 7.4.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-12-05 17:21:15 UTC
Laurent BP committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/19c8404ff66e259787ec28e067c2a5828b7df3be

tdf#143956 Remove page size of Writer templates 4

It will be available in 7.4.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 15 Regina Henschel 2021-12-05 18:24:12 UTC
(In reply to Laurent BP from comment #9)
> Any user feedback?
> Simply unzip attachment 174720 [details] and attachment 174762 [details] and
> open templates to check page size and general behavior of the template.
> Report here any success or bug.

Removing page-layout is bad for interoperability. It leads currently to the situation, that a document, which is based on the so changed template, does not determine the page-layout and therefore an "implementation-dependent" page-layout is used. See bug 70668 for the other way round, where Calligra has this behavior and LibreOffice does not produce the same page layout as Calligra.

Changing the template needs to be accompanied by a change, that the concrete document, which is created from the template, explicitly determines the to be used page-layout so that it has correct layout in other applications.
Comment 16 Laurent Balland 2021-12-05 20:08:37 UTC
(In reply to Regina Henschel from comment #15)
> Changing the template needs to be accompanied by a change, that the concrete
> document, which is created from the template, explicitly determines the to
> be used page-layout so that it has correct layout in other applications.

The document produced with new templates contains its page size: A4 with fr locale, Letter with US locale. The templates are only embedded templates and are not subject to interoperability, contrary to the documents produced with the templates.
Comment 17 Heiko Tietze 2022-03-01 09:08:23 UTC
Removing UX keyword from the assigned ticket. LBP is removing the A4 attribute from shipped templates so whatever the locale default is will be taken.
Comment 18 Commit Notification 2022-04-25 12:38:33 UTC
Laurent BP committed a patch related to this issue.
It has been pushed to "master":

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

tdf#143956 Remove page size from Draw templates

It will be available in 7.4.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 19 Commit Notification 2022-04-26 07:42:51 UTC
Laurent BP committed a patch related to this issue.
It has been pushed to "master":

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

tdf#143956 Remove page size of Writer templates 3

It will be available in 7.4.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 20 Commit Notification 2022-04-30 14:58:47 UTC
Laurent BP committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/8d77ba93d8b2291fe2059e80c2ba71c02547126d

tdf#143956 Remove page size from Draw templates

It will be available in 7.3.4.

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 21 Commit Notification 2022-05-01 16:07:38 UTC
Laurent BP committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/25b8ab957195534ae199776a9f7638a564d77ffb

tdf#143956 Remove page size of Writer templates 3

It will be available in 7.3.4.

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 22 Dennis Schridde 2022-05-14 19:37:47 UTC
(In reply to Laurent BP from comment #3)
> Page size of bundled templates are defined in XML code of each template:
> - CV:
> https://opengrok.libreoffice.org/xref/core/extras/source/templates/personal/
> CV/styles.xml#145
> - Resume:
> https://opengrok.libreoffice.org/xref/core/extras/source/templates/personal/
> Resume1page/styles.xml#137

Where do I find these in my installation of LibreOffice?  I only find /usr/lib64/libreoffice/share/calc/styles.xml on my system, which seems unrelated.  When I create a letter template, it will always be in page size "Letter" instead of "A4" (which would be the correct page size according to my locale).  I would love to get what the original reporter had and always get A4 instead of Letter, but spent hours on this already and I am unable to figure out how to do it.
Comment 25 Dennis Schridde 2022-05-14 20:26:30 UTC
(In reply to himajin100000 from comment #24)
> https://opengrok.libreoffice.org/xref/core/extras/CustomTarget_tplpersonal.
> mk?r=96790035#53

Thanks!  They eventually end up inside (e.g.) /usr/lib64/libreoffice/share/template/common/officorr/Modern_business_letter_serif.ott
Comment 26 Heiko Tietze 2022-05-16 10:00:14 UTC
Latest master still produces Letter sized letter templates while my settings (and consequently File > New) are A4.
Comment 27 Laurent Balland 2022-05-18 17:19:10 UTC
(In reply to Heiko Tietze from comment #26)
> Latest master still produces Letter sized letter templates while my settings
> (and consequently File > New) are A4.

Hi Heiko,
Which template? Which locale settings?
I cannot reproduce with:
- on Linux Unbuntu Version: 7.4.0.0.alpha1+ / LibreOffice Community
Build ID: 190d4adcfd0b8b8de1d8b4f0898040623b3ceb82
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded
- on Windows 10 Version: 7.4.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: b2467d6c7af988f8ed4e090ebf9472be6c84fb06
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: fr-FR (fr_FR); UI: fr-FR
Calc: CL
Comment 28 Heiko Tietze 2022-05-19 06:25:17 UTC
(In reply to Laurent BP from comment #27)
> Which template? Which locale settings?

File > Wizards > Letter creates a new template which page size is letter.

Version: 7.4.0.0.alpha1+ / LibreOffice Community
Build ID: bad6799603f7ec4c6566696c1104a8bcf9fcfdc7
CPU threads: 8; OS: Linux 5.17; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 29 Laurent Balland 2022-05-19 13:17:29 UTC
(In reply to Heiko Tietze from comment #28)
> File > Wizards > Letter creates a new template which page size is letter.

I do reproduce with Wizards documents, because I only modified documents created with File > Templates :-)
You are right, they also need some update. As a user, I never used these wizards and was not aware about them.
Comment 30 Laurent Balland 2022-05-19 13:35:40 UTC
(In reply to Laurent BP from comment #29)
> I do reproduce with Wizards documents
Actually, there are 85 templates used by Wizards... It will need some time to convert them
Comment 32 Eek! A Bug. Kill it! 2022-09-08 05:38:08 UTC
You still have not addressed the issue of the Letter margins being incorrect in the Normal (0.75") setting, which was one of the two issues I pointed out in my bug report. You have to go to the Moderate setting as a temporary fix, but that should not be necessary. One would expect if the setting is for 0.75" margins that that is what they should be set to, not some merely "close but not quite right" setting.
Comment 33 Laurent Balland 2022-09-19 21:12:39 UTC
(In reply to Eek! A Bug. Kill it! from comment #32)
> You still have not addressed the issue of the Letter margins being incorrect
> in the Normal (0.75") setting, which was one of the two issues I pointed out
> in my bug report. You have to go to the Moderate setting as a temporary fix,
> but that should not be necessary. One would expect if the setting is for
> 0.75" margins that that is what they should be set to, not some merely
> "close but not quite right" setting.

Margin seems a different bug. "Normal (0.75'')" are set to 0.79'' with new document, as well as with templates.
Comment 34 Commit Notification 2022-10-11 18:55:53 UTC
Laurent BP committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7d698d505bf7b68d993c9c2246ab517e60106348

tdf#143956 Convert all Wizards template to XML

It will be available in 7.5.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 35 Laurent Balland 2022-10-11 18:58:14 UTC
All page size of templates are now adapted to locale.
Comment 36 Dennis Schridde 2022-10-12 11:45:09 UTC
(In reply to Laurent BP from comment #35)
> All page size of templates are now adapted to locale.

Thank you so much!
Comment 37 Stéphane Guillou (stragu) 2023-01-05 11:31:15 UTC
Verified fix in:

Version: 7.5.0.1 (X86_64) / LibreOffice Community
Build ID: 77cd3d7ad4445740a0c6cf977992dafd8ebad8df
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_AU.UTF-8); UI: en-US
Calc: threaded

Thank you all!