Summary: | The Like LO Basic operator does not work correctly if there are certain characters in the string being tested. | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Vladimir Sokolinskiy <sokol> |
Component: | BASIC | Assignee: | Mike Kaganski <mikekaganski> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | rafael.palma.lima |
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.documentfoundation.org/show_bug.cgi?id=152689 | ||
Whiteboard: | target:24.8.0 target:24.2.3 | ||
Crash report or crash signature: | Regression By: |
Description
Vladimir Sokolinskiy
2024-04-02 11:51:10 UTC
Indeed this example returns False. The method IsLike from the String service (ScriptForge) also returns False. I'm not sure whether this should return True... but I can't see a reason why not. The weird thing is that I could not find the help page for the Like operator. It's possibly lacking documentation. Code pointer here: SbiExpression::Like in /core/basic/source/comp/exprtree.cxx Rafael, thank you for participating in the topic. Added a link to a bug about the lack of documentation for the Like operator. It must return True here, because LIKE operator, by definition, matches the string against the pattern, not some part of the string, arbitrarily separated by newline characters. https://gerrit.libreoffice.org/c/core/+/165700 Mike, thank you for quickly fixing the bug! :) Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/38f731ff67142a423aa6f46dc3e92d094f86ffb1 tdf#160478: fix Basic LIKE operator It will be available in 24.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. Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/b4abb5ee77c6894cd9a9ef3d5f66e868b591d02c tdf#160478: fix Basic LIKE operator It will be available in 24.2.3. 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. |