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 /filter | |
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 'filter')
-rw-r--r-- | filter/source/msfilter/msvbahelper.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx index 49e6190b291c..dc86a4e7c8dd 100644 --- a/filter/source/msfilter/msvbahelper.cxx +++ b/filter/source/msfilter/msvbahelper.cxx @@ -202,15 +202,9 @@ bool hasMacro( SfxObjectShell* pShell, const OUString& sLibrary, OUString& sMod, if ( !sMod.isEmpty() ) // we wish to find the macro is a specific module { SbModule* pModule = pBasic->FindModule( sMod ); - if ( pModule ) + if ( pModule && pModule->FindMethod( sMacro, SbxClassType::Method )) { - SbxArray* pMethods = pModule->GetMethods(); - if ( pMethods ) - { - SbMethod* pMethod = static_cast< SbMethod* >( pMethods->Find( sMacro, SbxClassType::Method ) ); - if ( pMethod ) - bFound = true; - } + bFound = true; } } else if( SbMethod* pMethod = dynamic_cast< SbMethod* >( pBasic->Find( sMacro, SbxClassType::Method ) ) ) |