Tag: cws_src680_dba201a User: fs Date: 05/05/19 00:54:58 Modified: /dba/dbaccess/source/ui/browser/ genericcontroller.cxx
Log: #121276# ImplBroadcastFeatureState: work on a copy of m_arrStatusListener, since it can change while broadcasting File Changes: Directory: /dba/dbaccess/source/ui/browser/ =========================================== File [changed]: genericcontroller.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/genericcontroller.cxx?r1=1.63.34.1&r2=1.63.34.2 Delta lines: +19 -6 -------------------- --- genericcontroller.cxx 6 May 2005 07:35:07 -0000 1.63.34.1 +++ genericcontroller.cxx 19 May 2005 07:54:56 -0000 1.63.34.2 @@ -2,9 +2,9 @@ * * $RCSfile: genericcontroller.cxx,v $ * - * $Revision: 1.63.34.1 $ + * $Revision: 1.63.34.2 $ * - * last change: $Author: oj $ $Date: 2005/05/06 07:35:07 $ + * last change: $Author: fs $ $Date: 2005/05/19 07:54:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -512,8 +512,13 @@ CommandCollector( nFeat, aFeatureCommands ) ); - DispatchIterator iterSearch = m_arrStatusListener.begin(); - DispatchIterator iterEnd = m_arrStatusListener.end(); + // it is possible that listeners are registered or revoked while + // we are notifying them, so we must use a copy of m_arrStatusListener, not + // m_arrStatusListener itself + // #121276# / 2005-05-19 / [EMAIL PROTECTED] + Dispatch aNotifyLoop( m_arrStatusListener ); + DispatchIterator iterSearch = aNotifyLoop.begin(); + DispatchIterator iterEnd = aNotifyLoop.end(); while (iterSearch != iterEnd) { @@ -580,7 +585,15 @@ ::std::bind2nd( SupportedFeaturesEqualId(), aNextFeature.nId ) ); - OSL_ENSURE( m_aSupportedFeatures.end() != aFeaturePos, "OGenericUnoController::InvalidateFeature_Impl: out of interest: please tell FS how you got this assertion ..." ); +#if OSL_DEBUG_LEVEL > 0 + if ( m_aSupportedFeatures.end() == aFeaturePos ) + { + ::rtl::OString sMessage( "OGenericUnoController::InvalidateFeature_Impl: feature id " ); + sMessage += ::rtl::OString::valueOf( aNextFeature.nId ); + sMessage += ::rtl::OString( " has been invalidated, but is not supported!" ); + OSL_ENSURE( false, sMessage.getStr() ); + } +#endif if ( m_aSupportedFeatures.end() != aFeaturePos ) // we really know this feature ImplBroadcastFeatureState( aFeaturePos->first, aNextFeature.xListener, aNextFeature.bForceBroadcast ); @@ -876,7 +889,7 @@ #if DBG_UTIL String sMessage("OGenericUnoController::GetState(", RTL_TEXTENCODING_ASCII_US); sMessage += String::CreateFromInt32(nId); - sMessage.AppendAscii(") : catched an exception ! message : "); + sMessage.AppendAscii("): caught an exception ! message : "); sMessage += (const sal_Unicode*)e.Message; DBG_ERROR(ByteString(sMessage, gsl_getSystemTextEncoding()).GetBuffer()); #else --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
