summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorArnaud Versini <arnaud.versini@gmail.com>2016-04-24 21:00:05 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-12 07:43:03 +0000
commitc0d7dfa56c8a335bdea1be2ddce33a0f19b28bbd (patch)
treea85d66e5a7bbc902898fc4322f687275ca51d9d0 /filter
parent2ed5fa14f0e7624db241fde26e10fdd1009adfc7 (diff)
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.cxx10
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 ) ) )