diff options
author | Joseph Powers <jpowers27@cox.net> | 2010-12-10 20:42:06 -0800 |
---|---|---|
committer | Joseph Powers <jpowers27@cox.net> | 2010-12-10 20:42:06 -0800 |
commit | 9df180a0fcf085686c16c4720fe4e983208d5658 (patch) | |
tree | cd9602a4cbe683ef323c593b1ba5a1a7c233003d /UnoControls | |
parent | 2b70fbec45f7a058710310d88c747e0fb828c6c9 (diff) |
Remove DECLARE_LIST( MacroList, SbMethod* ) & Cleanup previous patch
Diffstat (limited to 'UnoControls')
-rw-r--r-- | UnoControls/source/controls/progressmonitor.cxx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx index ca206b1f44c4..ca74167638aa 100644 --- a/UnoControls/source/controls/progressmonitor.cxx +++ b/UnoControls/source/controls/progressmonitor.cxx @@ -43,7 +43,7 @@ #include <cppuhelper/typeprovider.hxx> #include <tools/debug.hxx> #include <tools/solar.h> - +#include <algorithm> //____________________________________________________________________________________________________________ // includes of my project //____________________________________________________________________________________________________________ @@ -61,7 +61,7 @@ using namespace ::com::sun::star::lang ; using namespace ::com::sun::star::awt ; using ::std::vector; - +using ::std::find; namespace unocontrols{ @@ -308,15 +308,17 @@ void SAL_CALL ProgressMonitor::removeText ( const OUString& rTopic, sal_Bool bbe // ... delete item from right list ... if ( bbeforeProgress == sal_True ) { - vector< IMPL_TextlistItem* >::iterator itr = maTextlist_Top.begin(); - while ( (itr < maTextlist_Top.end()) && (*itr != pSearchItem) ) ++itr; - maTextlist_Top.erase(itr); + vector< IMPL_TextlistItem* >::iterator + itr = find( maTextlist_Top.begin(), maTextlist_Top.end(), pSearchItem ); + if (itr != maTextlist_Top.end()) + maTextlist_Top.erase(itr); } else { - vector< IMPL_TextlistItem* >::iterator itr = maTextlist_Bottom.begin(); - while ( (itr < maTextlist_Bottom.end()) && (*itr != pSearchItem) ) ++itr; - maTextlist_Bottom.erase(itr); + vector< IMPL_TextlistItem* >::iterator + itr = find( maTextlist_Bottom.begin(), maTextlist_Bottom.end(), pSearchItem ); + if (itr != maTextlist_Bottom.end()) + maTextlist_Bottom.erase(itr); } delete pSearchItem ; |