Anonymous avatar Anonymous committed 71d204c

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.

Comments (0)

Files changed (2)

sw/source/core/doc/fmtcol.cxx

 
 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()

sw/source/ui/misc/outline.cxx

         }
     }
 
-	//#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#
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.