summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/basides2.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-03-20 10:03:56 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2012-03-22 06:39:52 +0100
commit000bb6af72e934d7f0fd2291cea919437cfd5e2f (patch)
tree96350eb6657a92afbd9b59e36ccc1437a46d869c /basctl/source/basicide/basides2.cxx
parente55595d0e081ccdca41f621177e1b32eb9a649e3 (diff)
Convert tools/table.hxx usage to std::map in Basic IDE module
Diffstat (limited to 'basctl/source/basicide/basides2.cxx')
-rw-r--r--basctl/source/basicide/basides2.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx
index f4a0d0e29e8d..0e83a8ecdf4c 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -231,13 +231,7 @@ ModulWindow* BasicIDEShell::CreateBasWin( const ScriptDocument& rDocument, const
else
{
pWin->SetStatus( pWin->GetStatus() & ~BASWIN_SUSPENDED );
- IDEBaseWindow* pTmp = aIDEWindowTable.First();
- while ( pTmp && !nKey )
- {
- if ( pTmp == pWin )
- nKey = aIDEWindowTable.GetCurKey();
- pTmp = aIDEWindowTable.Next();
- }
+ nKey = GetIDEWindowId( pWin );
DBG_ASSERT( nKey, "CreateBasWin: Kein Key- Fenster nicht gefunden!" );
}
if( nKey && xLib.is() && rDocument.isInVBAMode() )
@@ -269,17 +263,23 @@ ModulWindow* BasicIDEShell::CreateBasWin( const ScriptDocument& rDocument, const
ModulWindow* BasicIDEShell::FindBasWin( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName, sal_Bool bCreateIfNotExist, sal_Bool bFindSuspended )
{
ModulWindow* pModWin = 0;
- IDEBaseWindow* pWin = aIDEWindowTable.First();
- while ( pWin && !pModWin )
+ for( IDEWindowTable::const_iterator it = aIDEWindowTable.begin();
+ it != aIDEWindowTable.end(); ++it )
{
+ IDEBaseWindow* pWin = it->second;
if ( ( !pWin->IsSuspended() || bFindSuspended ) && pWin->IsA( TYPE( ModulWindow ) ) )
{
if ( rLibName.isEmpty() )
+ {
pModWin = (ModulWindow*)pWin;
+ break;
+ }
else if ( pWin->IsDocument( rDocument ) && pWin->GetLibName() == rLibName && pWin->GetName() == rModName )
+ {
pModWin = (ModulWindow*)pWin;
+ break;
+ }
}
- pWin = aIDEWindowTable.Next();
}
if ( !pModWin && bCreateIfNotExist )
pModWin = CreateBasWin( rDocument, rLibName, rModName );