From 246c506af4c22f7aafd71cdaa9563bce44c31420 Mon Sep 17 00:00:00 2001 From: Oliver Specht Date: Tue, 5 Nov 2002 07:42:07 +0000 Subject: #104207# apply NumberingRules to multiple selection, too --- sw/source/core/unocore/unocrsrhelper.cxx | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'sw/source/core/unocore/unocrsrhelper.cxx') diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index b2b0927a4a74..e5804c3f02e5 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unocrsrhelper.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: mba $ $Date: 2001-11-29 16:23:36 $ + * last change: $Author: os $ $Date: 2002-11-05 08:42:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -599,8 +599,21 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam) } aRule.Set( i, aFmt ); } - UnoActionContext aAction(rPam.GetDoc()); - rPam.GetDoc()->SetNumRule( rPam, aRule ); + UnoActionContext aAction(pDoc); + + if( rPam.GetNext() != &rPam ) // Mehrfachselektion ? + { + pDoc->StartUndo( UNDO_START ); + SwPamRanges aRangeArr( rPam ); + SwPaM aPam( *rPam.GetPoint() ); + for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n ) + pDoc->SetNumRule( aRangeArr.SetPam( n, aPam ), aRule ); + pDoc->EndUndo( UNDO_END ); + } + else + pDoc->SetNumRule( rPam, aRule ); + + } else if(pSwNum->GetCreatedNumRuleName().Len()) { -- cgit v1.2.3