diff options
author | Tsutomu Uchino <hanya@apache.org> | 2015-01-08 16:28:11 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-09 09:24:44 +0000 |
commit | a272f5b7b30f356418ecf28eb95d066f081d1624 (patch) | |
tree | 0bd197ceb34dc57d947c9dd8ccf6a137127b58da /basic/source/sbx/sbxobj.cxx | |
parent | 89b5423c01ab4e4f05f8d73fe7826f64197abe41 (diff) |
Resolves: #i63614# fix strange type mismatch when Iif function is used
Second or later compilation uses value type returned by previous execution of code.
Use the defined type as return value of the runtime function of Basic always.
(cherry picked from commit 7470c682e136a4a89c1e9474bbc79b2d61f31048)
Conflicts:
basic/inc/basic/sbxmeth.hxx
basic/inc/basic/sbxobj.hxx
basic/source/runtime/stdobj.cxx
basic/source/sbx/sbxobj.cxx
Change-Id: I3064e8403286a9c1401ef658bf139bedeae11f17
Diffstat (limited to 'basic/source/sbx/sbxobj.cxx')
-rw-r--r-- | basic/source/sbx/sbxobj.cxx | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx index 35a0eb2c4858..a7d8d4bf5af3 100644 --- a/basic/source/sbx/sbxobj.cxx +++ b/basic/source/sbx/sbxobj.cxx @@ -377,7 +377,7 @@ SbxArray* SbxObject::FindVar( SbxVariable* pVar, sal_uInt16& nArrayIdx ) // If a new object will be established, this object will be indexed, // if an object of this name exists already. -SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataType dt ) +SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataType dt, bool bIsRuntimeFunction ) { // Is the object already available? SbxArray* pArray = NULL; @@ -410,7 +410,7 @@ SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataTyp pVar = new SbxProperty( rName, dt ); break; case SbxCLASS_METHOD: - pVar = new SbxMethod( rName, dt ); + pVar = new SbxMethod( rName, dt, bIsRuntimeFunction ); break; case SbxCLASS_OBJECT: pVar = CreateObject( rName ); @@ -964,14 +964,19 @@ void SbxObject::Dump( SvStream& rStrm, bool bFill ) --nLevel; } -SbxMethod::SbxMethod( const OUString& r, SbxDataType t ) - : SbxVariable( t ) +SbxMethod::SbxMethod( const OUString& r, SbxDataType t, bool bIsRuntimeFunction ) + : SbxVariable(t) + , mbIsRuntimeFunction(bIsRuntimeFunction) + , mbRuntimeFunctionReturnType(t) { - SetName( r ); + SetName(r); } SbxMethod::SbxMethod( const SbxMethod& r ) - : SvRefBase( r ), SbxVariable( r ) + : SvRefBase(r) + , SbxVariable(r) + , mbIsRuntimeFunction(r.IsRuntimeFunction()) + , mbRuntimeFunctionReturnType(r.GetRuntimeFunctionReturnType()) { } |