In basic/source/runtime/methods.cxx, there are lots of SbRtl_* functions, that implement various Basic functions and procedures. They typically have an argument check, and do the actual work in 'else' branch of the check. This easyhack is to flatten those functions to increase readability, by returning from the failed check. For example: void SbRtl_Tan(StarBASIC *, SbxArray & rPar, bool) { if (rPar.Count() < 2) { StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { SbxVariableRef pArg = rPar.Get(1); rPar.Get(0)->PutDouble(tan(pArg->GetDouble())); } } This function may be re-written as void SbRtl_Tan(StarBASIC *, SbxArray & rPar, bool) { if (rPar.Count() < 2) return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); SbxVariableRef pArg = rPar.Get(1); rPar.Get(0)->PutDouble(tan(pArg->GetDouble())); }
Reset as NEW; Multi-Hack!
Ramreiso Kashung committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/bcaf13205052a64373599245ae0b1020b04b1385 tdf#147132: Flatten Basic function implementations It will be available in 7.4.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.
offtkp committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/6bc187b2eb6b9520c942f232b1abcb4fb29bfa04 tdf#147132 Flatten Basic function implementations It will be available in 7.4.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.
Roman Kuznetsov committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/43458f83f29067752cfb3df2ccfe0eeb940f4b71 tdf#147132 Flatten Basic function implementation It will be available in 7.4.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.
Roman Kuznetsov committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/66fe1fa945a161b2f617ab3576ddef23d84148f8 tdf#147132 Flatten Basic function It will be available in 7.4.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.
Roman Kuznetsov committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/f30af7b3516d783d717745b63134499ea0d049fc tdf#147132 Flatten Basic function It will be available in 7.4.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.