Bug 157805 - Forms: Content of numeric field won't be deleted completely with DEL or BACKSPACE
Summary: Forms: Content of numeric field won't be deleted completely with DEL or BACKS...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.5.5.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-17 13:45 UTC by Robert Großkopf
Modified: 2023-10-17 22:06 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Open the form and follow the instruction. Part of deleted content in numeric field will be saved. (11.95 KB, application/vnd.oasis.opendocument.database)
2023-10-17 13:45 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2023-10-17 13:45:33 UTC
Created attachment 190261 [details]
Open the form and follow the instruction. Part of deleted content in numeric field will be saved.

Open the attached database.
Open the form.
Input 
ID: 1
Name: Hallo
Age: 27
Now press Backspace in field for "Age" to delete the content.
Go to next row - will save the content.
Go back and have a look at field for Age.
There will be saved '2' instead of NULL.

Test the same with Delete. Last deleted number will be '7'.
Next row - back and there will be saved '7' instead of NULL.

Tested with
Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 6; OS: Linux 5.14; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded
Comment 1 Robert Großkopf 2023-10-17 13:58:25 UTC
Tested a little bit more:
In LO 7.1.5.2 will be save '0' in the numeric field, which content has been deleted by Backspace.
Same in LO 7.4.7.2.
In LO 7.5.5.2 the last deleted number will be saved instead.
In every version here it is impossible to set a numeric field back to NULL, if there has ever been added content.

If I take a formatted field it will work well.
Comment 2 m_a_riosv 2023-10-17 21:44:15 UTC
The first digit is saved, reproducible with
Version: 7.6.1.2 (X86_64) / LibreOffice Community
Build ID: f5defcebd022c5bc36bbb79be232cb6926d8f674
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e9374f74385d7dfe77d1902d3d82af20143bc775
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
Comment 3 jcsanz 2023-10-17 21:54:30 UTC
Confirmed with:
---------------
Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: es-ES
Calc: CL threaded
---------------
Comment 4 jcsanz 2023-10-17 21:58:42 UTC
(In reply to Robert Großkopf from comment #1)

> In LO 7.1.5.2 will be save '0' in the numeric field, which content has been
> deleted by Backspace.
It seems that the empty value is replaced by the "Value min" property of the control, which is not possible to set to empty or NULL
Comment 5 jcsanz 2023-10-17 22:06:31 UTC
(In reply to jcsanz from comment #4)
> (In reply to Robert Großkopf from comment #1)
> 
> > In LO 7.1.5.2 will be save '0' in the numeric field, which content has been
> > deleted by Backspace.
> It seems that the empty value is replaced by the "Value min" property of the
> control, which is not possible to set to empty or NULL

Testing more, if you change the "Value min" to any other value, and clear the numeric field, the value shown in the form is the value min, but really the value saved in the table is 0