Bug 157232 - Writer EDITING: type dot not permitted in field name starting with numeric value
Summary: Writer EDITING: type dot not permitted in field name starting with numeric value
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL: https://ask.libreoffice.org/t/type-do...
Whiteboard:
Keywords: preBibisect, regression
Depends on:
Blocks: Fields-Variable
  Show dependency treegraph
 
Reported: 2023-09-14 07:34 UTC by Nicholas
Modified: 2023-09-28 15:59 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 Nicholas 2023-09-14 07:34:07 UTC
Description:
As of LibreOffice Writer version 7.5.6 I cannot declare a new user field with the name starting with a number and containing a dot, e.g. “111.”, “0.”, etc. If instead I try to declare a new variable with the name that starts with a character and contains a dot it works, e.g. “f.aaa”, “aa11.aa11”, etc.

I would like to declare a user field variable with a name similar to "01.myvariable".

Is there a reason why you can no longer use variable names that start with a number and contain a dot?

Steps to Reproduce:
1. open Writer
2. open Fields dialog (ctrl+F2 or Insert → Field → More Fields)
3. in Type section select User Field
4. in Name try to insert a number followed by dot (type 0.)
5. when you type the dot, the Name is erased
6. in Name try to insert a char followed by dot (type a.)
7. the Name value is correct, “a.”

Actual Results:
When typing "1." the result is "1"
When typing "a." the result is "a."

Expected Results:
When typing "1." the result is "1."


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.5.6.2 (X86_64) / LibreOffice Community
Build ID: 50(Build:2)
CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: es-MX (it_IT.UTF-8); UI: en-US
Ubuntu package version: 4:7.5.6~rc2-0ubuntu0.22.04.1~lo1
Calc: threaded
Comment 1 LeroyG 2023-09-14 23:01:14 UTC
Related question in ask site:
https://ask.libreoffice.org/t/type-dot-in-field-name-with-numeric-value/95770

Not reproducible with:
Version: 7.4.3.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 1; OS: Linux 5.14; UI render: default; VCL: gtk3
Locale: es-AR (en_US.UTF-8); UI: en-US
Calc: threaded

I can set field names with `0.` or `a.`, but not with `0,` or `a,`, both if I set the locale to Spanish (Mexico) (dot as decimal separator) or to Spanish (Argentina) (comma as decimal separator).
Comment 2 Buovjaga 2023-09-28 10:13:32 UTC
(In reply to LeroyG from comment #1)
> Related question in ask site:
> https://ask.libreoffice.org/t/type-dot-in-field-name-with-numeric-value/95770
> 
> Not reproducible with:
> Version: 7.4.3.2 / LibreOffice Community
> Build ID: 40(Build:2)
> CPU threads: 1; OS: Linux 5.14; UI render: default; VCL: gtk3
> Locale: es-AR (en_US.UTF-8); UI: en-US
> Calc: threaded
> 
> I can set field names with `0.` or `a.`, but not with `0,` or `a,`, both if
> I set the locale to Spanish (Mexico) (dot as decimal separator) or to
> Spanish (Argentina) (comma as decimal separator).

I see Mike's comment in the thread:
"The difference is the decimal separator. Likely your old locale used comma as decimal separator; and now you use dot.

FTR: the regression happened between StarOffice 5.2 (2000), which allowed a digit followed by decimal separator; and StarOffice 7.0 (2003), which already exhibited today’s behavior."

So let's set to NEW.
Comment 3 Stéphane Guillou (stragu) 2023-09-28 11:12:54 UTC
(Buovjaga, our edit clashed, but I'm still adding my findings.)

I can't reproduce with:

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

I can name a user variable "1.whatever" or "0.something" without issue.
However, I can't use a comma in the same way, just like Leroy describes. Pressing comma deletes the whole name.
Same if the name starts with a letter, except pressing comma does not remove the letters.

Same thing in OOo 3.3, LO 7.4.7.2 and a recent master build:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2902ab24ecc5ffbf4907ea83b2028508b9de6364
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Decimal separator is the dot for that en-AU locale, but switching to fr-FR locale inside has same result, and switching to fr_FR system locale has same result too.

In fact, even with a similar language/locale combination, I don't see it as you see it:
Locale: es-MX (it_IT); UI: en-US

No mention of restrictions in naming in the help page: https://help.libreoffice.org/latest/en-US/text/swriter/01/04090005.html

Nicholas, can you please reset your user profile to see if it helps?

Mike, copying you in as you seem to know a bit of history about it.
Comment 4 Nicholas 2023-09-28 15:59:54 UTC
Hi Stephane,

thank you so much for your help, I really appreciate it.

I just updated the Writer version and reset the user profile but nothing has changed, I can't insert a "user field" variable with Name starting with a number followed by a dot.

I'm using:

Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 60(Build:1)
CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: it-IT (it_IT.UTF-8); UI: en-US
Ubuntu package version: 4:7.6.2~rc1-0ubuntu0.22.04.1~lo1
Calc: threaded