Download it now!
Bug 80220 - automatic date-style is replaced on document load
Summary: automatic date-style is replaced on document load
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
Depends on:
Reported: 2014-06-19 09:06 UTC by Wahrendorff
Modified: 2016-09-20 11:32 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:

ODT and content.xml before and after reopening it in Writer (16.14 KB, application/zip)
2014-06-19 09:06 UTC, Wahrendorff

Note You need to log in before you can comment on or make changes to this bug.
Description Wahrendorff 2014-06-19 09:06:50 UTC
Created attachment 101347 [details]
ODT and content.xml before and after reopening it in Writer

In a german environment i try to embed a specifically formatted Date with EN-US locale using a Field>Formula and a language-setting of EN-US.

At first I seem to succeed (exact procedure see below) but when i save the document and open it again, the language-setting of my field has changed to 'automatic' and my special format is gone.

When I close Writer, open the document again and save it again and compare the two 'content.xml' files, i notice that the first content.xml contains an automatic date-style for my format while in the second one it is gone.

So it seems to me, that on opening the ODT, Writer 'optimizes' away my date-style.
Comment 1 Wahrendorff 2014-06-19 09:33:12 UTC

You might need to use a different language where i have used 'English(USA)' if you are in an american english environment.

1) create a new Writer Document
2) write a little Text
3) select all by pressing ctrl-a
4) Under Format>Text choose Language English(USA)
5) Under Extras>Language>Whole Text choose English(USA)
6) Place cursor anywhere inside text 
7) Insert>Field>other>variable>Formula
8)    Value: 0
9)    Format>other formats
10)      Language: English(USA)
11)      Category: Date
12)      Format: December 31, 1999
13)   Leave 'other formats' by pressing 'ok'
14) 'insert' formula into text and press 'close'
15) Save the document and close Writer
16) By unzipping the document verify that it contains the correct automatic date-style in content.xml ("N10076" in my case)

17) reopen the document in Writer
18) do a 'no change' to make it saveable again (insert a blank and delete it again)
19) Save the document and close Writer
20) By unzipping the document verify that it does not contains the correct automatic date-style anymore in content.xml. Instead there is a standard date-style without language and country ("N76" in my case)

After step 17) one could edit the formula, go to 'other formats' and see that the language has changed to 'automatic'

Please note that
* a simple 'Date'-Field will not be sufficient for our usecase due to calculations
* The document is edited, saved and reopend many times before finally evaluating all fields.
Comment 2 Nino 2014-06-25 09:01:33 UTC
Although I don't know what you mean in step 4 (there is no "Format > Text" in my installation) I'm able to reproduce the behavior with Build ID: 9ed0c4329cf13f882dab0ee8b9ecd7b05e4aafbb (Linux rpm x64)

==> changing to NEW
Comment 3 QA Administrators 2015-07-18 17:44:00 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2016-09-20 10:18:09 UTC Comment hidden (obsolete)
Comment 5 Wahrendorff 2016-09-20 11:32:09 UTC
I checked this again with 

Build-ID: 1:5.1.4-0ubuntu1

and now the date-style is preserved.

If somebody wants to reproduce, the language Settings for Text are now under Extras, so Step 4) would be Extras>Language>Selected Text : choose English (USA)