Download it now!
Bug 102204 - Default set locale doesnt set page size according to locale settings (see comment 5)
Summary: Default set locale doesnt set page size according to locale settings (see com...
Status: CLOSED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Eike Rathke
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Page User-Locale
  Show dependency treegraph
 
Reported: 2016-09-15 10:15 UTC by herve
Modified: 2017-11-22 15:34 UTC (History)
5 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 herve 2016-09-15 10:15:21 UTC
Hello,

Running LibreOffice fresh 5.2.1.2 on an ArchLinux configured in French:

$ locale
LANG=fr_FR.UTF-8
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=fr_FR.UTF-8

The package extra/libreoffice-fresh-fr is installed too.

LibreOffice interface is in French, assert by the About dialog too: "Locale : fr-FR (fr_FR.UTF-8)"

In Options > Language Parameters (I guess it's the name in English), the default language is "French (France)" everywhere.

And yet new documents use the Letter format, from the US and Canada. Whether I open a new document by launching Writer directly or I click on "Writer Document" in that interface when all documents are closed (not sure about its name).

Searching the Web I found I could edit the model name "Default" but it indeed uses the A4 format. When I specifically create a new document from that default model, the document is in A4 format.

I could reproduce it when reverting to LibreOffice still 5.1.5.

The only way I found is to create a new document, fix the page format and save that document as a model with the name "Default". I guess it takes precedence.

But I thought I should report this issue.
Comment 1 Julien Nabet 2016-09-17 17:24:45 UTC
On pc Debian x86-64 with LO Debian package 5.2.1.2 + brand new LO profile, I don't reproduce this.
I launched Writer, Menu Format, Page..., Page Tab => Format A4

locale
LANG=fr_FR.UTF-8
LANGUAGE=
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=

Version: 5.2.1.2
Build ID: 1:5.2.1-1
Threads CPU : 4; Version de l'OS :Linux 4.6; UI Render : par défaut; 
Locale : fr-FR (fr_FR.UTF-8); Calc: group

For the test, could you rename your LO directory profile (see https://wiki.documentfoundation.org/UserProfile#GNU.2FLinux) and give a new try?
Comment 2 herve 2016-09-18 17:32:37 UTC
I did and Writer still opens on a Letter page.

In any doubt, I even erased ~/.config/libreoffice/ but still the same.

And of course properly closing LO between each try.
Comment 3 Yousuf Philips (jay) (retired) 2016-10-19 18:39:09 UTC
Hi Herve,

Thank you for reporting the bug. If you want all your documents to start with a particular page size, you can easily do so by creating a new default template. The following video demonstrates how to do so. If this doesnt solve your issue, please make a screencast of the steps you were trying to do to solve your issue with simplescreenrecorder, kazam or any other screencast app.

https://www.youtube.com/watch?v=EqjMjJHNT7Y
Comment 4 herve 2016-10-23 08:15:34 UTC
(In reply to Yousuf Philips (jay) from comment #3)
> Hi Herve,
> 
> Thank you for reporting the bug. If you want all your documents to start
> with a particular page size, you can easily do so by creating a new default
> template. The following video demonstrates how to do so. If this doesnt
> solve your issue, please make a screencast of the steps you were trying to
> do to solve your issue with simplescreenrecorder, kazam or any other
> screencast app.
> 
> https://www.youtube.com/watch?v=EqjMjJHNT7Y

Hi,

I think you lost the point of my report. I don't want my documents to start with a particular page size. I want them to start with the default and standard page size of my country and language, like it always worked when I was on Archlinux years ago, like it worked when I was previously on Mac. And there is no reason it should not work now I have come back to Archlinux.

I'm still not sure the issue is on my system configuration where it lacks some flag to say it's French, or in LibreOffice that is broken or troubled somehow.

But in any case, the standard in France is A4, not Letter.
Comment 5 Yousuf Philips (jay) (retired) 2016-10-23 15:56:05 UTC
Hi herve,

So i changed the locale language setting in the options dialog on my 5.2 daily build and the page size is A4. So i cant reproduce your issue.

Version: 5.2.3.0.0+
Build ID: a3218c2737fb3d78989e470991b1c712fc3a4275
CPU Threads: 2; OS Version: Linux 3.19; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:libreoffice-5-2, Time: 2016-09-23_09:38:39
Locale: fr-FR (en_US.UTF-8); Calc: group

I did notice a strange behaviour that if the locale is set to 'Default' it doesnt pull in the correct page size. I think this maybe the cause of your problem, so set to 'French (France)' and not 'Default - French (France)'.

How this issue looked for me.
"Local setting: Default - English (USA)" - A4 page size
"Local setting: English (USA)" - Letter page size
Comment 6 herve 2016-10-23 17:32:42 UTC
You were right, setting the locale explicitly to "French (France)" fixed up the page size to A4 on new documents.

I'm not sure how to continue from now. From my point of view, the issue is fixed. You may close this report as resolved, requalify it on that default vs. explicit locale setting issue, or open a brand new report to follow that issue.
Comment 7 Yousuf Philips (jay) (retired) 2016-10-23 18:05:50 UTC
Glad my guess was correct herve and your issue is solved with this workaround, but we still need to fix the underlying issue, so people dont have to relay on the workaround.
Comment 8 Danny Schneider 2017-11-08 23:10:33 UTC
Think I can confirm this bug as I suffer from the same/similar Problem

all Programms use A4, only LO always comes up with US Letter,
setting "default" template to default for writer changed behaviour: new writer docs now are A4 also, calc, impress, draw still US Letter

my system is archlinux with Xfce Desktop

locale
LANG=de_DE.utf8
LC_CTYPE="de_DE.utf8"
LC_NUMERIC=en_DK.utf8
LC_TIME=en_DK.utf8
LC_COLLATE="de_DE.utf8"
LC_MONETARY="de_DE.utf8"
LC_MESSAGES="de_DE.utf8"
LC_PAPER="de_DE.utf8"
LC_NAME="de_DE.utf8"
LC_ADDRESS="de_DE.utf8"
LC_TELEPHONE="de_DE.utf8"
LC_MEASUREMENT="de_DE.utf8"
LC_IDENTIFICATION="de_DE.utf8"
LC_ALL=

localectl status
   System Locale: LANG=de_DE.utf8
                  LC_NUMERIC=en_DK.utf8
                  LC_TIME=en_DK.utf8
       VC Keymap: de-latin1-nodeadkeys
      X11 Layout: n/a

fyi: discussion on ask.libreoffice.org
https://ask.libreoffice.org/en/question/137308/how-to-force-a-default-page-size/
Comment 9 Yousuf Philips (jay) (retired) 2017-11-09 09:07:11 UTC
Maxim, Stuart: Can you give your input on this one.
Comment 10 Danny Schneider 2017-11-14 20:34:35 UTC
Hello again,

Just re-read this Bug & Comments briefly. Now I understand your Comment...

"I did notice a strange behaviour that if the locale is set to 'Default' it doesnt pull in the correct page size. I think this maybe the cause of your problem, so set to 'French (France)' and not 'Default - French (France)'."

And really - IT WORKS.

just switched my LO from "Standard - German" to "German (German)" in the Options dialog, and it works nicely!

But no normal User will ever be able to figure this out! (normal (sane) people won't dig in bugtrackers in their spare time, I suppose).

So for me - thanks for your work!
Comment 11 Eike Rathke 2017-11-15 19:53:00 UTC
Investigating.
Comment 12 Caolán McNamara 2017-11-15 20:45:31 UTC
are these systems with paperconf installed ?, i.e. what is the output, if any, of 

paperconf
Comment 13 Yousuf Philips (jay) (retired) 2017-11-15 21:04:13 UTC
(In reply to Caolán McNamara from comment #12)
> are these systems with paperconf installed ?, i.e. what is the output, if
> any, of 

Mine says a4.
Comment 14 Eike Rathke 2017-11-15 21:29:23 UTC
In the "Default - ..." locale setting case the paperconf utility is asked, which could explain. May it be that for all who can reproduce this, executing paperconf reports an unexpected paper size? Just run it on a shell command line like this:

paperconf
  => your default paper size (man 1 paperconf)

LC_PAPER=fr_FR paperconf
a4

LC_PAPER=de_DE paperconf
a4

LC_PAPER=en_US paperconf
letter


Note that the output of the locale command and content of LC_PAPER may be completely irrelevant on some systems and paperconf uses the value from /etc/papersize if the PAPERSIZE (and PAPERCONF) variables are not defined. This for example is the case on Debian (strech) but not on Fedora (F26) which respects LC_PAPER as well. Read man paperconf.

A viable workaround for all should be to set the PAPERSIZE variable, e.g.
PAPERSIZE=a4;export PAPERSIZE
Comment 15 Eike Rathke 2017-11-15 21:46:20 UTC
Actually I think we should always ask paperconf first, and only if it fails fall back to any locale dependent chains (LC_PAPER, LO locale, system locale in that order). If I change LO locale I do not expect the paper in my printer to change..
Comment 16 herve 2017-11-16 12:38:10 UTC
$ paperconf
letter

Altough the locale is French:

$ locale   
LANG=fr_FR.UTF-8
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=fr_FR.UTF-8


(I'm the OP.)
Comment 17 Eike Rathke 2017-11-16 23:26:05 UTC
So yes, that confirms. You should get the desired behaviour if you set PAPERSIZE=a4
Comment 18 Eike Rathke 2017-11-22 14:56:49 UTC
Or for a permanent correction change the value in /etc/papersize
Comment 19 Eike Rathke 2017-11-22 15:34:12 UTC
For Debian based systems this is an old story, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=376350

For Ubuntu there was https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/1130690, citing from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=376350 the solution there is
"
When a user sets LC_PAPER from an UI,
PAPERSIZE is set as well. When LC_PAPER is set in /etc/default/locale,
/etc/papersize is updated accordingly.
"

Our approach to ask (if available) paperconf first if the LibreOffice locale is set to Default is exactly what would be expected for a correctly configured system.
Closing notourbug.