diff options
author | Roman Kuznetsov <antilibreoffice@gmail.com> | 2022-06-03 14:30:32 +0200 |
---|---|---|
committer | Roman Kuznetsov <antilibreoffice@gmail.com> | 2022-06-03 16:36:32 +0200 |
commit | f30af7b3516d783d717745b63134499ea0d049fc (patch) | |
tree | b218fbec9133e2c673fa2e8734a7d24a3f348555 /basic | |
parent | a15ce15709acee3b46fb9f7d6836c57f6e1ef9a7 (diff) |
tdf#147132 Flatten Basic function
Change-Id: I1e445a565dc9c45810e85b045e68db08a56207f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135271
Tested-by: Jenkins
Reviewed-by: Roman Kuznetsov <antilibreoffice@gmail.com>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/runtime/methods.cxx | 18 |
1 files changed, 8 insertions, 10 deletions
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) |