diff options
author | Oliver Bolte <obo@openoffice.org> | 2009-03-20 10:02:14 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2009-03-20 10:02:14 +0000 |
commit | a644a56cbca28d3ce704fdffed4bec498f2ae1b7 (patch) | |
tree | 0f31994eb8ab2e38f70784e8ba6d2f7146393b89 | |
parent | 852f5141c68b1e4c63be565abed3479e331adffa (diff) |
CWS-TOOLING: integrate CWS sw31bf09
2009-03-18 12:46:54 +0100 od r269652 : #i100277# Assure that under all circumstances paragraph styles, whose
parent paragraph style is assigned to a list level of the outline style,
does not inherit the outline level attribute.
-rw-r--r-- | sw/source/core/doc/fmtcol.cxx | 24 | ||||
-rw-r--r-- | sw/source/ui/misc/outline.cxx | 28 |
2 files changed, 23 insertions, 29 deletions
diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx index 002c482f03..8a5115ca14 100644 --- a/sw/source/core/doc/fmtcol.cxx +++ b/sw/source/core/doc/fmtcol.cxx @@ -683,9 +683,31 @@ int SwTxtFmtColl::GetAssignedOutlineStyleLevel() const void SwTxtFmtColl::AssignToListLevelOfOutlineStyle(const int nAssignedListLevel) { - mbAssignedToOutlineStyle = true; SetAttrOutlineLevel(nAssignedListLevel+1); + + // --> OD 2009-03-18 #i100277# + SwClientIter aIter( *this ); + SwTxtFmtColl* pDerivedTxtFmtColl = + dynamic_cast<SwTxtFmtColl*>(aIter.First( TYPE( SwTxtFmtColl ) )); + while ( pDerivedTxtFmtColl != 0 ) + { + if ( !pDerivedTxtFmtColl->IsAssignedToListLevelOfOutlineStyle() ) + { + if ( pDerivedTxtFmtColl->GetItemState( RES_PARATR_NUMRULE, FALSE ) == SFX_ITEM_DEFAULT ) + { + SwNumRuleItem aItem(aEmptyStr); + pDerivedTxtFmtColl->SetFmtAttr( aItem ); + } + if ( pDerivedTxtFmtColl->GetItemState( RES_PARATR_OUTLINELEVEL, FALSE ) == SFX_ITEM_DEFAULT ) + { + pDerivedTxtFmtColl->SetAttrOutlineLevel( 0 ); + } + } + + pDerivedTxtFmtColl = dynamic_cast<SwTxtFmtColl*>(aIter.Next()); + } + // <-- } void SwTxtFmtColl::DeleteAssignmentToListLevelOfOutlineStyle() diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index 4969e42251..8b24c0b2d8 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -532,34 +532,6 @@ short SwOutlineTabDialog::Ok() } } - //#outline level,add by zhaojianwei - /* When a paragraph style is assigned to a list level of the outline style, - the outline level attribute and the list style attribute of its existing - child paragraph styles have to be set to 0 respectively "".*/ - nCount = rWrtSh.GetTxtFmtCollCount(); - for( i = 0; i < nCount; ++i ) - { - SwTxtFmtColl &rTxtColl = rWrtSh.GetTxtFmtColl(i); - if( !rTxtColl.IsDefault() ) - { - SwTxtFmtColl *pDerFrom = ( SwTxtFmtColl* )rTxtColl.DerivedFrom(); - if( pDerFrom->IsAssignedToListLevelOfOutlineStyle()) - { - if(rTxtColl.GetItemState( RES_PARATR_NUMRULE, FALSE ) == SFX_ITEM_DEFAULT ) - { - SwNumRuleItem aItem(aEmptyStr); - rTxtColl.SetFmtAttr( aItem ); - } - if(rTxtColl.GetItemState( RES_PARATR_OUTLINELEVEL, FALSE ) == SFX_ITEM_DEFAULT ) - { - int nOutlineLevel = 0;; - rTxtColl.SetAttrOutlineLevel( nOutlineLevel ); - } - } - } - } - //<-end,zhaojianwei - rWrtSh.SetOutlineNumRule( *pNumRule); // --> OD 2006-12-11 #130443# |