summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdmark.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2007-08-02 17:27:46 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2007-08-02 17:27:46 +0000
commitc0e9968b4bbda9563213589bcb0472f8797bb553 (patch)
tree4de05a6706b71f9a47cd8011d33bd6d861307f4b /svx/source/svdraw/svdmark.cxx
parent365bf4c3d668fc960ab642f858c0de3a69b11a78 (diff)
INTEGRATION: CWS impress123 (1.10.360); FILE MERGED
2007/07/12 15:29:31 cl 1.10.360.2: RESYNC: (1.10-1.12); FILE MERGED 2007/07/04 13:15:52 cl 1.10.360.1: #i76084# remove dead SdrObject from mark list while sorting
Diffstat (limited to 'svx/source/svdraw/svdmark.cxx')
-rw-r--r--svx/source/svdraw/svdmark.cxx22
1 files changed, 19 insertions, 3 deletions
diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx
index 08393c56c850..8a42a915f655 100644
--- a/svx/source/svdraw/svdmark.cxx
+++ b/svx/source/svdraw/svdmark.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: svdmark.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: obo $ $Date: 2007-07-18 10:56:37 $
+ * last change: $Author: hr $ $Date: 2007-08-02 18:27:46 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -391,12 +391,28 @@ void SdrMarkList::ImpForceSort()
mbSorted = sal_True;
ULONG nAnz = maList.Count();
+ // remove invalid
+ if(nAnz > 0 )
+ {
+ SdrMark* pAkt = (SdrMark*)maList.First();
+ while( pAkt )
+ {
+ if(pAkt->GetMarkedSdrObj() == 0)
+ {
+ maList.Remove();
+ delete pAkt;
+ }
+ pAkt= (SdrMark*)maList.Next();
+ }
+ nAnz = maList.Count();
+ }
+
if(nAnz > 1)
{
ImpSdrMarkListSorter aSort(maList);
aSort.DoSort();
- // und nun doppelte rauswerfen
+ // remove duplicates
if(maList.Count() > 1)
{
SdrMark* pAkt = (SdrMark*)maList.Last();