diff options
author | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2021-09-07 22:23:43 +0200 |
---|---|---|
committer | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2021-09-10 13:28:33 +0200 |
commit | e32d864dbe086d630a8b17c2d376e320aee0253a (patch) | |
tree | 75637151dd3e02af879ffceba0427ca4287f4d2c /basic/source/sbx | |
parent | 66e9b77ed296bb6b0cdae22685a11525a06dcf08 (diff) |
tdf#144353 - Handling of missing optional parameters
Don't assign a missing optional variable to a property and don't allow
the computation/comparision including missing optional attributes.
In the previous cases a ERRCODE_BASIC_NOT_OPTIONAL is raised.
Change-Id: Iab391286fcace16c271ae511304075e2a0c5c651
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121794
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Diffstat (limited to 'basic/source/sbx')
-rw-r--r-- | basic/source/sbx/sbxvar.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx index 5900c68b9073..b8be36ec2735 100644 --- a/basic/source/sbx/sbxvar.cxx +++ b/basic/source/sbx/sbxvar.cxx @@ -280,6 +280,9 @@ SbxVariable& SbxVariable::operator=( const SbxVariable& r ) if (this != &r) { SbxValue::operator=( r ); + // tdf#144353 - copy information about a missing parameter. See SbiRuntime::SetIsMissing. + if (r.pInfo && !dynamic_cast<const SbxMethod*>(&r)) + pInfo = r.pInfo; m_aDeclareClassName = r.m_aDeclareClassName; m_xComListener = r.m_xComListener; m_pComListenerParentBasic = r.m_pComListenerParentBasic; |