Consider this code: sub TestDec2Hex oService = createUNOService("com.sun.star.sheet.addin.Analysis") MsgBox oService.getDec2Hex(Nothing, 1234, Empty) MsgBox oService.getDec2Hex(Nothing, 1234, "") MsgBox oService.getDec2Hex(Nothing, 1234, "8") MsgBox oService.getDec2Hex(Nothing, 1234, 8.1) MsgBox oService.getDec2Hex(Nothing, 1234, 8.0) MsgBox oService.getDec2Hex(Nothing, 1234, 8) end sub All the calls to getDec2Hex will succeed, *except for the last two*, where '8.0' and '8' are passed as the last 'places' argument. So, the most natural way of using the function is unavailable. Code pointer: The function is implemented in scaddins/source/analysis/analysis.cxx. It uses ScaAnyConverter::getInt32 to handle the uno::Any value of the places argument. The task is to change the code that extracts the value, to allow not only empty values, strings and doubles, but also other numerical types, as the argument value. The easy hack should include a unit test.
Changing to medium difficulty as unit test is included
Hi @Hao, this bug has been ASSIGNED to you for more than 6 months. Do you plan to keep working on a fix for it? If not, please change the bug status back to NEW. Thanks!
Luv Sharma committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/5986ab58db89ee73dc1bc30a7f3800ccb598a3b6 tdf#148645 getDec2Hex now takes integer 'places' value 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 "master": https://git.libreoffice.org/core/commit/bc5e5cb08a91a5daf0e9a5e78cf304b52e1ad369 tdf#148645: add unit test 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.
Luv Sharma committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/5fef3ebe9efd4d4e8569e620e82771f5560c5524 tdf#148645 getDec2Hex now takes integer 'places' value (updated) 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.