[Libreoffice-bugs] [Bug 116678] New: [FORMATTING, FILESAVE, FILEOPEN] TEXT function format code argument is not properly translated

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Mar 28 09:41:14 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=116678

            Bug ID: 116678
           Summary: [FORMATTING,FILESAVE,FILEOPEN] TEXT function format
                    code argument is not properly translated
           Product: LibreOffice
           Version: 5.4.5.1 release
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: g.dethier at gmail.com

Description:
In LibreOffice Calc 5.4.5.1 with locale fr-BE, when editing an XLS file, the
formula for formatting a date in a cell with TEXT function must be written
TEXTE(DATE(2018;3;28);"aaaamm") when function name translation is not disabled
(which is the default). The equivalent English formula is
TEXT(DATE(2018,3,28),"yyyymm").

However, when saving this to a file and reading it with Apache POI library
(https://poi.apache.org/), the persisted formula is
TEXT(DATE(2018,3,28),"aaaamm") which is OK except for the format string that
has not been translated into "yyyymm".

Using directly the English format code ("yyyymm") prevents the date to be
properly formatted in LibreOffice but leads to the persistence of the right
formula in the file.

I would expect that:

1. TEXTE(DATE(2018;3;28);"aaaamm") (or whatever internationalized equivalent)
is properly persisted as TEXT(DATE(2018;3;28);"yyyymm")
2. Disabling function name translation also disables format code translation
(i.e. "yyyymm" becomes a valid format code)

Note that a possible workaround is to change the locale of LibreOffice to
English via Menu > Options > Language Settings.

Steps to Reproduce:
1. In LibreOffice Calc 5.4.5.1 with fr-BE locale, format a date using TEXT
function e.g. TEXTE(DATE(2018;3;28);"aaaamm") or TEXT(DATE(2018;3;28);"aaaamm")
without function name translation.
2. Save the file
3. Change LibreOffice locale to en-US
4. Open the file and see that formatting does not work as expected

Actual Results:  
Cell contains text Wednesday01

Expected Results:
Cell should contain text 201803


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 5.4.5.1
Build ID: 1:5.4.5-0ubuntu0.17.10.5
Threads CPU : 4; OS : Linux 4.13; UI Render : par défaut; VCL : gtk3; 
Locale : en-US (fr_BE.UTF-8); Calc: group


User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:59.0) Gecko/20100101
Firefox/59.0

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180328/7b940d6b/attachment-0001.html>


More information about the Libreoffice-bugs mailing list