summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Joachim Lankenau <hjs@openoffice.org>2009-03-23 16:52:46 +0000
committerHans-Joachim Lankenau <hjs@openoffice.org>2009-03-23 16:52:46 +0000
commit5113dfb908a7a4c1ac3d2300f49d99f9f387ae5a (patch)
tree7c43377c2eb3bacf9a7c1e103f9a13c3a1531173
parent19f62cc57a9f3502882e0a701d4adbb55ba25610 (diff)
CWS-TOOLING: integrate CWS sw31bf09_DEV300
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.cxx24
-rw-r--r--sw/source/ui/misc/outline.cxx28
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#