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