summaryrefslogtreecommitdiff
path: root/basctl
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 /basctl
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 'basctl')
-rw-r--r--basctl/source/basicide/baside2b.cxx3
-rw-r--r--basctl/source/basicide/basobj3.cxx6
-rw-r--r--basctl/source/basicide/macrodlg.cxx4
3 files changed, 6 insertions, 7 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index e9f9ace3992e..7b319789980c 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1139,8 +1139,7 @@ OUString EditorWindow::GetActualSubName( sal_uLong nLine )
SbxArrayRef pMethods = rModulWindow.GetSbModule()->GetMethods();
for( sal_uInt16 i=0; i < pMethods->Count(); i++ )
{
- SbxVariable* p = dynamic_cast<SbMethod*>( pMethods->Get( i ) );
- SbMethod* pMeth = dynamic_cast<SbMethod*>( p );
+ SbMethod* pMeth = dynamic_cast<SbMethod*>( pMethods->Get( i ) );
if( pMeth )
{
sal_uInt16 l1,l2;
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index 3d3b9c4895e0..5aee287cdc9f 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -58,7 +58,7 @@ SbMethod* CreateMacro( SbModule* pModule, const OUString& rMacroName )
pDispatcher->Execute( SID_BASICIDE_STOREALLMODULESOURCES );
}
- if ( pModule->GetMethods()->Find( rMacroName, SbxClassType::Method ) )
+ if ( pModule->FindMethod( rMacroName, SbxClassType::Method ) )
return nullptr;
OUString aMacroName( rMacroName );
@@ -75,7 +75,7 @@ SbMethod* CreateMacro( SbModule* pModule, const OUString& rMacroName )
aMacroName = "Macro";
aMacroName += OUString::number( nMacro );
// test whether existing...
- bValid = pModule->GetMethods()->Find( aMacroName, SbxClassType::Method ) == nullptr;
+ bValid = pModule->FindMethod( aMacroName, SbxClassType::Method ) == nullptr;
nMacro++;
}
}
@@ -124,7 +124,7 @@ SbMethod* CreateMacro( SbModule* pModule, const OUString& rMacroName )
}
}
- SbMethod* pMethod = static_cast<SbMethod*>(pModule->GetMethods()->Find( aMacroName, SbxClassType::Method ));
+ SbMethod* pMethod = pModule->FindMethod( aMacroName, SbxClassType::Method );
if( pDispatcher )
{
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index 2072c74dcdcd..a8ad23249269 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -269,7 +269,7 @@ SbMethod* MacroChooser::GetMacro()
if ( pEntry )
{
OUString aMacroName( m_pMacroBox->GetEntryText( pEntry ) );
- pMethod = static_cast<SbMethod*>(pModule->GetMethods()->Find( aMacroName, SbxClassType::Method ));
+ pMethod = pModule->FindMethod( aMacroName, SbxClassType::Method );
}
}
return pMethod;
@@ -370,7 +370,7 @@ SbMethod* MacroChooser::CreateMacro()
}
OUString aSubName = m_pMacroNameEdit->GetText();
- DBG_ASSERT( !pModule || !pModule->GetMethods()->Find( aSubName, SbxClassType::Method ), "Macro existiert schon!" );
+ DBG_ASSERT( !pModule || !pModule->FindMethod( aSubName, SbxClassType::Method ), "Macro existiert schon!" );
pMethod = pModule ? basctl::CreateMacro( pModule, aSubName ) : nullptr;
}