basic/source/runtime/methods.cxx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-)
New commits: commit f30af7b3516d783d717745b63134499ea0d049fc Author: Roman Kuznetsov <antilibreoff...@gmail.com> AuthorDate: Fri Jun 3 14:30:32 2022 +0200 Commit: Roman Kuznetsov <antilibreoff...@gmail.com> CommitDate: Fri Jun 3 16:36:32 2022 +0200 tdf#147132 Flatten Basic function Change-Id: I1e445a565dc9c45810e85b045e68db08a56207f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135271 Tested-by: Jenkins Reviewed-by: Roman Kuznetsov <antilibreoff...@gmail.com> diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index c6d12c3c033f..2761caba0309 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -771,17 +771,15 @@ void SbRtl_Hex(StarBASIC *, SbxArray & rPar, bool) { if (rPar.Count() < 2) { - StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); - } - else - { - SbxVariableRef pArg = rPar.Get(1); - // converting value to unsigned and limit to 2 or 4 byte representation - sal_uInt32 nVal = pArg->IsInteger() ? - static_cast<sal_uInt16>(pArg->GetInteger()) : - static_cast<sal_uInt32>(pArg->GetLong()); - rPar.Get(0)->PutString(OUString::number(nVal, 16).toAsciiUpperCase()); + return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } + + SbxVariableRef pArg = rPar.Get(1); + // converting value to unsigned and limit to 2 or 4 byte representation + sal_uInt32 nVal = pArg->IsInteger() ? + static_cast<sal_uInt16>(pArg->GetInteger()) : + static_cast<sal_uInt32>(pArg->GetLong()); + rPar.Get(0)->PutString(OUString::number(nVal, 16).toAsciiUpperCase()); } void SbRtl_FuncCaller(StarBASIC *, SbxArray & rPar, bool)