summaryrefslogtreecommitdiff
path: root/basic/source
diff options
context:
space:
mode:
authorRoman Kuznetsov <antilibreoffice@gmail.com>2022-05-29 15:32:53 +0200
committerRoman Kuznetsov <antilibreoffice@gmail.com>2022-05-30 08:45:42 +0200
commit43458f83f29067752cfb3df2ccfe0eeb940f4b71 (patch)
tree36d6c93c5e1c5cb078788489f086f33fdb19790b /basic/source
parent181cc77117b8d90c6dab63a17e8a690736ef62a0 (diff)
tdf#147132 Flatten Basic function implementation
Change-Id: Ife73d08e57bb1c896a27f8cbbd6b1f4b106587a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135062 Tested-by: Jenkins Reviewed-by: Roman Kuznetsov <antilibreoffice@gmail.com>
Diffstat (limited to 'basic/source')
-rw-r--r--basic/source/runtime/methods.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 4dbe3f526626..122e87947ee0 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -721,14 +721,12 @@ void SbRtl_SendKeys(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_Exp(StarBASIC *, SbxArray & rPar, bool)
{
if (rPar.Count() < 2)
- StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
- else
- {
- double aDouble = rPar.Get(1)->GetDouble();
- aDouble = exp( aDouble );
- checkArithmeticOverflow( aDouble );
- rPar.Get(0)->PutDouble(aDouble);
- }
+ return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
+
+ double aDouble = rPar.Get(1)->GetDouble();
+ aDouble = exp( aDouble );
+ checkArithmeticOverflow( aDouble );
+ rPar.Get(0)->PutDouble(aDouble);
}
void SbRtl_FileLen(StarBASIC *, SbxArray & rPar, bool)