summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2015-09-22 09:54:49 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2015-09-22 11:22:45 +0200
commit6dec4dce4dea643b7b6e7ab7f0513128d25882af (patch)
tree663501e1bb3b777c723343d9a26c7740ed64adcc
parentf4badd9a485f32f787d78431ed673e2932973887 (diff)
Cleanup: Reduce indentation
Change-Id: I12359c7063d4c2f160a4410a9e529f201ed1ffcd
-rw-r--r--sw/source/core/doc/DocumentStylePoolManager.cxx51
1 files changed, 23 insertions, 28 deletions
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index 71fbb0ce1b39..9f05e1725833 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -184,35 +184,34 @@ namespace
DefaultFontType::CTL_TEXT, rSet );
}
- if( pColl )
+ if( !pColl )
+ return;
+
+ if( !( nOutLvlBits & ( 1 << nLevel )) )
{
- if( !( nOutLvlBits & ( 1 << nLevel )) )
+ pColl->AssignToListLevelOfOutlineStyle(nLevel);
+ if( !bHTMLMode )
{
- pColl->AssignToListLevelOfOutlineStyle(nLevel);
- if( !bHTMLMode )
+ SwNumRule * pOutlineRule = pDoc->GetOutlineNumRule();
+ const SwNumFormat& rNFormat = pOutlineRule->Get( nLevel );
+
+ if ( rNFormat.GetPositionAndSpaceMode() ==
+ SvxNumberFormat::LABEL_WIDTH_AND_POSITION &&
+ ( rNFormat.GetAbsLSpace() || rNFormat.GetFirstLineOffset() ) )
{
- SwNumRule * pOutlineRule = pDoc->GetOutlineNumRule();
- const SwNumFormat& rNFormat = pOutlineRule->Get( nLevel );
-
- if ( rNFormat.GetPositionAndSpaceMode() ==
- SvxNumberFormat::LABEL_WIDTH_AND_POSITION &&
- ( rNFormat.GetAbsLSpace() || rNFormat.GetFirstLineOffset() ) )
- {
- SvxLRSpaceItem aLR( static_cast<const SvxLRSpaceItem&>(pColl->GetFormatAttr( RES_LR_SPACE )) );
- aLR.SetTextFirstLineOfstValue( rNFormat.GetFirstLineOffset() );
- aLR.SetTextLeft( rNFormat.GetAbsLSpace() );
- pColl->SetFormatAttr( aLR );
- }
-
- // All paragraph styles, which are assigned to a level of the
- // outline style has to have the outline style set as its list style.
- SwNumRuleItem aItem(pOutlineRule->GetName());
- pColl->SetFormatAttr(aItem);
+ SvxLRSpaceItem aLR( static_cast<const SvxLRSpaceItem&>(pColl->GetFormatAttr( RES_LR_SPACE )) );
+ aLR.SetTextFirstLineOfstValue( rNFormat.GetFirstLineOffset() );
+ aLR.SetTextLeft( rNFormat.GetAbsLSpace() );
+ pColl->SetFormatAttr( aLR );
}
+
+ // All paragraph styles, which are assigned to a level of the
+ // outline style has to have the outline style set as its list style.
+ SwNumRuleItem aItem(pOutlineRule->GetName());
+ pColl->SetFormatAttr(aItem);
}
- pColl->SetNextTextFormatColl( *pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool(
- RES_POOLCOLL_TEXT ));
}
+ pColl->SetNextTextFormatColl( *pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_TEXT ));
}
static void lcl_SetRegister( SwDoc* pDoc, SfxItemSet& rSet, sal_uInt16 nFact,
@@ -1075,11 +1074,7 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
}
if( aSet.Count() )
- {
- {
- pNewColl->SetFormatAttr( aSet );
- }
- }
+ pNewColl->SetFormatAttr( aSet );
return pNewColl;
}