On Mon, 2012-01-16 at 12:33 -0800, julien2412 wrote:
> You're right Caolan, I checked there :
> http://en.cppreference.com/w/cpp/container/map/erase
> I didn't know that it was a recent feature, just thought it was useful, so I
> didn't think about checking it existed :-)
>
> I'm trying right now to find a solution another way.
How about my attachment from the earlier mail, attached again. Can you
see if that fixes the problem ?
C.
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 4d980a0..4a80a9e 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1410,24 +1410,22 @@ void SAL_CALL SbaTableQueryBrowser::disposing( const EventObject& _rSource ) thr
Reference< XDispatch > xSource(_rSource.Source, UNO_QUERY);
if(xSource.is())
{
- for ( ExternalFeaturesMap::iterator aLoop = m_aExternalFeatures.begin();
- aLoop != m_aExternalFeatures.end();
- ++aLoop
- )
+ ExternalFeaturesMap::iterator aLoop = m_aExternalFeatures.begin();
+ ExternalFeaturesMap::iterator aEnd = m_aExternalFeatures.end();
+ while (aLoop != aEnd);
{
- if ( aLoop->second.xDispatcher.get() == xSource.get() )
+ ExternalFeaturesMap::iterator aI = aLoop++;
+ if ( aI->second.xDispatcher.get() == xSource.get() )
{
- ExternalFeaturesMap::iterator aPrevious = aLoop;
- --aPrevious;
+ sal_uInt16 nSlot = aI->first;
// remove it
- m_aExternalFeatures.erase( aLoop );
+ m_aExternalFeatures.erase(aI);
// maybe update the UI
- implCheckExternalSlot(aLoop->first);
+ implCheckExternalSlot(nSlot);
// continue, the same XDispatch may be resposible for more than one URL
- aLoop = aPrevious;
}
}
}
_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice