User: obo     
Date: 05/07/08 03:38:38

Modified:
 /dba/dbaccess/source/ui/browser/
  genericcontroller.cxx

Log:
 INTEGRATION: CWS dba20blocker (1.63.66); FILE MERGED
 2005/06/24 07:26:06 fs 1.63.66.1: copying fix for #121276# into this CWS

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&r2=1.64
Delta lines:  +17 -4
--------------------
--- genericcontroller.cxx       10 Mar 2005 16:45:35 -0000      1.63
+++ genericcontroller.cxx       8 Jul 2005 10:38:35 -0000       1.64
@@ -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]

Reply via email to