diff options
author | Carsten Driesner <cd@openoffice.org> | 2011-01-17 15:06:54 +0100 |
---|---|---|
committer | Carsten Driesner <cd@openoffice.org> | 2011-01-17 15:06:54 +0100 |
commit | 7f33ed417b2e29e5470724ea76967f64699a2662 (patch) | |
tree | abfa1432c5ffffe4c7502d4ddcaee918c584c69c /sw/source/ui/app/docstyle.cxx | |
parent | 80731dbfcb48a2ffec30a4b2abe1ba8ada8f0169 (diff) |
removetooltypes01: #i112600# Remove tools types from sw
Diffstat (limited to 'sw/source/ui/app/docstyle.cxx')
-rw-r--r-- | sw/source/ui/app/docstyle.cxx | 414 |
1 files changed, 207 insertions, 207 deletions
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx index b0b81c5df6e4..cc7792038f32 100644 --- a/sw/source/ui/app/docstyle.cxx +++ b/sw/source/ui/app/docstyle.cxx @@ -84,7 +84,7 @@ // die Familie wird neu generiert. // Ausserdem gibt es jetzt zusaetzlich das Bit bPhysical. Ist dieses Bit -// TRUE, werden die Pool-Formatnamen NICHT mit eingetragen. +// sal_True, werden die Pool-Formatnamen NICHT mit eingetragen. class SwImplShellAction { @@ -129,7 +129,7 @@ SwImplShellAction::~SwImplShellAction() SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc, const String& rName, SwDocStyleSheet* pStyle = 0, - BOOL bCreate = TRUE ) + sal_Bool bCreate = sal_True ) { SwCharFmt* pFmt = 0; if( rName.Len() ) @@ -144,7 +144,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc, if( !pFmt && bCreate ) { // Pool abklappern - const USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); + const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); if(nId != USHRT_MAX) pFmt = rDoc.GetCharFmtFromPool(nId); } @@ -153,7 +153,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc, { if(pFmt) { - pStyle->SetPhysical(TRUE); + pStyle->SetPhysical(sal_True); SwFmt* p = pFmt->DerivedFrom(); if( p && !p->IsDefault() ) pStyle->PresetParent( p->GetName() ); @@ -161,7 +161,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc, pStyle->PresetParent( aEmptyStr ); } else - pStyle->SetPhysical(FALSE); + pStyle->SetPhysical(sal_False); } return pFmt; } @@ -175,7 +175,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc, SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc, const String& rName, SwDocStyleSheet* pStyle = 0, - BOOL bCreate = TRUE ) + sal_Bool bCreate = sal_True ) { SwTxtFmtColl* pColl = 0; @@ -184,7 +184,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc, pColl = rDoc.FindTxtFmtCollByName( rName ); if( !pColl && bCreate ) { // Pool abklappern - const USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL); + const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL); if(nId != USHRT_MAX) pColl = rDoc.GetTxtCollFromPool(nId); } @@ -194,7 +194,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc, { if(pColl) { - pStyle->SetPhysical(TRUE); + pStyle->SetPhysical(sal_True); if( pColl->DerivedFrom() && !pColl->DerivedFrom()->IsDefault() ) pStyle->PresetParent( pColl->DerivedFrom()->GetName() ); else @@ -204,7 +204,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc, pStyle->PresetFollow(rNext.GetName()); } else - pStyle->SetPhysical(FALSE); + pStyle->SetPhysical(sal_False); } return pColl; } @@ -218,7 +218,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc, SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc, const String& rName, SwDocStyleSheet* pStyle = 0, - BOOL bCreate = TRUE ) + sal_Bool bCreate = sal_True ) { SwFrmFmt* pFmt = 0; if( rName.Len() ) @@ -226,7 +226,7 @@ SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc, pFmt = rDoc.FindFrmFmtByName( rName ); if( !pFmt && bCreate ) { // Pool abklappern - const USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT); + const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT); if(nId != USHRT_MAX) pFmt = rDoc.GetFrmFmtFromPool(nId); } @@ -236,14 +236,14 @@ SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc, { if(pFmt) { - pStyle->SetPhysical(TRUE); + pStyle->SetPhysical(sal_True); if( pFmt->DerivedFrom() && !pFmt->DerivedFrom()->IsDefault() ) pStyle->PresetParent( pFmt->DerivedFrom()->GetName() ); else pStyle->PresetParent( aEmptyStr ); } else - pStyle->SetPhysical(FALSE); + pStyle->SetPhysical(sal_False); } return pFmt; } @@ -256,7 +256,7 @@ SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc, const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc, const String& rName, SwDocStyleSheet* pStyle = 0, - BOOL bCreate = TRUE ) + sal_Bool bCreate = sal_True ) { const SwPageDesc* pDesc = 0; @@ -265,7 +265,7 @@ const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc, pDesc = rDoc.FindPageDescByName( rName ); if( !pDesc && bCreate ) { - USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC); if(nId != USHRT_MAX) pDesc = rDoc.GetPageDescFromPool(nId); } @@ -275,14 +275,14 @@ const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc, { if(pDesc) { - pStyle->SetPhysical(TRUE); + pStyle->SetPhysical(sal_True); if(pDesc->GetFollow()) pStyle->PresetFollow(pDesc->GetFollow()->GetName()); else pStyle->PresetParent( aEmptyStr ); } else - pStyle->SetPhysical(FALSE); + pStyle->SetPhysical(sal_False); } return pDesc; } @@ -290,7 +290,7 @@ const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc, const SwNumRule* lcl_FindNumRule( SwDoc& rDoc, const String& rName, SwDocStyleSheet* pStyle = 0, - BOOL bCreate = TRUE ) + sal_Bool bCreate = sal_True ) { const SwNumRule* pRule = 0; @@ -299,7 +299,7 @@ const SwNumRule* lcl_FindNumRule( SwDoc& rDoc, pRule = rDoc.FindNumRulePtr( rName ); if( !pRule && bCreate ) { - USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE); if(nId != USHRT_MAX) pRule = rDoc.GetNumRuleFromPool(nId); } @@ -309,17 +309,17 @@ const SwNumRule* lcl_FindNumRule( SwDoc& rDoc, { if(pRule) { - pStyle->SetPhysical(TRUE); + pStyle->SetPhysical(sal_True); pStyle->PresetParent( aEmptyStr ); } else - pStyle->SetPhysical(FALSE); + pStyle->SetPhysical(sal_False); } return pRule; } -USHORT lcl_FindName( const SwPoolFmtList& rLst, SfxStyleFamily eFam, +sal_uInt16 lcl_FindName( const SwPoolFmtList& rLst, SfxStyleFamily eFam, const String& rName ) { if( rLst.Count() ) @@ -336,30 +336,30 @@ USHORT lcl_FindName( const SwPoolFmtList& rLst, SfxStyleFamily eFam, default:; //prevent warning } sSrch += rName; - for( USHORT i=0; i < rLst.Count(); ++i ) + for( sal_uInt16 i=0; i < rLst.Count(); ++i ) if( *rLst[i] == sSrch ) return i; } return USHRT_MAX; } -BOOL FindPhyStyle( SwDoc& rDoc, const String& rName, SfxStyleFamily eFam ) +sal_Bool FindPhyStyle( SwDoc& rDoc, const String& rName, SfxStyleFamily eFam ) { switch( eFam ) { case SFX_STYLE_FAMILY_CHAR : - return 0 != lcl_FindCharFmt( rDoc, rName, 0, FALSE ); + return 0 != lcl_FindCharFmt( rDoc, rName, 0, sal_False ); case SFX_STYLE_FAMILY_PARA : - return 0 != lcl_FindParaFmt( rDoc, rName, 0, FALSE ); + return 0 != lcl_FindParaFmt( rDoc, rName, 0, sal_False ); case SFX_STYLE_FAMILY_FRAME: - return 0 != lcl_FindFrmFmt( rDoc, rName, 0, FALSE ); + return 0 != lcl_FindFrmFmt( rDoc, rName, 0, sal_False ); case SFX_STYLE_FAMILY_PAGE : - return 0 != lcl_FindPageDesc( rDoc, rName, 0, FALSE ); + return 0 != lcl_FindPageDesc( rDoc, rName, 0, sal_False ); case SFX_STYLE_FAMILY_PSEUDO: - return 0 != lcl_FindNumRule( rDoc, rName, 0, FALSE ); + return 0 != lcl_FindNumRule( rDoc, rName, 0, sal_False ); default:; //prevent warning } - return FALSE; + return sal_False; } @@ -372,7 +372,7 @@ void SwPoolFmtList::Append( char cChar, const String& rStr ) { String* pStr = new String( cChar ); *pStr += rStr; - for ( USHORT i=0; i < Count(); ++i ) + for ( sal_uInt16 i=0; i < Count(); ++i ) { if( *operator[](i) == *pStr ) { @@ -404,7 +404,7 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument, const String& rName, SwDocStyleSheetPool& _rPool, SfxStyleFamily eFam, - USHORT _nMask) : + sal_uInt16 _nMask) : SfxStyleSheetBase( rName, _rPool, eFam, _nMask ), pCharFmt(0), @@ -436,7 +436,7 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument, SID_PARA_BACKGRND_DESTINATION, SID_ATTR_BRUSH_CHAR, SID_ATTR_NUMBERING_RULE, SID_ATTR_NUMBERING_RULE, 0), - bPhysical(FALSE) + bPhysical(sal_False) { nHelpId = UCHAR_MAX; } @@ -470,7 +470,7 @@ void SwDocStyleSheet::Reset() aName.Erase(); aFollow.Erase(); aParent.Erase(); - SetPhysical(FALSE); + SetPhysical(sal_False); } /*-------------------------------------------------------------------- @@ -511,7 +511,7 @@ const String& SwDocStyleSheet::GetParent() const String sTmp; if( !pFmt ) // noch nicht vorhanden, also dflt. Parent { - USHORT i = SwStyleNameMapper::GetPoolIdFromUIName( aName, eGetType ); + sal_uInt16 i = SwStyleNameMapper::GetPoolIdFromUIName( aName, eGetType ); i = ::GetPoolParent( i ); if( i && USHRT_MAX != i ) SwStyleNameMapper::FillUIName( i, sTmp ); @@ -548,19 +548,19 @@ const String& SwDocStyleSheet::GetFollow() const --------------------------------------------------------------------*/ -BOOL SwDocStyleSheet::HasFollowSupport() const +sal_Bool SwDocStyleSheet::HasFollowSupport() const { switch(nFamily) { case SFX_STYLE_FAMILY_PARA : - case SFX_STYLE_FAMILY_PAGE : return TRUE; + case SFX_STYLE_FAMILY_PAGE : return sal_True; case SFX_STYLE_FAMILY_FRAME: case SFX_STYLE_FAMILY_CHAR : - case SFX_STYLE_FAMILY_PSEUDO: return FALSE; + case SFX_STYLE_FAMILY_PSEUDO: return sal_False; default: ASSERT(!this, "unbekannte Style-Familie"); } - return FALSE; + return sal_False; } /*-------------------------------------------------------------------- @@ -568,28 +568,28 @@ BOOL SwDocStyleSheet::HasFollowSupport() const --------------------------------------------------------------------*/ -BOOL SwDocStyleSheet::HasParentSupport() const +sal_Bool SwDocStyleSheet::HasParentSupport() const { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; switch(nFamily) { case SFX_STYLE_FAMILY_CHAR : case SFX_STYLE_FAMILY_PARA : - case SFX_STYLE_FAMILY_FRAME: bRet = TRUE; + case SFX_STYLE_FAMILY_FRAME: bRet = sal_True; default:; //prevent warning } return bRet; } -BOOL SwDocStyleSheet::HasClearParentSupport() const +sal_Bool SwDocStyleSheet::HasClearParentSupport() const { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; switch(nFamily) { case SFX_STYLE_FAMILY_PARA : case SFX_STYLE_FAMILY_CHAR : - case SFX_STYLE_FAMILY_FRAME: bRet = TRUE; + case SFX_STYLE_FAMILY_FRAME: bRet = sal_True; default:; //prevent warning } return bRet; @@ -655,8 +655,8 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit) const SfxPoolItem* pItem = aIter.FirstItem(); String sPageNum, sModel, sBreak; - BOOL bHasWesternFontPrefix = FALSE; - BOOL bHasCJKFontPrefix = FALSE; + sal_Bool bHasWesternFontPrefix = sal_False; + sal_Bool bHasCJKFontPrefix = sal_False; SvtCJKOptions aCJKOptions; while ( pItem ) @@ -682,7 +682,7 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit) *pItem, SFX_ITEM_PRESENTATION_COMPLETE, eUnit, aItemPresentation, &aIntlWrapper ) ) { - BOOL bIsDefault = FALSE; + sal_Bool bIsDefault = sal_False; switch ( pItem->Which() ) { case SID_ATTR_PARA_PAGENUM: @@ -700,11 +700,11 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit) case RES_CHRATR_CJK_POSTURE: case RES_CHRATR_CJK_WEIGHT: if(aCJKOptions.IsCJKFontEnabled()) - bIsDefault = TRUE; + bIsDefault = sal_True; if(!bHasCJKFontPrefix) { aItemPresentation.Insert(SW_RESSTR(STR_CJK_FONT), 0); - bHasCJKFontPrefix = TRUE; + bHasCJKFontPrefix = sal_True; } break; case RES_CHRATR_FONT: @@ -715,12 +715,12 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit) if(!bHasWesternFontPrefix) { aItemPresentation.Insert(SW_RESSTR(STR_WESTERN_FONT), 0); - bHasWesternFontPrefix = TRUE; - bIsDefault = TRUE; + bHasWesternFontPrefix = sal_True; + bIsDefault = sal_True; } // no break; default: - bIsDefault = TRUE; + bIsDefault = sal_True; } if(bIsDefault) { @@ -778,20 +778,20 @@ String SwDocStyleSheet::GetDescription() --------------------------------------------------------------------*/ -BOOL SwDocStyleSheet::SetName( const String& rStr) +sal_Bool SwDocStyleSheet::SetName( const String& rStr) { if( !rStr.Len() ) - return FALSE; + return sal_False; if( aName != rStr ) { if( !SfxStyleSheetBase::SetName( rStr )) - return FALSE; + return sal_False; } else if(!bPhysical) FillStyleSheet( FillPhysical ); - int bChg = FALSE; + int bChg = sal_False; switch(nFamily) { case SFX_STYLE_FAMILY_CHAR : @@ -800,7 +800,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr) if( pCharFmt && pCharFmt->GetName() != rStr ) { pCharFmt->SetName( rStr ); - bChg = TRUE; + bChg = sal_True; } break; } @@ -814,7 +814,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr) else pColl->SetName(rStr); - bChg = TRUE; + bChg = sal_True; } break; } @@ -828,7 +828,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr) else pFrmFmt->SetName( rStr ); - bChg = TRUE; + bChg = sal_True; } break; } @@ -844,7 +844,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr) String aOldName(aPageDesc.GetName()); aPageDesc.SetName( rStr ); - BOOL bDoesUndo = rDoc.DoesUndo(); + sal_Bool bDoesUndo = rDoc.DoesUndo(); rDoc.DoUndo(aOldName.Len() > 0); rDoc.ChgPageDesc(aOldName, aPageDesc); @@ -852,7 +852,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr) // <- #116530# rDoc.SetModified(); - bChg = TRUE; + bChg = sal_True; } break; case SFX_STYLE_FAMILY_PSEUDO: @@ -871,7 +871,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr) pNumRule = rDoc.FindNumRulePtr(rStr); rDoc.SetModified(); - bChg = TRUE; + bChg = sal_True; } } else @@ -881,7 +881,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr) // <-- rDoc.SetModified(); - bChg = TRUE; + bChg = sal_True; } } // <- #106897# @@ -900,7 +900,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr) if( pSh ) pSh->CallChgLnk(); } - return TRUE; + return sal_True; } /*-------------------------------------------------------------------- @@ -908,7 +908,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr) --------------------------------------------------------------------*/ -BOOL SwDocStyleSheet::SetParent( const String& rStr) +sal_Bool SwDocStyleSheet::SetParent( const String& rStr) { SwFmt* pFmt = 0, *pParent = 0; switch(nFamily) @@ -938,7 +938,7 @@ BOOL SwDocStyleSheet::SetParent( const String& rStr) ASSERT(!this, "unbekannte Style-Familie"); } - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( pFmt && pFmt->DerivedFrom() && pFmt->DerivedFrom()->GetName() != rStr ) { @@ -963,10 +963,10 @@ BOOL SwDocStyleSheet::SetParent( const String& rStr) --------------------------------------------------------------------*/ -BOOL SwDocStyleSheet::SetFollow( const String& rStr) +sal_Bool SwDocStyleSheet::SetFollow( const String& rStr) { if( rStr.Len() && !SfxStyleSheetBase::SetFollow( rStr )) - return FALSE; + return sal_False; SwImplShellAction aTmpSh( rDoc ); switch(nFamily) @@ -992,7 +992,7 @@ BOOL SwDocStyleSheet::SetFollow( const String& rStr) const SwPageDesc* pFollowDesc = rStr.Len() ? lcl_FindPageDesc(rDoc, rStr) : 0; - USHORT nId; + sal_uInt16 nId; if( pFollowDesc != pDesc->GetFollow() && rDoc.FindPageDescByName( pDesc->GetName(), &nId ) ) { @@ -1012,7 +1012,7 @@ BOOL SwDocStyleSheet::SetFollow( const String& rStr) ASSERT(!this, "unbekannte Style-Familie"); } - return TRUE; + return sal_True; } /*-------------------------------------------------------------------- @@ -1038,12 +1038,12 @@ SfxItemSet& SwDocStyleSheet::GetItemSet() case SFX_STYLE_FAMILY_FRAME: { SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER ); - aBoxInfo.SetTable( FALSE ); - aBoxInfo.SetDist( TRUE); // Abstandsfeld immer anzeigen - aBoxInfo.SetMinDist( TRUE );// Minimalgroesse in Tabellen und Absaetzen setzen + aBoxInfo.SetTable( sal_False ); + aBoxInfo.SetDist( sal_True); // Abstandsfeld immer anzeigen + aBoxInfo.SetMinDist( sal_True );// Minimalgroesse in Tabellen und Absaetzen setzen aBoxInfo.SetDefDist( MIN_BORDER_DIST );// Default-Abstand immer setzen // Einzelne Linien koennen nur in Tabellen DontCare-Status haben - aBoxInfo.SetValid( VALID_DISABLE, TRUE ); + aBoxInfo.SetValid( VALID_DISABLE, sal_True ); if ( nFamily == SFX_STYLE_FAMILY_PARA ) { ASSERT(pColl, "Wo ist die Collektion"); @@ -1150,7 +1150,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, SwFmt* pFmt = 0; SwPageDesc* pNewDsc = 0; - USHORT nPgDscPos = 0; + sal_uInt16 nPgDscPos = 0; switch(nFamily) { @@ -1165,13 +1165,13 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, { ASSERT(pColl, "Wo ist die Collection"); const SfxPoolItem* pAutoUpdate; - if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,FALSE, &pAutoUpdate )) + if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,sal_False, &pAutoUpdate )) { pColl->SetAutoUpdateFmt(((const SfxBoolItem*)pAutoUpdate)->GetValue()); } const SwCondCollItem* pCondItem; - if( SFX_ITEM_SET != rSet.GetItemState( FN_COND_COLL, FALSE, + if( SFX_ITEM_SET != rSet.GetItemState( FN_COND_COLL, sal_False, (const SfxPoolItem**)&pCondItem )) pCondItem = 0; @@ -1179,13 +1179,13 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, { SwFmt* pFindFmt; const CommandStruct* pCmds = SwCondCollItem::GetCmds(); - for(USHORT i = 0; i < COND_COMMAND_COUNT; i++) + for(sal_uInt16 i = 0; i < COND_COMMAND_COUNT; i++) { SwCollCondition aCond( 0, pCmds[ i ].nCnd, pCmds[ i ].nSubCond ); ((SwConditionTxtFmtColl*)pColl)->RemoveCondition( aCond ); const String& rStyle = pCondItem->GetStyle( i ); if( rStyle.Len() && - 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, TRUE ))) + 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, sal_True ))) { pFindFmt->Add( &aCond ); ((SwConditionTxtFmtColl*)pColl)->InsertCondition( aCond ); @@ -1215,11 +1215,11 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, SwTxtFmtColl* pFindFmt; const CommandStruct* pCmds = SwCondCollItem::GetCmds(); - for( USHORT i = 0; i < COND_COMMAND_COUNT; ++i ) + for( sal_uInt16 i = 0; i < COND_COMMAND_COUNT; ++i ) { const String& rStyle = pCondItem->GetStyle( i ); if( rStyle.Len() && - 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, TRUE ))) + 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, sal_True ))) { pCColl->InsertCondition( SwCollCondition( pFindFmt, pCmds[ i ].nCnd, pCmds[ i ].nSubCond ) ); @@ -1231,9 +1231,9 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, } // --> OD 2008-02-12 #newlistlevelattrs# if ( bResetIndentAttrsAtParagraphStyle && - rSet.GetItemState( RES_PARATR_NUMRULE, FALSE, 0 ) == SFX_ITEM_SET && - rSet.GetItemState( RES_LR_SPACE, FALSE, 0 ) != SFX_ITEM_SET && - pColl->GetItemState( RES_LR_SPACE, FALSE, 0 ) == SFX_ITEM_SET ) + rSet.GetItemState( RES_PARATR_NUMRULE, sal_False, 0 ) == SFX_ITEM_SET && + rSet.GetItemState( RES_LR_SPACE, sal_False, 0 ) != SFX_ITEM_SET && + pColl->GetItemState( RES_LR_SPACE, sal_False, 0 ) == SFX_ITEM_SET ) { rDoc.ResetAttrAtFormat( RES_LR_SPACE, *pColl ); } @@ -1244,7 +1244,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, // neither the paragraph style nor the numbering style is used in the document // the numbering style will not be saved with the document and the assignment got lost. const SfxPoolItem* pNumRuleItem = 0; - if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, FALSE, &pNumRuleItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, sal_False, &pNumRuleItem ) ) { // Setting a numbering rule? String sNumRule = ((SwNumRuleItem*)pNumRuleItem)->GetValue(); if( sNumRule.Len() ) @@ -1252,7 +1252,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, SwNumRule* pRule = rDoc.FindNumRulePtr( sNumRule ); if( !pRule ) { // Numbering rule not in use yet. - USHORT nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sNumRule, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE ); + sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sNumRule, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE ); if( USHRT_MAX != nPoolId ) // It's a standard numbering rule { pRule = rDoc.GetNumRuleFromPool( nPoolId ); // Create numbering rule (physical) @@ -1263,7 +1263,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, pFmt = pColl; - USHORT nId = pColl->GetPoolFmtId() & + sal_uInt16 nId = pColl->GetPoolFmtId() & ~ ( COLL_GET_RANGE_BITS | POOLGRP_NOCOLLID ); switch( GetMask() & ( 0x0fff & ~SWSTYLEBIT_CONDCOLL ) ) { @@ -1293,7 +1293,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, { ASSERT(pFrmFmt, "Wo ist das FrmFmt"); const SfxPoolItem* pAutoUpdate; - if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,FALSE, &pAutoUpdate )) + if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,sal_False, &pAutoUpdate )) { pFrmFmt->SetAutoUpdateFmt(((const SfxBoolItem*)pAutoUpdate)->GetValue()); } @@ -1329,7 +1329,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, break; const SfxPoolItem* pItem; - switch( rSet.GetItemState( SID_ATTR_NUMBERING_RULE, FALSE, &pItem )) + switch( rSet.GetItemState( SID_ATTR_NUMBERING_RULE, sal_False, &pItem )) { case SFX_ITEM_SET: { @@ -1366,7 +1366,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, { SfxItemIter aIter( rSet ); const SfxPoolItem* pItem = aIter.GetCurItem(); - while( TRUE ) + while( sal_True ) { if( IsInvalidItem( pItem ) ) // Clearen { @@ -1416,7 +1416,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, // <-- } -void lcl_SaveStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc ) +void lcl_SaveStyles( sal_uInt16 nFamily, SvPtrarr& rArr, SwDoc& rDoc ) { switch( nFamily ) { @@ -1475,7 +1475,7 @@ void lcl_SaveStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc ) } } -void lcl_DeleteInfoStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc ) +void lcl_DeleteInfoStyles( sal_uInt16 nFamily, SvPtrarr& rArr, SwDoc& rDoc ) { sal_uInt16 n, nCnt; switch( nFamily ) @@ -1562,15 +1562,15 @@ void lcl_DeleteInfoStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc ) Beschreibung: Das Format ermitteln --------------------------------------------------------------------*/ -BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) +sal_Bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) { - BOOL bRet = FALSE; - USHORT nPoolId = USHRT_MAX; + sal_Bool bRet = sal_False; + sal_uInt16 nPoolId = USHRT_MAX; SwFmt* pFmt = 0; - BOOL bCreate = FillPhysical == eFType; - BOOL bDeleteInfo = FALSE; - BOOL bFillOnlyInfo = FillAllInfo == eFType; + sal_Bool bCreate = FillPhysical == eFType; + sal_Bool bDeleteInfo = sal_False; + sal_Bool bFillOnlyInfo = FillAllInfo == eFType; SvPtrarr aDelArr; switch(nFamily) @@ -1580,9 +1580,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) bPhysical = 0 != pCharFmt; if( bFillOnlyInfo && !bPhysical ) { - bDeleteInfo = TRUE; - ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc ); - pCharFmt = lcl_FindCharFmt(rDoc, aName, this, TRUE ); + bDeleteInfo = sal_True; + ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc ); + pCharFmt = lcl_FindCharFmt(rDoc, aName, this, sal_True ); } pFmt = pCharFmt; @@ -1607,9 +1607,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) bPhysical = 0 != pColl; if( bFillOnlyInfo && !bPhysical ) { - bDeleteInfo = TRUE; - ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc ); - pColl = lcl_FindParaFmt(rDoc, aName, this, TRUE ); + bDeleteInfo = sal_True; + ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc ); + pColl = lcl_FindParaFmt(rDoc, aName, this, sal_True ); } pFmt = pColl; @@ -1630,9 +1630,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) bPhysical = 0 != pFrmFmt; if( bFillOnlyInfo && bPhysical ) { - bDeleteInfo = TRUE; - ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc ); - pFrmFmt = lcl_FindFrmFmt(rDoc, aName, this, TRUE ); + bDeleteInfo = sal_True; + ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc ); + pFrmFmt = lcl_FindFrmFmt(rDoc, aName, this, sal_True ); } pFmt = pFrmFmt; if( !bCreate && !pFmt ) @@ -1649,9 +1649,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) bPhysical = 0 != pDesc; if( bFillOnlyInfo && !pDesc ) { - bDeleteInfo = TRUE; - ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc ); - pDesc = lcl_FindPageDesc( rDoc, aName, this, TRUE ); + bDeleteInfo = sal_True; + ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc ); + pDesc = lcl_FindPageDesc( rDoc, aName, this, sal_True ); } if( pDesc ) @@ -1677,9 +1677,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) bPhysical = 0 != pNumRule; if( bFillOnlyInfo && !pNumRule ) { - bDeleteInfo = TRUE; - ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc ); - pNumRule = lcl_FindNumRule( rDoc, aName, this, TRUE ); + bDeleteInfo = sal_True; + ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc ); + pNumRule = lcl_FindNumRule( rDoc, aName, this, sal_True ); } if( pNumRule ) @@ -1710,7 +1710,7 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) if( pFmt ) nPoolId = pFmt->GetPoolFmtId(); - USHORT _nMask = 0; + sal_uInt16 _nMask = 0; if( pFmt == rDoc.GetDfltCharFmt() ) _nMask |= SFXSTYLEBIT_READONLY; else if( USER_FMT & nPoolId ) @@ -1743,7 +1743,7 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType ) SetMask( _nMask ); } if( bDeleteInfo && bFillOnlyInfo ) - ::lcl_DeleteInfoStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc ); + ::lcl_DeleteInfoStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc ); return bRet; } @@ -1761,7 +1761,7 @@ void SwDocStyleSheet::Create() if( !pCharFmt ) pCharFmt = rDoc.MakeCharFmt(aName, rDoc.GetDfltCharFmt()); - pCharFmt->SetAuto( FALSE ); + pCharFmt->SetAuto( sal_False ); break; case SFX_STYLE_FAMILY_PARA : @@ -1779,7 +1779,7 @@ void SwDocStyleSheet::Create() case SFX_STYLE_FAMILY_FRAME: pFrmFmt = lcl_FindFrmFmt( rDoc, aName ); if( !pFrmFmt ) - pFrmFmt = rDoc.MakeFrmFmt(aName, rDoc.GetDfltFrmFmt(), FALSE, FALSE); + pFrmFmt = rDoc.MakeFrmFmt(aName, rDoc.GetDfltFrmFmt(), sal_False, sal_False); break; @@ -1787,7 +1787,7 @@ void SwDocStyleSheet::Create() pDesc = lcl_FindPageDesc( rDoc, aName ); if( !pDesc ) { - USHORT nId = rDoc.MakePageDesc(aName); + sal_uInt16 nId = rDoc.MakePageDesc(aName); pDesc = &const_cast<const SwDoc &>(rDoc).GetPageDesc(nId); } break; @@ -1803,12 +1803,12 @@ void SwDocStyleSheet::Create() // --> OD 2008-02-11 #newlistlevelattrs# SwNumRule* pRule = rDoc.GetNumRuleTbl()[ - rDoc.MakeNumRule( sTmpNm, 0, FALSE, + rDoc.MakeNumRule( sTmpNm, 0, sal_False, // --> OD 2008-06-06 #i89178# numfunc::GetDefaultPositionAndSpaceMode() ) ]; // <-- // <-- - pRule->SetAutoRule( FALSE ); + pRule->SetAutoRule( sal_False ); if( !aName.Len() ) { // --> OD 2008-07-08 #i91400# @@ -1820,7 +1820,7 @@ void SwDocStyleSheet::Create() break; default:; //prevent warning } - bPhysical = TRUE; + bPhysical = sal_True; aCoreSet.ClearItem(); } @@ -1888,7 +1888,7 @@ void SwDocStyleSheet::PresetNameAndFamily(const String& rName) --------------------------------------------------------------------*/ -void SwDocStyleSheet::SetPhysical(BOOL bPhys) +void SwDocStyleSheet::SetPhysical(sal_Bool bPhys) { bPhysical = bPhys; @@ -1909,7 +1909,7 @@ SwFrmFmt* SwDocStyleSheet::GetFrmFmt() } -BOOL SwDocStyleSheet::IsUsed() const +sal_Bool SwDocStyleSheet::IsUsed() const { if( !bPhysical ) { @@ -1919,7 +1919,7 @@ BOOL SwDocStyleSheet::IsUsed() const // immer noch nicht ? if( !bPhysical ) - return FALSE; + return sal_False; const SwModify* pMod; switch( nFamily ) @@ -1930,22 +1930,22 @@ BOOL SwDocStyleSheet::IsUsed() const case SFX_STYLE_FAMILY_PAGE : pMod = pDesc; break; case SFX_STYLE_FAMILY_PSEUDO: - return pNumRule ? rDoc.IsUsed( *pNumRule ) : FALSE; + return pNumRule ? rDoc.IsUsed( *pNumRule ) : sal_False; default: ASSERT(!this, "unbekannte Style-Familie"); - return FALSE; + return sal_False; } return rDoc.IsUsed( *pMod ); } -ULONG SwDocStyleSheet::GetHelpId( String& rFile ) +sal_uLong SwDocStyleSheet::GetHelpId( String& rFile ) { static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp"); - USHORT nId = 0; - USHORT nPoolId = 0; + sal_uInt16 nId = 0; + sal_uInt16 nPoolId = 0; unsigned char nFileId = UCHAR_MAX; rFile = sTemplateHelpFile; @@ -1955,7 +1955,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp"); { case SFX_STYLE_FAMILY_CHAR : if( !pCharFmt && - 0 == (pCharFmt = lcl_FindCharFmt( rDoc, aName, 0, FALSE )) ) + 0 == (pCharFmt = lcl_FindCharFmt( rDoc, aName, 0, sal_False )) ) { nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); return USHRT_MAX == nId ? 0 : nId; @@ -1965,7 +1965,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp"); case SFX_STYLE_FAMILY_PARA: if( !pColl && - 0 == ( pColl = lcl_FindParaFmt( rDoc, aName, 0, FALSE )) ) + 0 == ( pColl = lcl_FindParaFmt( rDoc, aName, 0, sal_False )) ) { nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); return USHRT_MAX == nId ? 0 : nId; @@ -1975,7 +1975,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp"); case SFX_STYLE_FAMILY_FRAME: if( !pFrmFmt && - 0 == ( pFrmFmt = lcl_FindFrmFmt( rDoc, aName, 0, FALSE ) ) ) + 0 == ( pFrmFmt = lcl_FindFrmFmt( rDoc, aName, 0, sal_False ) ) ) { nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT ); return USHRT_MAX == nId ? 0 : nId; @@ -1985,7 +1985,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp"); case SFX_STYLE_FAMILY_PAGE: if( !pDesc && - 0 == ( pDesc = lcl_FindPageDesc( rDoc, aName, 0, FALSE ) ) ) + 0 == ( pDesc = lcl_FindPageDesc( rDoc, aName, 0, sal_False ) ) ) { nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC ); return USHRT_MAX == nId ? 0 : nId; @@ -1998,7 +1998,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp"); case SFX_STYLE_FAMILY_PSEUDO: if( !pNumRule && - 0 == ( pNumRule = lcl_FindNumRule( rDoc, aName, 0, FALSE ) ) ) + 0 == ( pNumRule = lcl_FindNumRule( rDoc, aName, 0, sal_False ) ) ) { nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE ); return USHRT_MAX == nId ? 0 : nId; @@ -2043,10 +2043,10 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp"); } -void SwDocStyleSheet::SetHelpId( const String& r, ULONG nId ) +void SwDocStyleSheet::SetHelpId( const String& r, sal_uLong nId ) { - BYTE nFileId = static_cast< BYTE >(rDoc.SetDocPattern( r )); - USHORT nHId = static_cast< USHORT >(nId); //!! SFX hat eigenmaechtig auf ULONG umgestellt! + sal_uInt8 nFileId = static_cast< sal_uInt8 >(rDoc.SetDocPattern( r )); + sal_uInt16 nHId = static_cast< sal_uInt16 >(nId); //!! SFX hat eigenmaechtig auf sal_uLong umgestellt! SwFmt* pTmpFmt = 0; switch( nFamily ) @@ -2082,7 +2082,7 @@ void SwDocStyleSheet::SetHelpId( const String& r, ULONG nId ) Beschreibung: Methoden fuer den DocStyleSheetPool --------------------------------------------------------------------*/ -SwDocStyleSheetPool::SwDocStyleSheetPool( SwDoc& rDocument, BOOL bOrg ) +SwDocStyleSheetPool::SwDocStyleSheetPool( SwDoc& rDocument, sal_Bool bOrg ) : SfxStyleSheetBasePool( rDocument.GetAttrPool() ) , mxStyleSheet( new SwDocStyleSheet( rDocument, aEmptyStr, *this, SFX_STYLE_FAMILY_CHAR, 0 ) ) , rDoc( rDocument ) @@ -2107,15 +2107,15 @@ void SAL_CALL SwDocStyleSheetPool::release( ) throw () SfxStyleSheetBase& SwDocStyleSheetPool::Make( const String& rName, SfxStyleFamily eFam, - USHORT _nMask, - USHORT /*nPos*/ ) + sal_uInt16 _nMask, + sal_uInt16 /*nPos*/ ) { mxStyleSheet->PresetName(rName); mxStyleSheet->PresetParent(aEmptyStr); mxStyleSheet->PresetFollow(aEmptyStr); mxStyleSheet->SetMask(_nMask) ; mxStyleSheet->SetFamily(eFam); - mxStyleSheet->SetPhysical(TRUE); + mxStyleSheet->SetPhysical(sal_True); mxStyleSheet->Create(); return *mxStyleSheet.get(); @@ -2130,7 +2130,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Create( const SfxStyleSheetBase& /*rOr SfxStyleSheetBase* SwDocStyleSheetPool::Create( const String &, - SfxStyleFamily, USHORT ) + SfxStyleFamily, sal_uInt16 ) { ASSERT( !this, "Create im SW-Stylesheet-Pool geht nicht" ); return NULL; @@ -2163,7 +2163,7 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource, SwImplShellAction aTmpSh( rDoc ); - BOOL bSwSrcPool = GetAppName() == rSource.GetPool().GetAppName(); + sal_Bool bSwSrcPool = GetAppName() == rSource.GetPool().GetAppName(); if( SFX_STYLE_FAMILY_PAGE == eFamily && bSwSrcPool ) { // gesondert behandeln!! @@ -2177,7 +2177,7 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource, { const SwFmt *pSourceFmt = 0; SwFmt *pTargetFmt = 0; - USHORT nPgDscPos = USHRT_MAX; + sal_uInt16 nPgDscPos = USHRT_MAX; switch( eFamily ) { case SFX_STYLE_FAMILY_CHAR : @@ -2237,7 +2237,7 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource, } SfxStyleSheetIterator* SwDocStyleSheetPool::CreateIterator( - SfxStyleFamily eFam, USHORT _nMask ) + SfxStyleFamily eFam, sal_uInt16 _nMask ) { return new SwStyleSheetIterator( this, eFam, _nMask ); } @@ -2252,35 +2252,35 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle) if( !pStyle ) return; - BOOL bBroadcast = TRUE; + sal_Bool bBroadcast = sal_True; SwImplShellAction aTmpSh( rDoc ); const String& rName = pStyle->GetName(); switch( pStyle->GetFamily() ) { case SFX_STYLE_FAMILY_CHAR: { - SwCharFmt* pFmt = lcl_FindCharFmt(rDoc, rName, 0, FALSE ); + SwCharFmt* pFmt = lcl_FindCharFmt(rDoc, rName, 0, sal_False ); if(pFmt) rDoc.DelCharFmt(pFmt); } break; case SFX_STYLE_FAMILY_PARA: { - SwTxtFmtColl* pColl = lcl_FindParaFmt(rDoc, rName, 0, FALSE ); + SwTxtFmtColl* pColl = lcl_FindParaFmt(rDoc, rName, 0, sal_False ); if(pColl) rDoc.DelTxtFmtColl(pColl); } break; case SFX_STYLE_FAMILY_FRAME: { - SwFrmFmt* pFmt = lcl_FindFrmFmt(rDoc, rName, 0, FALSE ); + SwFrmFmt* pFmt = lcl_FindFrmFmt(rDoc, rName, 0, sal_False ); if(pFmt) rDoc.DelFrmFmt(pFmt); } break; case SFX_STYLE_FAMILY_PAGE : { - USHORT nPos; + sal_uInt16 nPos; if( rDoc.FindPageDescByName( rName, &nPos )) rDoc.DelPageDesc( nPos ); } @@ -2290,13 +2290,13 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle) { if( !rDoc.DelNumRule( rName ) ) // Broadcast nur versenden, wenn etwas geloescht wurde - bBroadcast = FALSE; + bBroadcast = sal_False; } break; default: ASSERT(!this, "unbekannte Style-Familie"); - bBroadcast = FALSE; + bBroadcast = sal_False; } if( bBroadcast ) @@ -2305,7 +2305,7 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle) -BOOL SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam, +sal_Bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam, const String &rStyle, const String &rParent ) { SwFmt* pFmt = 0, *pParent = 0; @@ -2334,7 +2334,7 @@ BOOL SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam, ASSERT(!this, "unbekannte Style-Familie"); } - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( pFmt && pFmt->DerivedFrom() && pFmt->DerivedFrom()->GetName() != rParent ) { @@ -2363,9 +2363,9 @@ BOOL SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam, } SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName, - SfxStyleFamily eFam, USHORT n ) + SfxStyleFamily eFam, sal_uInt16 n ) { - USHORT nSMask = n; + sal_uInt16 nSMask = n; if( SFX_STYLE_FAMILY_PARA == eFam && rDoc.get(IDocumentSettingAccess::HTML_MODE) ) { // dann sind nur HTML-Vorlagen von Interesse @@ -2378,14 +2378,14 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName, nSMask = SWSTYLEBIT_HTML; } - const BOOL bSearchUsed = ( n != SFXSTYLEBIT_ALL && - n & SFXSTYLEBIT_USED ) ? TRUE : FALSE; + const sal_Bool bSearchUsed = ( n != SFXSTYLEBIT_ALL && + n & SFXSTYLEBIT_USED ) ? sal_True : sal_False; const SwModify* pMod = 0; - mxStyleSheet->SetPhysical( FALSE ); + mxStyleSheet->SetPhysical( sal_False ); mxStyleSheet->PresetName( rName ); mxStyleSheet->SetFamily( eFam ); - BOOL bFnd = mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName ); + sal_Bool bFnd = mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName ); if( mxStyleSheet->IsPhysical() ) { @@ -2416,7 +2416,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName, ? !(pRule->GetPoolFmtId() & USER_FMT) // benutzte gesucht und keine gefunden : bSearchUsed )) - bFnd = FALSE; + bFnd = sal_False; } break; @@ -2428,7 +2428,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName, // dann noch die Maske auswerten: if( pMod && !(bSearchUsed && (bOrganizer || rDoc.IsUsed(*pMod)) ) ) { - const USHORT nId = SFX_STYLE_FAMILY_PAGE == eFam + const sal_uInt16 nId = SFX_STYLE_FAMILY_PAGE == eFam ? ((SwPageDesc*)pMod)->GetPoolFmtId() : ((SwFmt*)pMod)->GetPoolFmtId(); @@ -2436,7 +2436,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName, ? !(nId & USER_FMT) // benutzte gesucht und keine gefunden : bSearchUsed ) - bFnd = FALSE; + bFnd = sal_False; } return bFnd ? mxStyleSheet.get() : 0; } @@ -2444,12 +2444,12 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName, /* */ SwStyleSheetIterator::SwStyleSheetIterator( SwDocStyleSheetPool* pBase, - SfxStyleFamily eFam, USHORT n ) + SfxStyleFamily eFam, sal_uInt16 n ) : SfxStyleSheetIterator( pBase, eFam, n ), mxIterSheet( new SwDocStyleSheet( pBase->GetDoc(), aEmptyStr, *pBase, SFX_STYLE_FAMILY_CHAR, 0 ) ), mxStyleSheet( new SwDocStyleSheet( pBase->GetDoc(), aEmptyStr, *pBase, SFX_STYLE_FAMILY_CHAR, 0 ) ) { - bFirstCalled = FALSE; + bFirstCalled = sal_False; nLastPos = 0; StartListening( *pBase ); } @@ -2459,7 +2459,7 @@ SwStyleSheetIterator::SwStyleSheetIterator( SwDocStyleSheetPool* pBase, EndListening( mxIterSheet->GetPool() ); } -USHORT SwStyleSheetIterator::Count() +sal_uInt16 SwStyleSheetIterator::Count() { // Liste richtig fuellen lassen !! if( !bFirstCalled ) @@ -2467,13 +2467,13 @@ USHORT SwStyleSheetIterator::Count() return aLst.Count(); } -SfxStyleSheetBase* SwStyleSheetIterator::operator[]( USHORT nIdx ) +SfxStyleSheetBase* SwStyleSheetIterator::operator[]( sal_uInt16 nIdx ) { // gefunden if( !bFirstCalled ) First(); mxStyleSheet->PresetNameAndFamily( *aLst[ nIdx ] ); - mxStyleSheet->SetPhysical( FALSE ); + mxStyleSheet->SetPhysical( sal_False ); mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName ); return mxStyleSheet.get(); @@ -2482,7 +2482,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::operator[]( USHORT nIdx ) SfxStyleSheetBase* SwStyleSheetIterator::First() { // Alte Liste loeschen - bFirstCalled = TRUE; + bFirstCalled = sal_True; nLastPos = 0; aLst.Erase(); @@ -2490,27 +2490,27 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() mxIterSheet->Reset(); SwDoc& rDoc = ((SwDocStyleSheetPool*)pBasePool)->GetDoc(); - const USHORT nSrchMask = nMask; - const BOOL bIsSearchUsed = SearchUsed(); + const sal_uInt16 nSrchMask = nMask; + const sal_Bool bIsSearchUsed = SearchUsed(); - const BOOL bOrganizer = ((SwDocStyleSheetPool*)pBasePool)->IsOrganizerMode(); + const sal_Bool bOrganizer = ((SwDocStyleSheetPool*)pBasePool)->IsOrganizerMode(); if( nSearchFamily == SFX_STYLE_FAMILY_CHAR || nSearchFamily == SFX_STYLE_FAMILY_ALL ) { - const USHORT nArrLen = rDoc.GetCharFmts()->Count(); - for( USHORT i = 0; i < nArrLen; i++ ) + const sal_uInt16 nArrLen = rDoc.GetCharFmts()->Count(); + for( sal_uInt16 i = 0; i < nArrLen; i++ ) { SwCharFmt* pFmt = (*rDoc.GetCharFmts())[ i ]; if( pFmt->IsDefault() && pFmt != rDoc.GetDfltCharFmt() ) continue; - const BOOL bUsed = bIsSearchUsed && (bOrganizer || rDoc.IsUsed(*pFmt)); + const sal_Bool bUsed = bIsSearchUsed && (bOrganizer || rDoc.IsUsed(*pFmt)); if( !bUsed ) { // Standard ist keine Benutzervorlage #46181# - const USHORT nId = rDoc.GetDfltCharFmt() == pFmt ? - USHORT( RES_POOLCHR_INET_NORMAL ): + const sal_uInt16 nId = rDoc.GetDfltCharFmt() == pFmt ? + sal_uInt16( RES_POOLCHR_INET_NORMAL ): pFmt->GetPoolFmtId(); if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF ? !(nId & USER_FMT) @@ -2560,7 +2560,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() if( nSearchFamily == SFX_STYLE_FAMILY_PARA || nSearchFamily == SFX_STYLE_FAMILY_ALL ) { - USHORT nSMask = nSrchMask; + sal_uInt16 nSMask = nSrchMask; if( rDoc.get(IDocumentSettingAccess::HTML_MODE) ) { // dann sind nur HTML-Vorlagen von Interesse @@ -2574,18 +2574,18 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() nSMask = SWSTYLEBIT_HTML; } - const USHORT nArrLen = rDoc.GetTxtFmtColls()->Count(); - for( USHORT i = 0; i < nArrLen; i++ ) + const sal_uInt16 nArrLen = rDoc.GetTxtFmtColls()->Count(); + for( sal_uInt16 i = 0; i < nArrLen; i++ ) { SwTxtFmtColl* pColl = (*rDoc.GetTxtFmtColls())[ i ]; if(pColl->IsDefault()) continue; - const BOOL bUsed = bOrganizer || rDoc.IsUsed(*pColl); + const sal_Bool bUsed = bOrganizer || rDoc.IsUsed(*pColl); if( !(bIsSearchUsed && bUsed )) { - const USHORT nId = pColl->GetPoolFmtId(); + const sal_uInt16 nId = pColl->GetPoolFmtId(); switch ( (nSMask & ~SFXSTYLEBIT_USED) ) { case SFXSTYLEBIT_USERDEF: @@ -2615,7 +2615,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() if( (nId & COLL_GET_RANGE_BITS) != COLL_HTML_BITS) { // einige wollen wir aber auch in dieser Section sehen - BOOL bWeiter = TRUE; + sal_Bool bWeiter = sal_True; switch( nId ) { case RES_POOLCOLL_SENDADRESS: // --> ADDRESS @@ -2632,7 +2632,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() case RES_POOLCOLL_STANDARD: // --> P case RES_POOLCOLL_FOOTNOTE: case RES_POOLCOLL_ENDNOTE: - bWeiter = FALSE; + bWeiter = sal_False; break; } if( bWeiter ) @@ -2651,7 +2651,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() aLst.Append( cPARA, pColl->GetName() ); } - const BOOL bAll = nSMask == SFXSTYLEBIT_ALL; + const sal_Bool bAll = nSMask == SFXSTYLEBIT_ALL; if ( bAll || (nSMask & ~SFXSTYLEBIT_USED) == SWSTYLEBIT_TEXT ) AppendStyleList(SwStyleNameMapper::GetTextUINameArray(), bIsSearchUsed, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, cPARA ); @@ -2684,7 +2684,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() if( !bAll ) { // dann auch die, die wir mappen: - static USHORT aPoolIds[] = { + static sal_uInt16 aPoolIds[] = { RES_POOLCOLL_SENDADRESS, // --> ADDRESS RES_POOLCOLL_TABLE_HDLN, // --> TH RES_POOLCOLL_TABLE, // --> TD @@ -2702,7 +2702,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() 0 }; - USHORT* pPoolIds = aPoolIds; + sal_uInt16* pPoolIds = aPoolIds; String s; while( *pPoolIds ) { @@ -2718,8 +2718,8 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() if( nSearchFamily == SFX_STYLE_FAMILY_FRAME || nSearchFamily == SFX_STYLE_FAMILY_ALL ) { - const USHORT nArrLen = rDoc.GetFrmFmts()->Count(); - for( USHORT i = 0; i < nArrLen; i++ ) + const sal_uInt16 nArrLen = rDoc.GetFrmFmts()->Count(); + for( sal_uInt16 i = 0; i < nArrLen; i++ ) { SwFrmFmt* pFmt = (*rDoc.GetFrmFmts())[ i ]; @@ -2728,8 +2728,8 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() continue; } - const USHORT nId = pFmt->GetPoolFmtId(); - BOOL bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(*pFmt)); + const sal_uInt16 nId = pFmt->GetPoolFmtId(); + sal_Bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(*pFmt)); if( !bUsed ) { if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF @@ -2754,13 +2754,13 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() if( nSearchFamily == SFX_STYLE_FAMILY_PAGE || nSearchFamily == SFX_STYLE_FAMILY_ALL ) { - const USHORT nCount = rDoc.GetPageDescCnt(); - for(USHORT i = 0; i < nCount; ++i) + const sal_uInt16 nCount = rDoc.GetPageDescCnt(); + for(sal_uInt16 i = 0; i < nCount; ++i) { const SwPageDesc& rDesc = const_cast<const SwDoc &>(rDoc).GetPageDesc(i); - const USHORT nId = rDesc.GetPoolFmtId(); - BOOL bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rDesc)); + const sal_uInt16 nId = rDesc.GetPoolFmtId(); + sal_Bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rDesc)); if( !bUsed ) { if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF @@ -2781,12 +2781,12 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() nSearchFamily == SFX_STYLE_FAMILY_ALL ) { const SwNumRuleTbl& rNumTbl = rDoc.GetNumRuleTbl(); - for(USHORT i = 0; i < rNumTbl.Count(); ++i) + for(sal_uInt16 i = 0; i < rNumTbl.Count(); ++i) { const SwNumRule& rRule = *rNumTbl[ i ]; if( !rRule.IsAutoRule() ) { - BOOL bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rRule) ); + sal_Bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rRule) ); if( !bUsed ) { if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF @@ -2818,7 +2818,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::Next() if(aLst.Count() > 0 && nLastPos < aLst.Count()) { mxIterSheet->PresetNameAndFamily(*aLst[nLastPos]); - mxIterSheet->SetPhysical( FALSE ); + mxIterSheet->SetPhysical( sal_False ); mxIterSheet->SetMask( nMask ); if(mxIterSheet->pSet) { @@ -2844,7 +2844,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::Find( const UniString& rName ) // neuer Name gesetzt, also bestimme seine Daten mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName ); if( !mxStyleSheet->IsPhysical() ) - mxStyleSheet->SetPhysical( FALSE ); + mxStyleSheet->SetPhysical( sal_False ); return mxStyleSheet.get(); } @@ -2852,16 +2852,16 @@ SfxStyleSheetBase* SwStyleSheetIterator::Find( const UniString& rName ) } void SwStyleSheetIterator::AppendStyleList(const SvStringsDtor& rList, - BOOL bTestUsed, - USHORT nSection, char cType ) + sal_Bool bTestUsed, + sal_uInt16 nSection, char cType ) { if( bTestUsed ) { SwDoc& rDoc = ((SwDocStyleSheetPool*)pBasePool)->GetDoc(); - for ( USHORT i=0; i < rList.Count(); ++i ) + for ( sal_uInt16 i=0; i < rList.Count(); ++i ) { - BOOL bUsed = FALSE; - USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(*rList[i], (SwGetPoolIdFromName)nSection); + sal_Bool bUsed = sal_False; + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(*rList[i], (SwGetPoolIdFromName)nSection); switch ( nSection ) { case nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL: @@ -2883,7 +2883,7 @@ void SwStyleSheetIterator::AppendStyleList(const SvStringsDtor& rList, } } else - for ( USHORT i=0; i < rList.Count(); ++i ) + for ( sal_uInt16 i=0; i < rList.Count(); ++i ) aLst.Append( cType, *rList[i] ); } @@ -2897,7 +2897,7 @@ void SwStyleSheetIterator::Notify( SfxBroadcaster&, const SfxHint& rHint ) if (pStyle) { - USHORT nTmpPos = lcl_FindName( aLst, pStyle->GetFamily(), + sal_uInt16 nTmpPos = lcl_FindName( aLst, pStyle->GetFamily(), pStyle->GetName() ); if( nTmpPos < aLst.Count() ) aLst.DeleteAndDestroy( nTmpPos ); |