diff options
author | Arnaud Versini <arnaud.versini@gmail.com> | 2016-04-24 21:00:05 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-12 07:43:03 +0000 |
commit | c0d7dfa56c8a335bdea1be2ddce33a0f19b28bbd (patch) | |
tree | a85d66e5a7bbc902898fc4322f687275ca51d9d0 /basic | |
parent | remove some unnecessary casting (diff) | |
download | core-c0d7dfa56c8a335bdea1be2ddce33a0f19b28bbd.tar.gz core-c0d7dfa56c8a335bdea1be2ddce33a0f19b28bbd.zip |
BASIC : Add SbModule::FindMethod
Change-Id: I3418c4a3d24b3b6630d6c80a6c8aa9d4ffb7e73a
Reviewed-on: https://gerrit.libreoffice.org/24346
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 6 | ||||
-rw-r--r-- | basic/source/comp/exprtree.cxx | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 375678fd0932..ef6a6797c93b 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -579,6 +579,12 @@ SbMethod* SbModule::GetMethod( const OUString& rName, SbxDataType t ) return pMeth; } +SbMethod* SbModule::FindMethod( const OUString& rName, SbxClassType t ) +{ + return dynamic_cast<SbMethod*> (pMethods->Find( rName, t )); +} + + // request/create property SbProperty* SbModule::GetProperty( const OUString& rName, SbxDataType t ) diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx index f39bb7686948..179aaf3b488e 100644 --- a/basic/source/comp/exprtree.cxx +++ b/basic/source/comp/exprtree.cxx @@ -269,8 +269,7 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo ) // #i109184: Check if symbol is or later will be defined inside module SbModule& rMod = pParser->aGen.GetModule(); - SbxArray* pModMethods = rMod.GetMethods(); - if( pModMethods->Find( aSym, SbxClassType::DontCare ) ) + if( rMod.FindMethod( aSym, SbxClassType::DontCare ) ) { pDef = nullptr; } |