diff options
Diffstat (limited to 'sw/source/core/attr/format.cxx')
-rw-r--r-- | sw/source/core/attr/format.cxx | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx index 6a296782ce6c..f1c9142b7193 100644 --- a/sw/source/core/attr/format.cxx +++ b/sw/source/core/attr/format.cxx @@ -48,7 +48,7 @@ TYPEINIT1( SwFmt, SwClient ); //rtti fuer SwFmt SwFmt::SwFmt( SwAttrPool& rPool, const sal_Char* pFmtNm, - const USHORT* pWhichRanges, SwFmt *pDrvdFrm, USHORT nFmtWhich ) + const sal_uInt16* pWhichRanges, SwFmt *pDrvdFrm, sal_uInt16 nFmtWhich ) : SwModify( pDrvdFrm ), aSet( rPool, pWhichRanges ), nWhichId( nFmtWhich ), @@ -58,8 +58,8 @@ SwFmt::SwFmt( SwAttrPool& rPool, const sal_Char* pFmtNm, nPoolHlpFileId( UCHAR_MAX ) { aFmtName.AssignAscii( pFmtNm ); - bWritten = bFmtInDTOR = bAutoUpdateFmt = FALSE; // LAYER_IMPL - bAutoFmt = TRUE; + bWritten = bFmtInDTOR = bAutoUpdateFmt = sal_False; // LAYER_IMPL + bAutoFmt = sal_True; if( pDrvdFrm ) aSet.SetParent( &pDrvdFrm->aSet ); @@ -67,7 +67,7 @@ SwFmt::SwFmt( SwAttrPool& rPool, const sal_Char* pFmtNm, SwFmt::SwFmt( SwAttrPool& rPool, const String &rFmtNm, - const USHORT* pWhichRanges, SwFmt *pDrvdFrm, USHORT nFmtWhich ) + const sal_uInt16* pWhichRanges, SwFmt *pDrvdFrm, sal_uInt16 nFmtWhich ) : SwModify( pDrvdFrm ), aFmtName( rFmtNm ), aSet( rPool, pWhichRanges ), @@ -77,8 +77,8 @@ SwFmt::SwFmt( SwAttrPool& rPool, const String &rFmtNm, nPoolHelpId( USHRT_MAX ), nPoolHlpFileId( UCHAR_MAX ) { - bWritten = bFmtInDTOR = bAutoUpdateFmt = FALSE; // LAYER_IMPL - bAutoFmt = TRUE; + bWritten = bFmtInDTOR = bAutoUpdateFmt = sal_False; // LAYER_IMPL + bAutoFmt = sal_True; if( pDrvdFrm ) aSet.SetParent( &pDrvdFrm->aSet ); @@ -95,7 +95,7 @@ SwFmt::SwFmt( const SwFmt& rFmt ) nPoolHelpId( rFmt.GetPoolHelpId() ), nPoolHlpFileId( rFmt.GetPoolHlpFileId() ) { - bWritten = bFmtInDTOR = FALSE; // LAYER_IMPL + bWritten = bFmtInDTOR = sal_False; // LAYER_IMPL bAutoFmt = rFmt.bAutoFmt; bAutoUpdateFmt = rFmt.bAutoUpdateFmt; @@ -124,9 +124,9 @@ SwFmt &SwFmt::operator=(const SwFmt& rFmt) if ( IsInCache() ) { SwFrm::GetCache().Delete( this ); - SetInCache( FALSE ); + SetInCache( sal_False ); } - SetInSwFntCache( FALSE ); + SetInSwFntCache( sal_False ); // kopiere nur das Attribut-Delta Array SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ), @@ -193,16 +193,16 @@ void SwFmt::SetName( const String& rNewName, sal_Bool bBroadcast ) * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ -void SwFmt::CopyAttrs( const SwFmt& rFmt, BOOL bReplace ) +void SwFmt::CopyAttrs( const SwFmt& rFmt, sal_Bool bReplace ) { // kopiere nur das Attribut-Delta Array if ( IsInCache() ) { SwFrm::GetCache().Delete( this ); - SetInCache( FALSE ); + SetInCache( sal_False ); } - SetInSwFntCache( FALSE ); + SetInSwFntCache( sal_False ); // Sonderbehandlung fuer einige Attribute SwAttrSet* pChgSet = (SwAttrSet*)&rFmt.aSet; @@ -254,7 +254,7 @@ SwFmt::~SwFmt() { ASSERT(DerivedFrom(), "SwFmt::~SwFmt: Def Abhaengige!" ); - bFmtInDTOR = TRUE; + bFmtInDTOR = sal_True; SwFmt *pParentFmt = DerivedFrom(); if (!pParentFmt) // see #112405# @@ -287,9 +287,9 @@ SwFmt::~SwFmt() void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue ) { - BOOL bWeiter = TRUE; // TRUE = Propagierung an die Abhaengigen + sal_Bool bWeiter = sal_True; // sal_True = Propagierung an die Abhaengigen - USHORT nWhich = pOldValue ? pOldValue->Which() : + sal_uInt16 nWhich = pOldValue ? pOldValue->Which() : pNewValue ? pNewValue->Which() : 0 ; switch( nWhich ) { @@ -333,7 +333,7 @@ void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue ) if( aNew.Count() ) // keine mehr gesetzt, dann Ende !! SwModify::Modify( &aOld, &aNew ); - bWeiter = FALSE; + bWeiter = sal_False; } break; case RES_FMT_CHG: @@ -359,7 +359,7 @@ void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue ) pClient = aIter.Next() ) pClient->Modify( pOldValue, pNewValue ); - bWeiter = FALSE; + bWeiter = sal_False; } break; @@ -367,14 +367,14 @@ void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue ) { // Ist das Attribut in diesem Format definiert, dann auf // NICHT weiter propagieren !! - if( SFX_ITEM_SET == aSet.GetItemState( nWhich, FALSE )) + if( SFX_ITEM_SET == aSet.GetItemState( nWhich, sal_False )) { // wie finde ich heraus, ob nicht ich die Message versende ?? // aber wer ruft das hier ???? -//ASSERT( FALSE, "Modify ohne Absender verschickt" ); +//ASSERT( sal_False, "Modify ohne Absender verschickt" ); //JP 11.06.96: DropCaps koennen hierher kommen ASSERT( RES_PARATR_DROP == nWhich, "Modify ohne Absender verschickt" ); - bWeiter = FALSE; + bWeiter = sal_False; } } // default @@ -389,7 +389,7 @@ ASSERT( RES_PARATR_DROP == nWhich, "Modify ohne Absender verschickt" ); } -BOOL SwFmt::SetDerivedFrom(SwFmt *pDerFrom) +sal_Bool SwFmt::SetDerivedFrom(SwFmt *pDerFrom) { if ( pDerFrom ) { @@ -398,7 +398,7 @@ BOOL SwFmt::SetDerivedFrom(SwFmt *pDerFrom) while ( pFmt != 0 ) { if ( pFmt == this ) - return FALSE; + return sal_False; pFmt=pFmt->DerivedFrom(); } @@ -411,7 +411,7 @@ BOOL SwFmt::SetDerivedFrom(SwFmt *pDerFrom) pDerFrom = pDerFrom->DerivedFrom(); } if ( (pDerFrom == DerivedFrom()) || (pDerFrom == this) ) - return FALSE; + return sal_False; ASSERT( Which()==pDerFrom->Which() || ( Which()==RES_CONDTXTFMTCOLL && pDerFrom->Which()==RES_TXTFMTCOLL) @@ -422,9 +422,9 @@ BOOL SwFmt::SetDerivedFrom(SwFmt *pDerFrom) if ( IsInCache() ) { SwFrm::GetCache().Delete( this ); - SetInCache( FALSE ); + SetInCache( sal_False ); } - SetInSwFntCache( FALSE ); + SetInSwFntCache( sal_False ); pDerFrom->Add(this); aSet.SetParent( &pDerFrom->aSet ); @@ -433,22 +433,22 @@ BOOL SwFmt::SetDerivedFrom(SwFmt *pDerFrom) SwFmtChg aNewFmt(this); Modify( &aOldFmt, &aNewFmt ); - return TRUE; + return sal_True; } -BOOL SwFmt::SetFmtAttr(const SfxPoolItem& rAttr ) +sal_Bool SwFmt::SetFmtAttr(const SfxPoolItem& rAttr ) { if ( IsInCache() || IsInSwFntCache() ) { - const USHORT nWhich = rAttr.Which(); + const sal_uInt16 nWhich = rAttr.Which(); CheckCaching( nWhich ); } // wenn Modify gelockt ist, werden keine Modifies verschickt; // fuer FrmFmt's immer das Modify verschicken! - BOOL bRet = FALSE; - const USHORT nFmtWhich = Which(); + sal_Bool bRet = sal_False; + const sal_uInt16 nFmtWhich = Which(); if( IsModifyLocked() || (!GetDepends() && (RES_GRFFMTCOLL == nFmtWhich || RES_TXTFMTCOLL == nFmtWhich ) ) ) @@ -483,22 +483,22 @@ BOOL SwFmt::SetFmtAttr(const SfxPoolItem& rAttr ) } -BOOL SwFmt::SetFmtAttr( const SfxItemSet& rSet ) +sal_Bool SwFmt::SetFmtAttr( const SfxItemSet& rSet ) { if( !rSet.Count() ) - return FALSE; + return sal_False; if ( IsInCache() ) { SwFrm::GetCache().Delete( this ); - SetInCache( FALSE ); + SetInCache( sal_False ); } - SetInSwFntCache( FALSE ); + SetInSwFntCache( sal_False ); // wenn Modify gelockt ist, werden keine Modifies verschickt; // fuer FrmFmt's immer das Modify verschicken! - BOOL bRet = FALSE; - const USHORT nFmtWhich = Which(); + sal_Bool bRet = sal_False; + const sal_uInt16 nFmtWhich = Which(); if ( IsModifyLocked() || ( !GetDepends() && ( RES_GRFFMTCOLL == nFmtWhich || @@ -533,17 +533,17 @@ BOOL SwFmt::SetFmtAttr( const SfxItemSet& rSet ) // Nimmt den Hint mit nWhich aus dem Delta-Array -BOOL SwFmt::ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 ) +sal_Bool SwFmt::ResetFmtAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 ) { if( !aSet.Count() ) - return FALSE; + return sal_False; if( !nWhich2 || nWhich2 < nWhich1 ) nWhich2 = nWhich1; // dann setze auf 1. Id, nur dieses Item if ( IsInCache() || IsInSwFntCache() ) { - for( USHORT n = nWhich1; n < nWhich2; ++n ) + for( sal_uInt16 n = nWhich1; n < nWhich2; ++n ) CheckCaching( n ); } @@ -555,7 +555,7 @@ BOOL SwFmt::ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 ) SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ), aNew( *aSet.GetPool(), aSet.GetRanges() ); - BOOL bRet = 0 != aSet.ClearItem_BC( nWhich1, nWhich2, &aOld, &aNew ); + sal_Bool bRet = 0 != aSet.ClearItem_BC( nWhich1, nWhich2, &aOld, &aNew ); if( bRet ) { @@ -570,7 +570,7 @@ BOOL SwFmt::ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 ) // --> OD 2007-01-24 #i73790# // method renamed -USHORT SwFmt::ResetAllFmtAttr() +sal_uInt16 SwFmt::ResetAllFmtAttr() // <-- { if( !aSet.Count() ) @@ -579,9 +579,9 @@ USHORT SwFmt::ResetAllFmtAttr() if ( IsInCache() ) { SwFrm::GetCache().Delete( this ); - SetInCache( FALSE ); + SetInCache( sal_False ); } - SetInSwFntCache( FALSE ); + SetInSwFntCache( sal_False ); // wenn Modify gelockt ist, werden keine Modifies verschickt if( IsModifyLocked() ) @@ -589,7 +589,7 @@ USHORT SwFmt::ResetAllFmtAttr() SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ), aNew( *aSet.GetPool(), aSet.GetRanges() ); - BOOL bRet = 0 != aSet.ClearItem_BC( 0, &aOld, &aNew ); + sal_Bool bRet = 0 != aSet.ClearItem_BC( 0, &aOld, &aNew ); if( bRet ) { @@ -610,9 +610,9 @@ USHORT SwFmt::ResetAllFmtAttr() *************************************************************************/ -BOOL SwFmt::GetInfo( SfxPoolItem& rInfo ) const +sal_Bool SwFmt::GetInfo( SfxPoolItem& rInfo ) const { - BOOL bRet = SwModify::GetInfo( rInfo ); + sal_Bool bRet = SwModify::GetInfo( rInfo ); return bRet; } @@ -625,9 +625,9 @@ void SwFmt::DelDiffs( const SfxItemSet& rSet ) if ( IsInCache() ) { SwFrm::GetCache().Delete( this ); - SetInCache( FALSE ); + SetInCache( sal_False ); } - SetInSwFntCache( FALSE ); + SetInSwFntCache( sal_False ); // wenn Modify gelockt ist, werden keine Modifies verschickt if( IsModifyLocked() ) @@ -638,7 +638,7 @@ void SwFmt::DelDiffs( const SfxItemSet& rSet ) SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ), aNew( *aSet.GetPool(), aSet.GetRanges() ); - BOOL bRet = 0 != aSet.Intersect_BC( rSet, &aOld, &aNew ); + sal_Bool bRet = 0 != aSet.Intersect_BC( rSet, &aOld, &aNew ); if( bRet ) { |