summaryrefslogtreecommitdiff
path: root/sd/source/ui/unoidl
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2012-01-31 21:38:43 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2012-01-31 21:52:02 +0400
commitf2e17f8f6b6724d7e56d6583d79434372f6221bd (patch)
treea70d238eb27d1a4d2a486944a682f54af0b15535 /sd/source/ui/unoidl
parentff462c9f5e9b010b1740772dc696487f99375d34 (diff)
erase garbage after std::remove
this fixes commit 5a71069339b3a3c118f3015d978799ef66db7564
Diffstat (limited to 'sd/source/ui/unoidl')
-rw-r--r--sd/source/ui/unoidl/unocpres.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/sd/source/ui/unoidl/unocpres.cxx b/sd/source/ui/unoidl/unocpres.cxx
index e0aa857e2824..e44f61eda751 100644
--- a/sd/source/ui/unoidl/unocpres.cxx
+++ b/sd/source/ui/unoidl/unocpres.cxx
@@ -144,10 +144,16 @@ void SAL_CALL SdXCustomPresentation::removeByIndex( sal_Int32 Index )
if( xPage.is() )
{
- SvxDrawPage* pPage = SvxDrawPage::getImplementation( xPage );
+ SvxDrawPage* pPage = SvxDrawPage::getImplementation( xPage );
if(pPage)
- ::std::remove(mpSdCustomShow->PagesVector().begin(), mpSdCustomShow->PagesVector().end(),
+ {
+ SdCustomShow::PageVec::iterator it = std::find(
+ mpSdCustomShow->PagesVector().begin(),
+ mpSdCustomShow->PagesVector().end(),
pPage->GetSdrPage());
+ if (it != mpSdCustomShow->PagesVector().end())
+ mpSdCustomShow->PagesVector().erase(it);
+ }
}
}