| Summary: | Impossible to create a Decimal field with more than 1 decimal place | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Robert Großkopf <robert> |
| Component: | Base | Assignee: | Caolán McNamara <caolan.mcnamara> |
| Status: | VERIFIED FIXED | ||
| Severity: | normal | CC: | caolan.mcnamara, serval2412, xiscofauli |
| Priority: | medium | Keywords: | bibisected, bibisectRequest, regression |
| Version: | 6.4.0.3 release | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://bugs.documentfoundation.org/show_bug.cgi?id=130623 https://bugs.documentfoundation.org/show_bug.cgi?id=130708 |
||
| Whiteboard: | target:7.0.0 target:6.4.1 | ||
| Crash report or crash signature: | Regression By: | ||
|
Description
Robert Großkopf
2020-02-11 16:00:36 UTC
On Win10 with master sources updated today, I could reproduce this. Not related to firebird I do believe this is a regression introduced by https://cgit.freedesktop.org/libreoffice/core/commit/?id=8c66efa030e98cfdf5da20be368566d64e43c5d1 too. however, it crashed in some of the bisection steps Adding Cc: Caolán McNamara Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/4a3bb10b2f81ad836d6b9d9bd2f0384914a19cb5 Resolves: tdf#130593 set correct range for spinbutton It will be available in 7.0.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. fixed in master, backport to 6-4 in gerrit On pc Debian x86-64 with master sources +gtk3 updated today, I don't reproduce this. Remark: when creating the field, number of decimals is 0, when clicking once to "+" to increase it, it jumps directly to "2", then it's ok, it increases or decreases by "1" Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-6-4": https://git.libreoffice.org/core/commit/d021827a277c08053d11b7319f9b6180b4988684 Resolves: tdf#130593 set correct range for spinbutton It will be available in 6.4.2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Verified in Version: 7.0.0.0.alpha0+ Build ID: 54acab919e7c7c5d60fc697bda54278861ac250e CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; Locale: en-US (en_US.UTF-8); UI-Language: en-US Calc: threaded @Caolán, thanks for fixing this issue!! (In reply to Julien Nabet from comment #6) > On pc Debian x86-64 with master sources +gtk3 updated today, I don't > reproduce this. > > Remark: when creating the field, number of decimals is 0, when clicking once > to "+" to increase it, it jumps directly to "2", then it's ok, it increases > or decreases by "1" ... and this is a new bug: You couldn't change it back to '0' decimal places, if you have tried to set it to '1'. Should I open a new bug for this? By adding some traces, it seems due to the fact that pFieldType->nMinimumScale is equal to 1. So either min range should be 0 or it should display 1 instead of 0 so we don't have this little jump + we know that we can't put 0. The min-value of the listbox should be 0, because it should be possible to create DECIMAL-fields without any decimal place. So it would be a good idea to set pFieldType->nMinimumScale to 0. I gave a try on LO 6.3.4 on Win10. I created a brand new odb file (Firebird embedded). I used Design and created a Decimal field, indeed I could let "0" for decimal property. But when saving table and just reopening it, this field was set to "1". The property is retrieved from: 492 aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow); 493 pInfo->nMinimumScale = aValue; (https://opengrok.libreoffice.org/xref/core/dbaccess/source/ui/misc/UITools.cxx?r=51b5b930#493) Root source: https://opengrok.libreoffice.org/xref/core/connectivity/source/drivers/firebird/DatabaseMetaData.cxx?r=1dd9200b#946 Robert: I created a brand new bugtracker tdf#130708 This bug wasn't a special Firebird-bug. But the Difference between Firebird and HSQLDB was: HSQLDB couldn't create more than 0 decimal place Firebird couldn't create more than 1 decimal place Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-6-4-1": https://git.libreoffice.org/core/commit/d549e5d7b3da3c60fa25e2a73892721e4539fc76 Resolves: tdf#130593 set correct range for spinbutton It will be available in 6.4.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. |