diff options
Diffstat (limited to 'sw/source/core/doc/fmtcol.cxx')
-rw-r--r-- | sw/source/core/doc/fmtcol.cxx | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx index cb0b44b66822..c43e363e3a72 100644 --- a/sw/source/core/doc/fmtcol.cxx +++ b/sw/source/core/doc/fmtcol.cxx @@ -83,7 +83,7 @@ namespace TxtFmtCollFunc { if ( !pNewNumRuleItem ) { - pTxtFmtColl->GetItemState( RES_PARATR_NUMRULE, FALSE, (const SfxPoolItem**)&pNewNumRuleItem ); + pTxtFmtColl->GetItemState( RES_PARATR_NUMRULE, sal_False, (const SfxPoolItem**)&pNewNumRuleItem ); } if ( pNewNumRuleItem ) { @@ -104,7 +104,7 @@ namespace TxtFmtCollFunc SwNumRule* pNumRule( 0 ); const SwNumRuleItem* pNumRuleItem( 0 ); - rTxtFmtColl.GetItemState( RES_PARATR_NUMRULE, FALSE, (const SfxPoolItem**)&pNumRuleItem ); + rTxtFmtColl.GetItemState( RES_PARATR_NUMRULE, sal_False, (const SfxPoolItem**)&pNumRuleItem ); if ( pNumRuleItem ) { const String sNumRuleName = pNumRuleItem->GetValue(); @@ -169,22 +169,22 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) pNewChgSet = (SwAttrSetChg*)pNew; pOldChgSet = (SwAttrSetChg*)pOld; pNewChgSet->GetChgSet()->GetItemState( - RES_LR_SPACE, FALSE, (const SfxPoolItem**)&pNewLRSpace ); + RES_LR_SPACE, sal_False, (const SfxPoolItem**)&pNewLRSpace ); pNewChgSet->GetChgSet()->GetItemState( - RES_UL_SPACE, FALSE, (const SfxPoolItem**)&pNewULSpace ); + RES_UL_SPACE, sal_False, (const SfxPoolItem**)&pNewULSpace ); pNewChgSet->GetChgSet()->GetItemState( RES_CHRATR_FONTSIZE, - FALSE, (const SfxPoolItem**)&(aFontSizeArr[0]) ); + sal_False, (const SfxPoolItem**)&(aFontSizeArr[0]) ); pNewChgSet->GetChgSet()->GetItemState( RES_CHRATR_CJK_FONTSIZE, - FALSE, (const SfxPoolItem**)&(aFontSizeArr[1]) ); + sal_False, (const SfxPoolItem**)&(aFontSizeArr[1]) ); pNewChgSet->GetChgSet()->GetItemState( RES_CHRATR_CTL_FONTSIZE, - FALSE, (const SfxPoolItem**)&(aFontSizeArr[2]) ); + sal_False, (const SfxPoolItem**)&(aFontSizeArr[2]) ); // --> OD 2006-10-17 #i70223# // --> OD 2007-12-19 #i84745# // check, if attribute set is applied to this paragraph style if ( bAssignedToListLevelOfOutlineStyle && pNewChgSet->GetTheChgdSet() == &GetAttrSet() ) { - pNewChgSet->GetChgSet()->GetItemState( RES_PARATR_NUMRULE, FALSE, + pNewChgSet->GetChgSet()->GetItemState( RES_PARATR_NUMRULE, sal_False, (const SfxPoolItem**)&pNewNumRuleItem ); } // <-- @@ -242,13 +242,13 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) } // <-- - int bWeiter = TRUE; + int bWeiter = sal_True; // dann pruefe doch mal gegen die eigenen Attribute - if( pNewLRSpace && SFX_ITEM_SET == GetItemState( RES_LR_SPACE, FALSE, + if( pNewLRSpace && SFX_ITEM_SET == GetItemState( RES_LR_SPACE, sal_False, (const SfxPoolItem**)&pOldLRSpace )) { - int bChg = FALSE; + int bChg = sal_False; if( pOldLRSpace != pNewLRSpace ) // verhinder Rekursion (SetAttr!!) { SvxLRSpaceItem aNew( *pOldLRSpace ); @@ -287,22 +287,22 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) } if( pNewULSpace && SFX_ITEM_SET == GetItemState( - RES_UL_SPACE, FALSE, (const SfxPoolItem**)&pOldULSpace ) && + RES_UL_SPACE, sal_False, (const SfxPoolItem**)&pOldULSpace ) && pOldULSpace != pNewULSpace ) // verhinder Rekursion (SetAttr!!) { SvxULSpaceItem aNew( *pOldULSpace ); - int bChg = FALSE; + int bChg = sal_False; // wir hatten eine relative Angabe -> neu berechnen if( 100 != aNew.GetPropUpper() ) { - USHORT nTmp = aNew.GetUpper(); // alten zum Vergleichen + sal_uInt16 nTmp = aNew.GetUpper(); // alten zum Vergleichen aNew.SetUpper( pNewULSpace->GetUpper(), aNew.GetPropUpper() ); bChg |= nTmp != aNew.GetUpper(); } // wir hatten eine relative Angabe -> neu berechnen if( 100 != aNew.GetPropLower() ) { - USHORT nTmp = aNew.GetLower(); // alten zum Vergleichen + sal_uInt16 nTmp = aNew.GetLower(); // alten zum Vergleichen aNew.SetLower( pNewULSpace->GetLower(), aNew.GetPropLower() ); bChg |= nTmp != aNew.GetLower(); } @@ -323,7 +323,7 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) { SvxFontHeightItem *pFSize = aFontSizeArr[ nC ], *pOldFSize; if( pFSize && SFX_ITEM_SET == GetItemState( - pFSize->Which(), FALSE, (const SfxPoolItem**)&pOldFSize ) && + pFSize->Which(), sal_False, (const SfxPoolItem**)&pOldFSize ) && // verhinder Rekursion (SetAttr!!) pFSize != pOldFSize ) { @@ -338,7 +338,7 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) else { // wir hatten eine relative Angabe -> neu berechnen - UINT32 nTmp = pOldFSize->GetHeight(); // alten zum Vergleichen + sal_uInt32 nTmp = pOldFSize->GetHeight(); // alten zum Vergleichen SvxFontHeightItem aNew(240 , 100, pFSize->Which()); aNew.SetHeight( pFSize->GetHeight(), pOldFSize->GetProp(), pOldFSize->GetPropUnit() ); @@ -359,19 +359,19 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew ) SwFmtColl::Modify( pOld, pNew ); } -BOOL SwTxtFmtColl::IsAtDocNodeSet() const +sal_Bool SwTxtFmtColl::IsAtDocNodeSet() const { SwClientIter aIter( *(SwModify*)this ); const SwNodes& rNds = GetDoc()->GetNodes(); for( SwClient* pC = aIter.First(TYPE(SwCntntNode)); pC; pC = aIter.Next() ) if( &((SwCntntNode*)pC)->GetNodes() == &rNds ) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } // --> OD 2008-03-04 #refactorlists# -BOOL SwTxtFmtColl::SetFmtAttr( const SfxPoolItem& rAttr ) +sal_Bool SwTxtFmtColl::SetFmtAttr( const SfxPoolItem& rAttr ) { const bool bIsNumRuleItem = rAttr.Which() == RES_PARATR_NUMRULE; if ( bIsNumRuleItem ) @@ -379,7 +379,7 @@ BOOL SwTxtFmtColl::SetFmtAttr( const SfxPoolItem& rAttr ) TxtFmtCollFunc::RemoveFromNumRule( *this ); } - const BOOL bRet = SwFmtColl::SetFmtAttr( rAttr ); + const sal_Bool bRet = SwFmtColl::SetFmtAttr( rAttr ); if ( bIsNumRuleItem ) { @@ -389,16 +389,16 @@ BOOL SwTxtFmtColl::SetFmtAttr( const SfxPoolItem& rAttr ) return bRet; } -BOOL SwTxtFmtColl::SetFmtAttr( const SfxItemSet& rSet ) +sal_Bool SwTxtFmtColl::SetFmtAttr( const SfxItemSet& rSet ) { const bool bIsNumRuleItemAffected = - rSet.GetItemState( RES_PARATR_NUMRULE, FALSE ) == SFX_ITEM_SET; + rSet.GetItemState( RES_PARATR_NUMRULE, sal_False ) == SFX_ITEM_SET; if ( bIsNumRuleItemAffected ) { TxtFmtCollFunc::RemoveFromNumRule( *this ); } - const BOOL bRet = SwFmtColl::SetFmtAttr( rSet ); + const sal_Bool bRet = SwFmtColl::SetFmtAttr( rSet ); if ( bIsNumRuleItemAffected ) { @@ -408,7 +408,7 @@ BOOL SwTxtFmtColl::SetFmtAttr( const SfxItemSet& rSet ) return bRet; } -BOOL SwTxtFmtColl::ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 ) +sal_Bool SwTxtFmtColl::ResetFmtAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 ) { const bool bIsNumRuleItemAffected = ( nWhich2 != 0 && nWhich2 > nWhich1 ) @@ -420,14 +420,14 @@ BOOL SwTxtFmtColl::ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 ) TxtFmtCollFunc::RemoveFromNumRule( *this ); } - const BOOL bRet = SwFmtColl::ResetFmtAttr( nWhich1, nWhich2 ); + const sal_Bool bRet = SwFmtColl::ResetFmtAttr( nWhich1, nWhich2 ); return bRet; } // <-- // --> OD 2007-01-24 #i73790# -USHORT SwTxtFmtColl::ResetAllFmtAttr() +sal_uInt16 SwTxtFmtColl::ResetAllFmtAttr() { const bool bOldState( mbStayAssignedToListLevelOfOutlineStyle ); mbStayAssignedToListLevelOfOutlineStyle = true; @@ -440,7 +440,7 @@ USHORT SwTxtFmtColl::ResetAllFmtAttr() : -1; // <-- - USHORT nRet = SwFmtColl::ResetAllFmtAttr(); + sal_uInt16 nRet = SwFmtColl::ResetAllFmtAttr(); // --> OD 2008-12-16 #i70748# if ( nAssignedOutlineStyleLevel != -1 ) @@ -465,12 +465,12 @@ bool SwTxtFmtColl::AreListLevelIndentsApplicable() const // no list style applied to paragraph style bAreListLevelIndentsApplicable = false; } - else if ( GetItemState( RES_LR_SPACE, FALSE ) == SFX_ITEM_SET ) + else if ( GetItemState( RES_LR_SPACE, sal_False ) == SFX_ITEM_SET ) { // paragraph style has hard-set indent attributes bAreListLevelIndentsApplicable = false; } - else if ( GetItemState( RES_PARATR_NUMRULE, FALSE ) == SFX_ITEM_SET ) + else if ( GetItemState( RES_PARATR_NUMRULE, sal_False ) == SFX_ITEM_SET ) { // list style is directly applied to paragraph style and paragraph // style has no hard-set indent attributes @@ -485,14 +485,14 @@ bool SwTxtFmtColl::AreListLevelIndentsApplicable() const const SwTxtFmtColl* pColl = dynamic_cast<const SwTxtFmtColl*>(DerivedFrom()); while ( pColl ) { - if ( pColl->GetAttrSet().GetItemState( RES_LR_SPACE, FALSE ) == SFX_ITEM_SET ) + if ( pColl->GetAttrSet().GetItemState( RES_LR_SPACE, sal_False ) == SFX_ITEM_SET ) { // indent attributes found in the paragraph style hierarchy. bAreListLevelIndentsApplicable = false; break; } - if ( pColl->GetAttrSet().GetItemState( RES_PARATR_NUMRULE, FALSE ) == SFX_ITEM_SET ) + if ( pColl->GetAttrSet().GetItemState( RES_PARATR_NUMRULE, sal_False ) == SFX_ITEM_SET ) { // paragraph style with the list style found and until now no // indent attributes are found in the paragraph style hierarchy. @@ -512,15 +512,15 @@ bool SwTxtFmtColl::AreListLevelIndentsApplicable() const //FEATURE::CONDCOLL -SwCollCondition::SwCollCondition( SwTxtFmtColl* pColl, ULONG nMasterCond, - ULONG nSubCond ) +SwCollCondition::SwCollCondition( SwTxtFmtColl* pColl, sal_uLong nMasterCond, + sal_uLong nSubCond ) : SwClient( pColl ), nCondition( nMasterCond ) { aSubCondition.nSubCondition = nSubCond; } -SwCollCondition::SwCollCondition( SwTxtFmtColl* pColl, ULONG nMasterCond, +SwCollCondition::SwCollCondition( SwTxtFmtColl* pColl, sal_uLong nMasterCond, const String& rSubExp ) : SwClient( pColl ), nCondition( nMasterCond ) { @@ -580,7 +580,7 @@ int SwCollCondition::operator==( const SwCollCondition& rCmp ) const } -void SwCollCondition::SetCondition( ULONG nCond, ULONG nSubCond ) +void SwCollCondition::SetCondition( sal_uLong nCond, sal_uLong nSubCond ) { if( USRFLD_EXPRESSION & nCondition ) delete aSubCondition.pFldExpression; @@ -597,7 +597,7 @@ const SwCollCondition* SwConditionTxtFmtColl::HasCondition( const SwCollCondition& rCond ) const { const SwCollCondition* pFnd = 0; - USHORT n; + sal_uInt16 n; for( n = 0; n < aCondColls.Count(); ++n ) if( *( pFnd = aCondColls[ n ]) == rCond ) @@ -609,7 +609,7 @@ const SwCollCondition* SwConditionTxtFmtColl::HasCondition( void SwConditionTxtFmtColl::InsertCondition( const SwCollCondition& rCond ) { - for( USHORT n = 0; n < aCondColls.Count(); ++n ) + for( sal_uInt16 n = 0; n < aCondColls.Count(); ++n ) if( *aCondColls[ n ] == rCond ) { aCondColls.DeleteAndDestroy( n ); @@ -622,14 +622,14 @@ void SwConditionTxtFmtColl::InsertCondition( const SwCollCondition& rCond ) } -BOOL SwConditionTxtFmtColl::RemoveCondition( const SwCollCondition& rCond ) +sal_Bool SwConditionTxtFmtColl::RemoveCondition( const SwCollCondition& rCond ) { - BOOL bRet = FALSE; - for( USHORT n = 0; n < aCondColls.Count(); ++n ) + sal_Bool bRet = sal_False; + for( sal_uInt16 n = 0; n < aCondColls.Count(); ++n ) if( *aCondColls[ n ] == rCond ) { aCondColls.DeleteAndDestroy( n ); - bRet = TRUE; + bRet = sal_True; } return bRet; @@ -642,7 +642,7 @@ void SwConditionTxtFmtColl::SetConditions( const SwFmtCollConditions& rCndClls ) if( aCondColls.Count() ) aCondColls.DeleteAndDestroy( 0, aCondColls.Count() ); SwDoc& rDoc = *GetDoc(); - for( USHORT n = 0; n < rCndClls.Count(); ++n ) + for( sal_uInt16 n = 0; n < rCndClls.Count(); ++n ) { SwCollCondition* pFnd = rCndClls[ n ]; SwTxtFmtColl* pTmpColl = pFnd->GetTxtFmtColl() @@ -663,7 +663,7 @@ void SwTxtFmtColl::SetAttrOutlineLevel( int nLevel) { ASSERT( 0 <= nLevel && nLevel <= MAXLEVEL ,"SwTxtFmtColl: Level Out Of Range" ); SetFmtAttr( SfxUInt16Item( RES_PARATR_OUTLINELEVEL, - static_cast<UINT16>(nLevel) ) ); + static_cast<sal_uInt16>(nLevel) ) ); } int SwTxtFmtColl::GetAttrOutlineLevel() const @@ -691,12 +691,12 @@ void SwTxtFmtColl::AssignToListLevelOfOutlineStyle(const int nAssignedListLevel) { if ( !pDerivedTxtFmtColl->IsAssignedToListLevelOfOutlineStyle() ) { - if ( pDerivedTxtFmtColl->GetItemState( RES_PARATR_NUMRULE, FALSE ) == SFX_ITEM_DEFAULT ) + if ( pDerivedTxtFmtColl->GetItemState( RES_PARATR_NUMRULE, sal_False ) == SFX_ITEM_DEFAULT ) { SwNumRuleItem aItem(aEmptyStr); pDerivedTxtFmtColl->SetFmtAttr( aItem ); } - if ( pDerivedTxtFmtColl->GetItemState( RES_PARATR_OUTLINELEVEL, FALSE ) == SFX_ITEM_DEFAULT ) + if ( pDerivedTxtFmtColl->GetItemState( RES_PARATR_OUTLINELEVEL, sal_False ) == SFX_ITEM_DEFAULT ) { pDerivedTxtFmtColl->SetAttrOutlineLevel( 0 ); } |