diff options
Diffstat (limited to 'sw/source/core/doc/docdesc.cxx')
-rw-r--r-- | sw/source/core/doc/docdesc.cxx | 218 |
1 files changed, 154 insertions, 64 deletions
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx index 3f3d4630d5f8..f64f37e02011 100644 --- a/sw/source/core/doc/docdesc.cxx +++ b/sw/source/core/doc/docdesc.cxx @@ -27,6 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include <hintids.hxx> #include <vcl/virdev.hxx> #include <svx/svdmodel.hxx> @@ -48,6 +49,7 @@ #include <ndole.hxx> #include <mdiexp.hxx> #include <doc.hxx> +#include <IDocumentUndoRedo.hxx> #include <docary.hxx> #include <pagefrm.hxx> //Fuer DelPageDesc #include <rootfrm.hxx> //Fuer DelPageDesc @@ -68,7 +70,12 @@ #include <GetMetricVal.hxx> #include <unotools/syslocale.hxx> #include <statstr.hrc> +<<<<<<< local #include <switerator.hxx> +======= +#include <hints.hxx> + +>>>>>>> other #include <SwUndoPageDesc.hxx> #include <pagedeschint.hxx> #include <tgrditem.hxx> @@ -119,8 +126,8 @@ static void lcl_DefaultPageFmt( sal_uInt16 nPoolFmtId, SvxLRSpaceItem aLR( RES_LR_SPACE ); SvxULSpaceItem aUL( RES_UL_SPACE ); - aUL.SetUpper( (USHORT)nMinTop ); - aUL.SetLower( (USHORT)nMinBottom ); + aUL.SetUpper( (sal_uInt16)nMinTop ); + aUL.SetLower( (sal_uInt16)nMinBottom ); aLR.SetRight( nMinRight ); aLR.SetLeft( nMinLeft ); @@ -143,7 +150,7 @@ static void lcl_DefaultPageFmt( sal_uInt16 nPoolFmtId, |*************************************************************************/ void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest, - const BOOL bPage = TRUE ) + const sal_Bool bPage = sal_True ) { /////////////// !!!!!!!!!!!!!!!! //JP 03.03.99: @@ -151,7 +158,7 @@ void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest, // funktioniert nicht richtig, wenn man unterschiedliche WhichRanges hat. /////////////// !!!!!!!!!!!!!!!! //Die interressanten Attribute uebernehmen. - USHORT __READONLY_DATA aIdArr[] = { RES_FRM_SIZE, RES_UL_SPACE, + sal_uInt16 __READONLY_DATA aIdArr[] = { RES_FRM_SIZE, RES_UL_SPACE, RES_BACKGROUND, RES_SHADOW, RES_COL, RES_COL, RES_FRAMEDIR, RES_FRAMEDIR, @@ -165,9 +172,9 @@ void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest, 0 }; const SfxPoolItem* pItem; - for( USHORT n = 0; aIdArr[ n ]; n += 2 ) + for( sal_uInt16 n = 0; aIdArr[ n ]; n += 2 ) { - for( USHORT nId = aIdArr[ n ]; nId <= aIdArr[ n+1]; ++nId ) + for( sal_uInt16 nId = aIdArr[ n ]; nId <= aIdArr[ n+1]; ++nId ) { // --> FME 2005-04-18 #i45539# // bPage == true: @@ -178,7 +185,7 @@ void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest, if( ( bPage && RES_HEADER_FOOTER_EAT_SPACING != nId ) || ( !bPage && RES_COL != nId && RES_PAPER_BIN != nId )) { - if( SFX_ITEM_SET == rSource.GetItemState( nId, FALSE, &pItem )) + if( SFX_ITEM_SET == rSource.GetItemState( nId, sal_False, &pItem )) rDest.SetFmtAttr( *pItem ); else rDest.ResetFmtAttr( nId ); @@ -193,19 +200,19 @@ void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest, } -void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged ) +void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged ) { ASSERT( i < aPageDescs.Count(), "PageDescs ueberindiziert." ); SwPageDesc *pDesc = aPageDescs[i]; SwRootFrm* pTmpRoot = GetCurrentLayout();//swmod 080219 - BOOL bDoesUndo = DoesUndo(); - if (DoesUndo()) + if (GetIDocumentUndoRedo().DoesUndo()) { - AppendUndo(new SwUndoPageDesc(*pDesc, rChged, this)); - DoUndo(FALSE); + SwUndo *const pUndo(new SwUndoPageDesc(*pDesc, rChged, this)); + GetIDocumentUndoRedo().AppendUndo(pUndo); } + ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo()); //Als erstes wird ggf. gespiegelt. if ( rChged.GetUseOn() == nsUseOnPage::PD_MIRROR ) @@ -228,7 +235,7 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged ) // ErgoSum-Texte geben, die sich auf eine geaenderte Seite beziehen, // deshalb werden die Fussnoten invalidiert SwFtnIdxs& rFtnIdxs = GetFtnIdxs(); - for( USHORT nPos = 0; nPos < rFtnIdxs.Count(); ++nPos ) + for( sal_uInt16 nPos = 0; nPos < rFtnIdxs.Count(); ++nPos ) { SwTxtFtn *pTxtFtn = rFtnIdxs[ nPos ]; const SwFmtFtn &rFtn = pTxtFtn->GetFtn(); @@ -244,7 +251,7 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged ) //Header abgleichen. const SwFmtHeader &rHead = rChged.GetMaster().GetHeader(); - if( bDoesUndo ) + if (undoGuard.UndoWasEnabled()) { // #i46909# no undo if header or footer changed // hat sich an den Nodes etwas veraendert ? @@ -271,7 +278,7 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged ) SwFmtHeader aHead( MakeLayoutFmt( RND_STD_HEADERL, 0 ) ); pDesc->GetLeft().SetFmtAttr( aHead ); //Weitere Attribute (Raender, Umrandung...) uebernehmen. - ::lcl_DescSetAttr( *rHead.GetHeaderFmt(), *aHead.GetHeaderFmt(), FALSE); + ::lcl_DescSetAttr( *rHead.GetHeaderFmt(), *aHead.GetHeaderFmt(), sal_False); } else { @@ -284,7 +291,7 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged ) { SwFrmFmt *pFmt = new SwFrmFmt( GetAttrPool(), "Header", GetDfltFrmFmt() ); - ::lcl_DescSetAttr( *pRight, *pFmt, FALSE ); + ::lcl_DescSetAttr( *pRight, *pFmt, sal_False ); //Der Bereich auf den das rechte Kopfattribut zeigt wird //kopiert und der Index auf den StartNode in das linke //Kopfattribut gehaengt. @@ -293,14 +300,14 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged ) SwNodeRange aRange( aRCnt.GetCntntIdx()->GetNode(), 0, *aRCnt.GetCntntIdx()->GetNode().EndOfSectionNode() ); aTmp = *pSttNd->EndOfSectionNode(); - GetNodes()._Copy( aRange, aTmp, FALSE ); + GetNodes()._Copy( aRange, aTmp, sal_False ); pFmt->SetFmtAttr( SwFmtCntnt( pSttNd ) ); pDesc->GetLeft().SetFmtAttr( SwFmtHeader( pFmt ) ); } else ::lcl_DescSetAttr( *pRight, - *(SwFrmFmt*)rLeftHead.GetHeaderFmt(), FALSE ); + *(SwFrmFmt*)rLeftHead.GetHeaderFmt(), sal_False ); } } @@ -308,7 +315,7 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged ) //Footer abgleichen. const SwFmtFooter &rFoot = rChged.GetMaster().GetFooter(); - if( bDoesUndo ) + if (undoGuard.UndoWasEnabled()) { // #i46909# no undo if header or footer changed // hat sich an den Nodes etwas veraendert ? @@ -333,7 +340,7 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged ) SwFmtFooter aFoot( MakeLayoutFmt( RND_STD_FOOTER, 0 ) ); pDesc->GetLeft().SetFmtAttr( aFoot ); //Weitere Attribute (Raender, Umrandung...) uebernehmen. - ::lcl_DescSetAttr( *rFoot.GetFooterFmt(), *aFoot.GetFooterFmt(), FALSE); + ::lcl_DescSetAttr( *rFoot.GetFooterFmt(), *aFoot.GetFooterFmt(), sal_False); } else { @@ -346,7 +353,7 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged ) { SwFrmFmt *pFmt = new SwFrmFmt( GetAttrPool(), "Footer", GetDfltFrmFmt() ); - ::lcl_DescSetAttr( *pRight, *pFmt, FALSE ); + ::lcl_DescSetAttr( *pRight, *pFmt, sal_False ); //Der Bereich auf den das rechte Kopfattribut zeigt wird //kopiert und der Index auf den StartNode in das linke //Kopfattribut gehaengt. @@ -355,14 +362,14 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged ) SwNodeRange aRange( aRCnt.GetCntntIdx()->GetNode(), 0, *aRCnt.GetCntntIdx()->GetNode().EndOfSectionNode() ); aTmp = *pSttNd->EndOfSectionNode(); - GetNodes()._Copy( aRange, aTmp, FALSE ); + GetNodes()._Copy( aRange, aTmp, sal_False ); pFmt->SetFmtAttr( SwFmtCntnt( pSttNd ) ); pDesc->GetLeft().SetFmtAttr( SwFmtFooter( pFmt ) ); } else ::lcl_DescSetAttr( *pRight, - *(SwFrmFmt*)rLeftFoot.GetFooterFmt(), FALSE ); + *(SwFrmFmt*)rLeftFoot.GetFooterFmt(), sal_False ); } } pDesc->ChgFooterShare( rChged.IsFooterShared() ); @@ -375,22 +382,22 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged ) //Wenn sich das UseOn oder der Follow aendern muessen die //Absaetze das erfahren. - BOOL bUseOn = FALSE; - BOOL bFollow = FALSE; + sal_Bool bUseOn = sal_False; + sal_Bool bFollow = sal_False; if ( pDesc->GetUseOn() != rChged.GetUseOn() ) { pDesc->SetUseOn( rChged.GetUseOn() ); - bUseOn = TRUE; + bUseOn = sal_True; } if ( pDesc->GetFollow() != rChged.GetFollow() ) { if ( rChged.GetFollow() == &rChged ) { if ( pDesc->GetFollow() != pDesc ) { pDesc->SetFollow( pDesc ); - bFollow = TRUE; + bFollow = sal_True; } } else { pDesc->SetFollow( rChged.pFollow ); - bFollow = TRUE; + bFollow = sal_True; } } @@ -420,13 +427,10 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged ) } SetModified(); - DoUndo(bDoesUndo); - // #i46909# no undo if header or footer changed if( bHeaderFooterChanged ) { - ClearRedo(); - DelAllUndoObj(); + GetIDocumentUndoRedo().DelAllUndoObj(); } } @@ -441,6 +445,28 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged ) |* |*************************************************************************/ +<<<<<<< local +======= +void lcl_RemoveFrms( SwFrmFmt& rFmt, sal_Bool& rbFtnsRemoved ) +{ + SwClientIter aIter( rFmt ); + SwFrm *pFrm; + for( pFrm = (SwFrm*)aIter.First(TYPE(SwFrm)); pFrm; + pFrm = (SwFrm*)aIter.Next() ) + if ( !rbFtnsRemoved && pFrm->IsPageFrm() && + ((SwPageFrm*)pFrm)->IsFtnPage() ) + { + rFmt.getIDocumentLayoutAccess()->GetRootFrm()->RemoveFtns( 0, sal_False, sal_True ); + rbFtnsRemoved = sal_True; + } + else + { + pFrm->Cut(); + delete pFrm; + } +} + +>>>>>>> other // #i7983# void SwDoc::PreDelPageDesc(SwPageDesc * pDel) { @@ -471,6 +497,7 @@ void SwDoc::PreDelPageDesc(SwPageDesc * pDel) } } +<<<<<<< local for ( USHORT j = 0; j < aPageDescs.Count(); ++j ) { if ( aPageDescs[j]->GetFollow() == pDel ) @@ -483,11 +510,51 @@ void SwDoc::PreDelPageDesc(SwPageDesc * pDel) } } } +======= + sal_Bool bFtnInf = sal_False; + if ( sal_True == (bFtnInf = pLast == pFtnInfo->GetPageDescDep()) || + pLast == pEndNoteInfo->GetPageDescDep() ) + { + aPageDescs[0]->Add( pLast ); + if ( GetRootFrm() ) + GetRootFrm()->CheckFtnPageDescs( !bFtnInf ); + } + } + + for ( sal_uInt16 j = 0; j < aPageDescs.Count(); ++j ) + { + if ( aPageDescs[j]->GetFollow() == pDel ) + { + aPageDescs[j]->SetFollow( 0 ); + //Clients des PageDesc sind die Attribute, denen sagen wir bescheid. + //die Attribute wiederum reichen die Meldung an die Absaetze weiter. + + //Layot benachrichtigen! + if( GetRootFrm() ) // ist nicht immer vorhanden!! (Orginizer) + GetRootFrm()->CheckPageDescs( (SwPageFrm*)GetRootFrm()->Lower() ); + } + } + + if( GetRootFrm() ) // ist nicht immer vorhanden!! (Orginizer) + { + //Wenn jetzt noch irgendwelche Seiten auf die FrmFmt'e (Master und Left) + //Zeigen (z.B. irgendwelche Fussnotenseiten), so muessen die Seiten + //vernichtet werden. + + // Wenn wir auf Endnotenseiten stossen, schmeissen wir alle Fussnoten weg, + // anders kann die Reihenfolge der Seiten (FollowsPageDescs usw.) + // nicht garantiert werden. + sal_Bool bFtnsRemoved = sal_False; + + ::lcl_RemoveFrms( pDel->GetMaster(), bFtnsRemoved ); + ::lcl_RemoveFrms( pDel->GetLeft(), bFtnsRemoved ); + } +>>>>>>> other } // #116530# void SwDoc::BroadcastStyleOperation(String rName, SfxStyleFamily eFamily, - USHORT nOp) + sal_uInt16 nOp) { if (pDocShell) { @@ -504,7 +571,7 @@ void SwDoc::BroadcastStyleOperation(String rName, SfxStyleFamily eFamily, } } -void SwDoc::DelPageDesc( USHORT i, BOOL bBroadcast ) +void SwDoc::DelPageDesc( sal_uInt16 i, sal_Bool bBroadcast ) { ASSERT( i < aPageDescs.Count(), "PageDescs ueberindiziert." ); ASSERT( i != 0, "Default Pagedesc loeschen is nicht." ); @@ -519,9 +586,10 @@ void SwDoc::DelPageDesc( USHORT i, BOOL bBroadcast ) SFX_STYLESHEET_ERASED); // <- #116530# - if (DoesUndo()) + if (GetIDocumentUndoRedo().DoesUndo()) { - AppendUndo(new SwUndoPageDescDelete(*pDel, this)); + SwUndo *const pUndo(new SwUndoPageDescDelete(*pDel, this)); + GetIDocumentUndoRedo().AppendUndo(pUndo); } PreDelPageDesc(pDel); // #i7983# @@ -542,8 +610,8 @@ void SwDoc::DelPageDesc( USHORT i, BOOL bBroadcast ) |* |*************************************************************************/ -USHORT SwDoc::MakePageDesc( const String &rName, const SwPageDesc *pCpy, - BOOL bRegardLanguage, BOOL bBroadcast) // #116530# +sal_uInt16 SwDoc::MakePageDesc( const String &rName, const SwPageDesc *pCpy, + sal_Bool bRegardLanguage, sal_Bool bBroadcast) // #116530# { SwPageDesc *pNew; if( pCpy ) @@ -578,19 +646,22 @@ USHORT SwDoc::MakePageDesc( const String &rName, const SwPageDesc *pCpy, SFX_STYLESHEET_CREATED); // <- #116530# - if (DoesUndo()) - AppendUndo(new SwUndoPageDescCreate(pNew, this)); // #116530# + if (GetIDocumentUndoRedo().DoesUndo()) + { + // #116530# + GetIDocumentUndoRedo().AppendUndo(new SwUndoPageDescCreate(pNew, this)); + } SetModified(); return (aPageDescs.Count()-1); } -SwPageDesc* SwDoc::FindPageDescByName( const String& rName, USHORT* pPos ) const +SwPageDesc* SwDoc::FindPageDescByName( const String& rName, sal_uInt16* pPos ) const { SwPageDesc* pRet = 0; if( pPos ) *pPos = USHRT_MAX; - for( USHORT n = 0, nEnd = aPageDescs.Count(); n < nEnd; ++n ) + for( sal_uInt16 n = 0, nEnd = aPageDescs.Count(); n < nEnd; ++n ) if( aPageDescs[ n ]->GetName() == rName ) { pRet = aPageDescs[ n ]; @@ -618,25 +689,35 @@ void SwDoc::PrtDataChanged() // <-- SwRootFrm* pTmpRoot = GetCurrentLayout();//swmod 080219 SwWait *pWait = 0; - BOOL bEndAction = FALSE; + sal_Bool bEndAction = sal_False; if( GetDocShell() ) GetDocShell()->UpdateFontList(); +<<<<<<< local BOOL bDraw = TRUE; if ( pTmpRoot ) +======= + sal_Bool bDraw = sal_True; + if ( GetRootFrm() ) +>>>>>>> other { ViewShell *pSh = GetCurrentViewShell(); if( !pSh->GetViewOptions()->getBrowseMode() || pSh->GetViewOptions()->IsPrtFormat() ) { if ( GetDocShell() ) - pWait = new SwWait( *GetDocShell(), TRUE ); + pWait = new SwWait( *GetDocShell(), sal_True ); +<<<<<<< local pTmpRoot->StartAllAction(); bEndAction = TRUE; +======= + GetRootFrm()->StartAllAction(); + bEndAction = sal_True; +>>>>>>> other - bDraw = FALSE; + bDraw = sal_False; if( pDrawModel ) { pDrawModel->SetAddExtLeading( get(IDocumentSettingAccess::ADD_EXT_LEADING) ); @@ -671,7 +752,7 @@ void SwDoc::PrtDataChanged() pDrawModel->SetRefDevice( pOutDev ); } - PrtOLENotify( TRUE ); + PrtOLENotify( sal_True ); if ( bEndAction ) pTmpRoot->EndAllAction(); //swmod 080218 @@ -685,7 +766,7 @@ void SwDoc::PrtDataChanged() //ist in init.cxx zu finden. extern SvPtrarr *pGlobalOLEExcludeList; -void SwDoc::PrtOLENotify( BOOL bAll ) +void SwDoc::PrtOLENotify( sal_Bool bAll ) { SwFEShell *pShell = 0; if ( GetCurrentViewShell() ) @@ -707,16 +788,16 @@ void SwDoc::PrtOLENotify( BOOL bAll ) //Da wir keine Shell haben, merken wir uns diesen unguenstigen //Zustand am Dokument, dies wird dann beim Erzeugen der ersten Shell //nachgeholt. - mbOLEPrtNotifyPending = TRUE; + mbOLEPrtNotifyPending = sal_True; if ( bAll ) - mbAllOLENotify = TRUE; + mbAllOLENotify = sal_True; } else { if ( mbAllOLENotify ) - bAll = TRUE; + bAll = sal_True; - mbOLEPrtNotifyPending = mbAllOLENotify = FALSE; + mbOLEPrtNotifyPending = mbAllOLENotify = sal_False; SwOLENodes *pNodes = SwCntntNode::CreateOLENodesArray( *GetDfltGrfFmtColl(), !bAll ); if ( pNodes ) @@ -725,12 +806,12 @@ void SwDoc::PrtOLENotify( BOOL bAll ) 0, pNodes->Count(), GetDocShell()); GetCurrentLayout()->StartAllAction(); //swmod 080218 - for( USHORT i = 0; i < pNodes->Count(); ++i ) + for( sal_uInt16 i = 0; i < pNodes->Count(); ++i ) { ::SetProgressState( i, GetDocShell() ); SwOLENode* pOLENd = (*pNodes)[i]; - pOLENd->SetOLESizeInvalid( FALSE ); + pOLENd->SetOLESizeInvalid( sal_False ); //Ersteinmal die Infos laden und festellen ob das Teil nicht //schon in der Exclude-Liste steht @@ -745,8 +826,8 @@ void SwDoc::PrtOLENotify( BOOL bAll ) // aName = ???? } - BOOL bFound = FALSE; - for ( USHORT j = 0; + sal_Bool bFound = sal_False; + for ( sal_uInt16 j = 0; j < pGlobalOLEExcludeList->Count() && !bFound; ++j ) { @@ -770,7 +851,7 @@ void SwDoc::PrtOLENotify( BOOL bAll ) pShell->CalcAndSetScale( xObj );//Client erzeugen lassen. } else - pOLENd->SetOLESizeInvalid( TRUE ); + pOLENd->SetOLESizeInvalid( sal_True ); } else */ pGlobalOLEExcludeList->Insert( @@ -790,7 +871,7 @@ IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, ) SwFEShell* pSh = (SwFEShell*)GetEditShell(); if( pSh ) { - mbOLEPrtNotifyPending = mbAllOLENotify = FALSE; + mbOLEPrtNotifyPending = mbAllOLENotify = sal_False; SwOLENodes *pNodes = SwCntntNode::CreateOLENodesArray( *GetDfltGrfFmtColl(), true ); if( pNodes ) @@ -800,12 +881,21 @@ IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, ) GetCurrentLayout()->StartAllAction(); //swmod 080218 SwMsgPoolItem aMsgHint( RES_UPDATE_ATTR ); +<<<<<<< local for( USHORT i = 0; i < pNodes->Count(); ++i ) +======= + for( sal_uInt16 i = 0; i < aOLENodes.Count(); ++i ) +>>>>>>> other { ::SetProgressState( i, GetDocShell() ); +<<<<<<< local SwOLENode* pOLENd = (*pNodes)[i]; pOLENd->SetOLESizeInvalid( FALSE ); +======= + SwOLENode* pOLENd = aOLENodes[i]; + pOLENd->SetOLESizeInvalid( sal_False ); +>>>>>>> other //Kennen wir nicht, also muss das Objekt geladen werden. //Wenn es keine Benachrichtigung wuenscht @@ -822,7 +912,7 @@ IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, ) pSh->CalcAndSetScale( xRef );//Client erzeugen lassen. } else - pOLENd->SetOLESizeInvalid( TRUE ); + pOLENd->SetOLESizeInvalid( sal_True ); }*/ // repaint it pOLENd->ModifyNotification( &aMsgHint, &aMsgHint ); @@ -836,16 +926,16 @@ IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, ) return 0; } -BOOL SwDoc::FindPageDesc( const String & rName, sal_uInt16 * pFound) +sal_Bool SwDoc::FindPageDesc( const String & rName, sal_uInt16 * pFound) { - BOOL bResult = FALSE; + sal_Bool bResult = sal_False; sal_uInt16 nI; for (nI = 0; nI < aPageDescs.Count(); nI++) { if (aPageDescs[nI]->GetName() == rName) { *pFound = nI; - bResult = TRUE; + bResult = sal_True; break; } } @@ -865,7 +955,7 @@ SwPageDesc * SwDoc::GetPageDesc( const String & rName ) return aResult; } -void SwDoc::DelPageDesc( const String & rName, BOOL bBroadcast ) // #116530# +void SwDoc::DelPageDesc( const String & rName, sal_Bool bBroadcast ) // #116530# { sal_uInt16 nI; @@ -888,7 +978,7 @@ void SwDoc::ChgPageDesc( const String & rName, const SwPageDesc & rDesc) */ void SwDoc::CheckDefaultPageFmt() { - for ( USHORT i = 0; i < GetPageDescCnt(); ++i ) + for ( sal_uInt16 i = 0; i < GetPageDescCnt(); ++i ) { SwPageDesc& rDesc = _GetPageDesc( i ); @@ -920,7 +1010,7 @@ void SwDoc::SetDefaultPageMode(bool bSquaredPageMode) aNewGrid.Init(); SetDefault(aNewGrid); - for ( USHORT i = 0; i < GetPageDescCnt(); ++i ) + for ( sal_uInt16 i = 0; i < GetPageDescCnt(); ++i ) { SwPageDesc& rDesc = _GetPageDesc( i ); |