diff options
author | Mathias Bauer <mba@openoffice.org> | 2001-04-12 12:26:22 +0000 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2001-04-12 12:26:22 +0000 |
commit | 747583ec1208dd45427157770d638ad5ed7ba09a (patch) | |
tree | b078f816449b24767ab8e91d86fbbd69110e9b69 /framework | |
parent | 8234c93e837b6073daf5fdcf7b2b34136c4144cc (diff) |
#86057#: remove zombies in remove method
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/classes/framecontainer.cxx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/framework/source/classes/framecontainer.cxx b/framework/source/classes/framecontainer.cxx index fbe6e9b1bea0..78085f1cdeae 100644 --- a/framework/source/classes/framecontainer.cxx +++ b/framework/source/classes/framecontainer.cxx @@ -2,9 +2,9 @@ * * $RCSfile: framecontainer.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: as $ $Date: 2001-04-04 13:28:34 $ + * last change: $Author: mba $ $Date: 2001-04-12 13:26:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -190,14 +190,26 @@ void FrameContainer::remove( const Reference< XFrame >& xFrame ) if( aSearchedItem != m_aContainer.end() ) { m_aContainer.erase( aSearchedItem ); + // If removed frame the current active frame - reset state variable. if( m_xActiveFrame == xFrame ) { m_xActiveFrame = Reference< XFrame >(); } + + // looking for zombies ... + for( sal_uInt32 nIndex=0; nIndex < m_aContainer.size(); ) + { + if ( !m_aContainer.at(nIndex)->getComponentWindow().is() ) + m_aContainer.erase( m_aContainer.begin() + nIndex ); + else + nIndex++; + } + // We don't need the write lock any longer ... // downgrade to read access. aWriteLock.downgrade(); + // If last frame was removed and special quit timer is enabled by the desktop // we must terminate the desktop by using this timer! if ( |