Bug 154284 - IsNumeric(" ") returns True
Summary: IsNumeric(" ") returns True
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
6.1 all versions
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:25.8.0 target:25.2.0.2
Keywords:
Depends on:
Blocks: Macro
  Show dependency treegraph
 
Reported: 2023-03-20 11:44 UTC by Xisco Faulí
Modified: 2025-01-08 12:04 UTC (History)
1 user (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 Xisco Faulí 2023-03-20 11:44:10 UTC
This issue is based on https://bugs.documentfoundation.org/show_bug.cgi?id=123158#c16

run

Sub test
msgbox isNumeric(" ")
End Sub

it returns True while it should return False

Reproduced in


Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c1af1b9c555480305862336954ceefe14865e27d
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded

and

Version: 6.0.0.0.alpha1+
Build ID: 6eeac3539ea4cac32d126c5e24141f262eb5a4d9
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3; 
Locale: es-ES (es_ES.UTF-8); Calc: group threaded
Comment 1 Rafael Lima 2024-01-24 17:58:44 UTC
FTR in MSO the same macro would return "False", so indeed this is a bug.

In LO:
isNumeric(" ") -> True (Wrong)
isNumeric("") -> False (OK)

I'd say the problem is in  ImpScan (sbxscan.cxx), but I have to give it a closer look.
Comment 2 Mike Kaganski 2025-01-07 08:55:37 UTC
https://gerrit.libreoffice.org/c/core/+/179863
Comment 3 Commit Notification 2025-01-08 05:02:45 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/bb86627216f5532b6d776fafafd9e796060b57b8

tdf#154284: check if ImpScan found a number at all

It will be available in 25.8.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.
Comment 4 Commit Notification 2025-01-08 12:04:59 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/fdf39c37624847d0b5ef51058f06e94ad86c49d3

tdf#154284: check if ImpScan found a number at all

It will be available in 25.2.0.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.