diff options
author | Oliver Specht <os@openoffice.org> | 2002-11-05 07:42:07 +0000 |
---|---|---|
committer | Oliver Specht <os@openoffice.org> | 2002-11-05 07:42:07 +0000 |
commit | 246c506af4c22f7aafd71cdaa9563bce44c31420 (patch) | |
tree | 5f860712aa2b191b8d066c64bc937bb9dc753ca4 /sw/source/core/unocore/unocrsrhelper.cxx | |
parent | ac3b0af36506f3a0faa4ac9216f8f28711b3f46f (diff) |
#104207# apply NumberingRules to multiple selection, too
Diffstat (limited to 'sw/source/core/unocore/unocrsrhelper.cxx')
-rw-r--r-- | sw/source/core/unocore/unocrsrhelper.cxx | 21 |
1 files changed, 17 insertions, 4 deletions
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()) { |