From c0e9968b4bbda9563213589bcb0472f8797bb553 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Thu, 2 Aug 2007 17:27:46 +0000 Subject: 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 --- svx/source/svdraw/svdmark.cxx | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'svx/source/svdraw/svdmark.cxx') 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(); -- cgit v1.2.3