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/core/layout/frmtool.cxx | |
parent | 80731dbfcb48a2ffec30a4b2abe1ba8ada8f0169 (diff) |
removetooltypes01: #i112600# Remove tools types from sw
Diffstat (limited to 'sw/source/core/layout/frmtool.cxx')
-rw-r--r-- | sw/source/core/layout/frmtool.cxx | 278 |
1 files changed, 139 insertions, 139 deletions
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 661f68603603..3d820e7a1e69 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -92,17 +92,17 @@ // <-- // ftnfrm.cxx: -void lcl_RemoveFtns( SwFtnBossFrm* pBoss, BOOL bPageOnly, BOOL bEndNotes ); +void lcl_RemoveFtns( SwFtnBossFrm* pBoss, sal_Bool bPageOnly, sal_Bool bEndNotes ); using namespace ::com::sun::star; -BOOL bObjsDirect = TRUE; -BOOL bDontCreateObjects = FALSE; -BOOL bSetCompletePaintOnInvalidate = FALSE; +sal_Bool bObjsDirect = sal_True; +sal_Bool bDontCreateObjects = sal_False; +sal_Bool bSetCompletePaintOnInvalidate = sal_False; -BYTE StackHack::nCnt = 0; -BOOL StackHack::bLocked = FALSE; +sal_uInt8 StackHack::nCnt = 0; +sal_Bool StackHack::bLocked = sal_False; @@ -119,7 +119,7 @@ SwFrmNotify::SwFrmNotify( SwFrm *pF ) : pFrm( pF ), aFrm( pF->Frm() ), aPrt( pF->Prt() ), - bInvaKeep( FALSE ), + bInvaKeep( sal_False ), bValidSize( pF->GetValidSizeFlag() ), // --> OD 2005-07-29 #i49383# mbFrmDeleted( false ) @@ -137,8 +137,8 @@ SwFrmNotify::SwFrmNotify( SwFrm *pF ) : } bHadFollow = pF->IsCntntFrm() ? - (((SwCntntFrm*)pF)->GetFollow() ? TRUE : FALSE) : - FALSE; + (((SwCntntFrm*)pF)->GetFollow() ? sal_True : sal_False) : + sal_False; } /************************************************************************* @@ -160,12 +160,12 @@ SwFrmNotify::~SwFrmNotify() // <-- SWRECTFN( pFrm ) - const BOOL bAbsP = POS_DIFF( aFrm, pFrm->Frm() ); - const BOOL bChgWidth = + const sal_Bool bAbsP = POS_DIFF( aFrm, pFrm->Frm() ); + const sal_Bool bChgWidth = (aFrm.*fnRect->fnGetWidth)() != (pFrm->Frm().*fnRect->fnGetWidth)(); - const BOOL bChgHeight = + const sal_Bool bChgHeight = (aFrm.*fnRect->fnGetHeight)()!=(pFrm->Frm().*fnRect->fnGetHeight)(); - const BOOL bChgFlyBasePos = pFrm->IsTxtFrm() && + const sal_Bool bChgFlyBasePos = pFrm->IsTxtFrm() && ( ( mnFlyAnchorOfst != ((SwTxtFrm*)pFrm)->GetBaseOfstForFly( sal_True ) ) || ( mnFlyAnchorOfstNoWrap != ((SwTxtFrm*)pFrm)->GetBaseOfstForFly( sal_False ) ) ); @@ -248,9 +248,9 @@ SwFrmNotify::~SwFrmNotify() } //Fuer Hintergrundgrafiken muss bei Groessenaenderungen ein Repaint her. - const BOOL bPrtWidth = + const sal_Bool bPrtWidth = (aPrt.*fnRect->fnGetWidth)() != (pFrm->Prt().*fnRect->fnGetWidth)(); - const BOOL bPrtHeight = + const sal_Bool bPrtHeight = (aPrt.*fnRect->fnGetHeight)()!=(pFrm->Prt().*fnRect->fnGetHeight)(); if ( bPrtWidth || bPrtHeight ) { @@ -269,7 +269,7 @@ SwFrmNotify::~SwFrmNotify() } } - const BOOL bPrtP = POS_DIFF( aPrt, pFrm->Prt() ); + const sal_Bool bPrtP = POS_DIFF( aPrt, pFrm->Prt() ); if ( bAbsP || bPrtP || bChgWidth || bChgHeight || bPrtWidth || bPrtHeight || bChgFlyBasePos ) { @@ -468,7 +468,7 @@ SwFrmNotify::~SwFrmNotify() SwLayNotify::SwLayNotify( SwLayoutFrm *pLayFrm ) : SwFrmNotify( pLayFrm ), - bLowersComplete( FALSE ) + bLowersComplete( sal_False ) { } @@ -521,22 +521,22 @@ SwLayNotify::~SwLayNotify() SwLayoutFrm *pLay = GetLay(); SWRECTFN( pLay ) - BOOL bNotify = FALSE; + sal_Bool bNotify = sal_False; if ( pLay->Prt().SSize() != aPrt.SSize() ) { if ( !IsLowersComplete() ) { - BOOL bInvaPercent; + sal_Bool bInvaPercent; if ( pLay->IsRowFrm() ) { - bInvaPercent = TRUE; + bInvaPercent = sal_True; long nNew = (pLay->Prt().*fnRect->fnGetHeight)(); if( nNew != (aPrt.*fnRect->fnGetHeight)() ) - ((SwRowFrm*)pLay)->AdjustCells( nNew, TRUE); + ((SwRowFrm*)pLay)->AdjustCells( nNew, sal_True); if( (pLay->Prt().*fnRect->fnGetWidth)() != (aPrt.*fnRect->fnGetWidth)() ) - ((SwRowFrm*)pLay)->AdjustCells( 0, FALSE ); + ((SwRowFrm*)pLay)->AdjustCells( 0, sal_False ); } else { @@ -546,7 +546,7 @@ SwLayNotify::~SwLayNotify() //3. Wenn der Fly eine feste Hoehe hat und die Spalten in der // Hoehe danebenliegen. //4. niemals bei SectionFrms. - BOOL bLow; + sal_Bool bLow; if( pLay->IsFlyFrm() ) { if ( pLay->Lower() ) @@ -556,7 +556,7 @@ SwLayNotify::~SwLayNotify() != (pLay->Prt().*fnRect->fnGetHeight)(); } else - bLow = FALSE; + bLow = sal_False; } else if( pLay->IsSctFrm() ) { @@ -568,12 +568,12 @@ SwLayNotify::~SwLayNotify() bLow = pLay->Prt().Width() != aPrt.Width(); } else - bLow = FALSE; + bLow = sal_False; } else if( pLay->IsFooterFrm() && !pLay->HasFixSize() ) bLow = pLay->Prt().Width() != aPrt.Width(); else - bLow = TRUE; + bLow = sal_True; bInvaPercent = bLow; if ( bLow ) { @@ -599,7 +599,7 @@ SwLayNotify::~SwLayNotify() } } } - bNotify = TRUE; + bNotify = sal_True; //TEUER!! aber wie macht man es geschickter? if( bInvaPercent ) pLay->InvaPercentLowers( pLay->Prt().Height() - aPrt.Height() ); @@ -616,9 +616,9 @@ SwLayNotify::~SwLayNotify() } //Lower benachrichtigen wenn sich die Position veraendert hat. - const BOOL bPrtPos = POS_DIFF( aPrt, pLay->Prt() ); - const BOOL bPos = bPrtPos || POS_DIFF( aFrm, pLay->Frm() ); - const BOOL bSize = pLay->Frm().SSize() != aFrm.SSize(); + const sal_Bool bPrtPos = POS_DIFF( aPrt, pLay->Prt() ); + const sal_Bool bPos = bPrtPos || POS_DIFF( aFrm, pLay->Frm() ); + const sal_Bool bSize = pLay->Frm().SSize() != aFrm.SSize(); if ( bPos && pLay->Lower() && !IsLowersComplete() ) pLay->Lower()->InvalidatePos(); @@ -939,7 +939,7 @@ SwCntntNotify::~SwCntntNotify() } } - BOOL bFirst = (aFrm.*fnRect->fnGetWidth)() == 0; + sal_Bool bFirst = (aFrm.*fnRect->fnGetWidth)() == 0; if ( pCnt->IsNoTxtFrm() ) { @@ -986,7 +986,7 @@ SwCntntNotify::~SwCntntNotify() if ( pFESh && pNd->IsOLESizeInvalid() ) { - pNd->SetOLESizeInvalid( FALSE ); + pNd->SetOLESizeInvalid( sal_False ); //TODO/LATER: needs OnDocumentPrinterChanged //xObj->OnDocumentPrinterChanged( pNd->GetDoc()->getPrinter( false ) ); pFESh->CalcAndSetScale( xObj );//Client erzeugen lassen. @@ -1023,7 +1023,7 @@ SwCntntNotify::~SwCntntNotify() SwNodeIndex *pIdx = 0; SwSpzFrmFmts *pTbl = pDoc->GetSpzFrmFmts(); - for ( USHORT i = 0; i < pTbl->Count(); ++i ) + for ( sal_uInt16 i = 0; i < pTbl->Count(); ++i ) { if ( !pPage ) pPage = pCnt->FindPageFrm(); @@ -1036,7 +1036,7 @@ SwCntntNotify::~SwCntntNotify() continue; //#60878# nicht etwa zeichengebundene. } - BOOL bCheckPos = FALSE; + sal_Bool bCheckPos = sal_False; if ( rAnch.GetCntntAnchor() ) { if ( !pIdx ) @@ -1045,7 +1045,7 @@ SwCntntNotify::~SwCntntNotify() } if ( rAnch.GetCntntAnchor()->nNode == *pIdx ) { - bCheckPos = TRUE; + bCheckPos = sal_True; if (FLY_AT_PAGE == rAnch.GetAnchorId()) { ASSERT( false, "<SwCntntNotify::~SwCntntNotify()> - to page anchored object with content position. Please inform OD." ); @@ -1118,10 +1118,10 @@ SwCntntNotify::~SwCntntNotify() |* |*************************************************************************/ -void AppendObjs( const SwSpzFrmFmts *pTbl, ULONG nIndex, +void AppendObjs( const SwSpzFrmFmts *pTbl, sal_uLong nIndex, SwFrm *pFrm, SwPageFrm *pPage ) { - for ( USHORT i = 0; i < pTbl->Count(); ++i ) + for ( sal_uInt16 i = 0; i < pTbl->Count(); ++i ) { SwFrmFmt *pFmt = (SwFrmFmt*)(*pTbl)[i]; const SwFmtAnchor &rAnch = pFmt->GetAnchor(); @@ -1196,7 +1196,7 @@ void AppendObjs( const SwSpzFrmFmts *pTbl, ULONG nIndex, } } -BOOL MA_FASTCALL lcl_ObjConnected( SwFrmFmt *pFmt ) +sal_Bool MA_FASTCALL lcl_ObjConnected( SwFrmFmt *pFmt ) { SwClientIter aIter( *pFmt ); if ( RES_FLYFRMFMT == pFmt->Which() ) @@ -1207,7 +1207,7 @@ BOOL MA_FASTCALL lcl_ObjConnected( SwFrmFmt *pFmt ) if ( 0 != (pContact = (SwDrawContact*)aIter.First( TYPE(SwDrawContact)))) return pContact->GetAnchorFrm() != 0; } - return FALSE; + return sal_False; } /** helper method to determine, if a <SwFrmFmt>, which has an object connected, @@ -1245,24 +1245,24 @@ void AppendAllObjs( const SwSpzFrmFmts *pTbl ) SwSpzFrmFmts aCpy( 255, 255 ); aCpy.Insert( pTbl, 0 ); - USHORT nOldCnt = USHRT_MAX; + sal_uInt16 nOldCnt = USHRT_MAX; while ( aCpy.Count() && aCpy.Count() != nOldCnt ) { nOldCnt = aCpy.Count(); for ( int i = 0; i < int(aCpy.Count()); ++i ) { - SwFrmFmt *pFmt = (SwFrmFmt*)aCpy[ USHORT(i) ]; + SwFrmFmt *pFmt = (SwFrmFmt*)aCpy[ sal_uInt16(i) ]; const SwFmtAnchor &rAnch = pFmt->GetAnchor(); - BOOL bRemove = FALSE; + sal_Bool bRemove = sal_False; if ((rAnch.GetAnchorId() == FLY_AT_PAGE) || (rAnch.GetAnchorId() == FLY_AS_CHAR)) { //Seitengebunde sind bereits verankert, zeichengebundene //will ich hier nicht. - bRemove = TRUE; + bRemove = sal_True; } - else if ( FALSE == (bRemove = ::lcl_ObjConnected( pFmt )) || + else if ( sal_False == (bRemove = ::lcl_ObjConnected( pFmt )) || ::lcl_InHeaderOrFooter( *pFmt ) ) { // OD 23.06.2003 #108784# - correction: for objects in header @@ -1276,7 +1276,7 @@ void AppendAllObjs( const SwSpzFrmFmts *pTbl ) } if ( bRemove ) { - aCpy.Remove( USHORT(i) ); + aCpy.Remove( sal_uInt16(i) ); --i; } } @@ -1304,16 +1304,16 @@ void lcl_SetPos( SwFrm& _rNewFrm, } void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, - ULONG nIndex, BOOL bPages, ULONG nEndIndex, + sal_uLong nIndex, sal_Bool bPages, sal_uLong nEndIndex, SwFrm *pPrv ) { pDoc->BlockIdling(); SwRootFrm* pLayout = pDoc->GetRootFrm(); - const BOOL bOldCallbackActionEnabled = pLayout ? pLayout->IsCallbackActionEnabled() : sal_False; + const sal_Bool bOldCallbackActionEnabled = pLayout ? pLayout->IsCallbackActionEnabled() : sal_False; if(pLayout) - pLayout->SetCallbackActionEnabled( FALSE ); + pLayout->SetCallbackActionEnabled( sal_False ); - //Bei der Erzeugung des Layouts wird bPages mit TRUE uebergeben. Dann + //Bei der Erzeugung des Layouts wird bPages mit sal_True uebergeben. Dann //werden schon mal alle x Absaetze neue Seiten angelegt. Bei umbruechen //und/oder Pagedescriptorwechseln werden gleich die entsprechenden Seiten //angelegt. @@ -1327,17 +1327,17 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, //Wenn in der DocStatistik eine brauchebare Seitenzahl angegeben ist //(wird beim Schreiben gepflegt), so wird von dieser Seitenanzahl //ausgegengen. - const BOOL bStartPercent = bPages && !nEndIndex; + const sal_Bool bStartPercent = bPages && !nEndIndex; SwPageFrm *pPage = pLay->FindPageFrm(); const SwSpzFrmFmts *pTbl = pDoc->GetSpzFrmFmts(); SwFrm *pFrm = 0; - BOOL bBreakAfter = FALSE; + sal_Bool bBreakAfter = sal_False; SwActualSection *pActualSection = 0; SwLayHelper *pPageMaker; - //Wenn das Layout erzeugt wird (bPages == TRUE) steuern wir den Progress + //Wenn das Layout erzeugt wird (bPages == sal_True) steuern wir den Progress //an. Flys und DrawObjekte werden dann nicht gleich verbunden, dies //passiert erst am Ende der Funktion. if ( bPages ) @@ -1348,9 +1348,9 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, pActualSection, bBreakAfter, nIndex, 0 == nEndIndex ); if( bStartPercent ) { - const ULONG nPageCount = pPageMaker->CalcPageCount(); + const sal_uLong nPageCount = pPageMaker->CalcPageCount(); if( nPageCount ) - bObjsDirect = FALSE; + bObjsDirect = sal_False; } } else @@ -1384,7 +1384,7 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, //the SwActualSection class has a member, which points to an upper(section). //When the "inner" section finishs, the upper will used instead. - while( TRUE ) + while( sal_True ) { SwNode *pNd = pDoc->GetNodes()[nIndex]; if ( pNd->IsCntntNode() ) @@ -1523,7 +1523,7 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, if( pPrv->IsSctFrm() ) pPrv = ((SwSectionFrm*)pPrv)->ContainsCntnt(); if( pPrv && pPrv->IsTxtFrm() ) - ((SwTxtFrm*)pPrv)->Prepare( PREP_QUOVADIS, 0, FALSE ); + ((SwTxtFrm*)pPrv)->Prepare( PREP_QUOVADIS, 0, sal_False ); } } // --> OD 2005-12-01 #i27138# @@ -1627,7 +1627,7 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, if( ! pOuterSectionFrm->IsColLocked() && ! pOuterSectionFrm->ContainsCntnt() ) { - pOuterSectionFrm->DelEmpty( TRUE ); + pOuterSectionFrm->DelEmpty( sal_True ); delete pOuterSectionFrm; } pActualSection->SetSectionFrm( (SwSectionFrm*)pFrm ); @@ -1683,7 +1683,7 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, { if ( !bDontCreateObjects ) AppendAllObjs( pTbl ); - bObjsDirect = TRUE; + bObjsDirect = sal_True; } if( pPageMaker ) @@ -1710,29 +1710,29 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx, const SwNodeIndex &rEndIdx ) { - bObjsDirect = FALSE; + bObjsDirect = sal_False; SwNodeIndex aTmp( rSttIdx ); - ULONG nEndIdx = rEndIdx.GetIndex(); + sal_uLong nEndIdx = rEndIdx.GetIndex(); SwNode* pNd = pDoc->GetNodes().FindPrvNxtFrmNode( aTmp, pDoc->GetNodes()[ nEndIdx-1 ]); if ( pNd ) { - BOOL bApres = aTmp < rSttIdx; + sal_Bool bApres = aTmp < rSttIdx; SwNode2Layout aNode2Layout( *pNd, rSttIdx.GetIndex() ); SwFrm* pFrm; while( 0 != (pFrm = aNode2Layout.NextFrm()) ) { SwLayoutFrm *pUpper = pFrm->GetUpper(); SwFtnFrm* pFtnFrm = pUpper->FindFtnFrm(); - BOOL bOldLock, bOldFtn; + sal_Bool bOldLock, bOldFtn; if( pFtnFrm ) { bOldFtn = pFtnFrm->IsColLocked(); pFtnFrm->ColLock(); } else - bOldFtn = TRUE; + bOldFtn = sal_True; SwSectionFrm* pSct = pUpper->FindSctFrm(); // Es sind innerhalb von Fussnoten nur die Bereiche interessant, // die in den Fussnoten liegen, nicht etwa die (spaltigen) Bereiche, @@ -1746,14 +1746,14 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx, pSct->ColLock(); } else - bOldLock = TRUE; + bOldLock = sal_True; // Wenn pFrm sich nicht bewegen kann, koennen wir auch niemanden // auf die naechste Seite schieben. Innerhalb eines Rahmens auch // nicht ( in der 1. Spalte eines Rahmens waere pFrm Moveable()! ) // Auch in spaltigen Bereichen in Tabellen waere pFrm Moveable. - BOOL bMoveNext = nEndIdx - rSttIdx.GetIndex() > 120; - BOOL bAllowMove = !pFrm->IsInFly() && pFrm->IsMoveable() && + sal_Bool bMoveNext = nEndIdx - rSttIdx.GetIndex() > 120; + sal_Bool bAllowMove = !pFrm->IsInFly() && pFrm->IsMoveable() && (!pFrm->IsInTab() || pFrm->IsTabFrm() ); if ( bMoveNext && bAllowMove ) { @@ -1842,12 +1842,12 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx, if( pTmp ) { SwFrm* pOldUp = pTmp->GetFrm()->GetUpper(); - // MoveFwd==TRUE bedeutet, dass wir auf der gleichen + // MoveFwd==sal_True bedeutet, dass wir auf der gleichen // Seite geblieben sind, wir wollen aber die Seite wechseln, // sofern dies moeglich ist - BOOL bTmpOldLock = pTmp->IsJoinLocked(); + sal_Bool bTmpOldLock = pTmp->IsJoinLocked(); pTmp->LockJoin(); - while( pTmp->MoveFwd( TRUE, FALSE, TRUE ) ) + while( pTmp->MoveFwd( sal_True, sal_False, sal_True ) ) { if( pOldUp == pTmp->GetFrm()->GetUpper() ) break; @@ -1861,7 +1861,7 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx, } else { - BOOL bSplit; + sal_Bool bSplit; SwFrm* pPrv = bApres ? pFrm : pFrm->GetPrev(); // Wenn in einen SectionFrm ein anderer eingefuegt wird, // muss dieser aufgebrochen werden @@ -1876,8 +1876,8 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx, } } else - bSplit = FALSE; - ::_InsertCnt( pUpper, pDoc, rSttIdx.GetIndex(), FALSE, + bSplit = sal_False; + ::_InsertCnt( pUpper, pDoc, rSttIdx.GetIndex(), sal_False, nEndIdx, pPrv ); // OD 23.06.2003 #108784# - correction: append objects doesn't // depend on value of <bAllowMove> @@ -1900,7 +1900,7 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx, } SwPageFrm *pPage = pUpper->FindPageFrm(); - SwFrm::CheckPageDescs( pPage, FALSE ); + SwFrm::CheckPageDescs( pPage, sal_False ); if( !bOldFtn ) pFtnFrm->ColUnlock(); if( !bOldLock ) @@ -1911,7 +1911,7 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx, // und damit ruhig zerstoert werden. if( !pSct->ContainsCntnt() ) { - pSct->DelEmpty( TRUE ); + pSct->DelEmpty( sal_True ); pDoc->GetRootFrm()->RemoveFromList( pSct ); delete pSct; } @@ -1919,7 +1919,7 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx, } } - bObjsDirect = TRUE; + bObjsDirect = sal_True; } @@ -1958,20 +1958,20 @@ SwBorderAttrs::SwBorderAttrs( const SwModify *pMod, const SwFrm *pConstructor ) //Muessen alle einmal berechnet werden: bTopLine = bBottomLine = bLeftLine = bRightLine = - bTop = bBottom = bLine = TRUE; + bTop = bBottom = bLine = sal_True; - bCacheGetLine = bCachedGetTopLine = bCachedGetBottomLine = FALSE; + bCacheGetLine = bCachedGetTopLine = bCachedGetBottomLine = sal_False; // OD 21.05.2003 #108789# - init cache status for values <bJoinedWithPrev> // and <bJoinedWithNext>, which aren't initialized by default. - bCachedJoinedWithPrev = FALSE; - bCachedJoinedWithNext = FALSE; + bCachedJoinedWithPrev = sal_False; + bCachedJoinedWithNext = sal_False; bBorderDist = 0 != (pConstructor->GetType() & (FRM_CELL)); } SwBorderAttrs::~SwBorderAttrs() { - ((SwModify*)pOwner)->SetInCache( FALSE ); + ((SwModify*)pOwner)->SetInCache( sal_False ); } /************************************************************************* @@ -1991,13 +1991,13 @@ SwBorderAttrs::~SwBorderAttrs() void SwBorderAttrs::_CalcTop() { nTop = CalcTopLine() + rUL.GetUpper(); - bTop = FALSE; + bTop = sal_False; } void SwBorderAttrs::_CalcBottom() { nBottom = CalcBottomLine() + rUL.GetLower(); - bBottom = FALSE; + bBottom = sal_False; } long SwBorderAttrs::CalcRight( const SwFrm* pCaller ) const @@ -2077,7 +2077,7 @@ void SwBorderAttrs::_CalcTopLine() ? rBox.GetDistance (BOX_LINE_TOP) : rBox.CalcLineSpace(BOX_LINE_TOP); nTopLine = nTopLine + rShadow.CalcShadowSpace(SHADOW_TOP); - bTopLine = FALSE; + bTopLine = sal_False; } void SwBorderAttrs::_CalcBottomLine() @@ -2086,7 +2086,7 @@ void SwBorderAttrs::_CalcBottomLine() ? rBox.GetDistance (BOX_LINE_BOTTOM) : rBox.CalcLineSpace(BOX_LINE_BOTTOM); nBottomLine = nBottomLine + rShadow.CalcShadowSpace(SHADOW_BOTTOM); - bBottomLine = FALSE; + bBottomLine = sal_False; } void SwBorderAttrs::_CalcLeftLine() @@ -2095,7 +2095,7 @@ void SwBorderAttrs::_CalcLeftLine() ? rBox.GetDistance (BOX_LINE_LEFT) : rBox.CalcLineSpace(BOX_LINE_LEFT); nLeftLine = nLeftLine + rShadow.CalcShadowSpace(SHADOW_LEFT); - bLeftLine = FALSE; + bLeftLine = sal_False; } void SwBorderAttrs::_CalcRightLine() @@ -2104,7 +2104,7 @@ void SwBorderAttrs::_CalcRightLine() ? rBox.GetDistance (BOX_LINE_RIGHT) : rBox.CalcLineSpace(BOX_LINE_RIGHT); nRightLine = nRightLine + rShadow.CalcShadowSpace(SHADOW_RIGHT); - bRightLine = FALSE; + bRightLine = sal_False; } /************************************************************************* @@ -2120,7 +2120,7 @@ void SwBorderAttrs::_IsLine() { bIsLine = rBox.GetTop() || rBox.GetBottom() || rBox.GetLeft()|| rBox.GetRight(); - bLine = FALSE; + bLine = sal_False; } /************************************************************************* @@ -2154,7 +2154,7 @@ inline int CmpLines( const SvxBorderLine *pL1, const SvxBorderLine *pL2 ) // OD 21.05.2003 #108789# - compare <CalcRight()> and <rCmpAttrs.CalcRight()> // instead of only the right LR-spacing, because R2L-layout has to be // considered. -BOOL SwBorderAttrs::CmpLeftRight( const SwBorderAttrs &rCmpAttrs, +sal_Bool SwBorderAttrs::CmpLeftRight( const SwBorderAttrs &rCmpAttrs, const SwFrm *pCaller, const SwFrm *pCmp ) const { @@ -2165,10 +2165,10 @@ BOOL SwBorderAttrs::CmpLeftRight( const SwBorderAttrs &rCmpAttrs, CalcRight( pCaller ) == rCmpAttrs.CalcRight( pCmp ) ); } -BOOL SwBorderAttrs::_JoinWithCmp( const SwFrm& _rCallerFrm, +sal_Bool SwBorderAttrs::_JoinWithCmp( const SwFrm& _rCallerFrm, const SwFrm& _rCmpFrm ) const { - BOOL bReturnVal = FALSE; + sal_Bool bReturnVal = sal_False; SwBorderAttrAccess aCmpAccess( SwFrm::GetCache(), &_rCmpFrm ); const SwBorderAttrs &rCmpAttrs = *aCmpAccess.Get(); @@ -2178,7 +2178,7 @@ BOOL SwBorderAttrs::_JoinWithCmp( const SwFrm& _rCallerFrm, CmpLeftRight( rCmpAttrs, &_rCallerFrm, &_rCmpFrm ) ) { - bReturnVal = TRUE; + bReturnVal = sal_True; } return bReturnVal; @@ -2191,7 +2191,7 @@ void SwBorderAttrs::_CalcJoinedWithPrev( const SwFrm& _rFrm, const SwFrm* _pPrevFrm ) { // set default - bJoinedWithPrev = FALSE; + bJoinedWithPrev = sal_False; if ( _rFrm.IsTxtFrm() ) { @@ -2225,7 +2225,7 @@ void SwBorderAttrs::_CalcJoinedWithPrev( const SwFrm& _rFrm, void SwBorderAttrs::_CalcJoinedWithNext( const SwFrm& _rFrm ) { // set default - bJoinedWithNext = FALSE; + bJoinedWithNext = sal_False; if ( _rFrm.IsTxtFrm() ) { @@ -2253,7 +2253,7 @@ void SwBorderAttrs::_CalcJoinedWithNext( const SwFrm& _rFrm ) // OD 21.05.2003 #108789# - accessor for cached values <bJoinedWithPrev> // OD 2004-02-26 #i25029# - add 2nd parameter <_pPrevFrm>, which is passed to // method <_CalcJoindWithPrev(..)>. -BOOL SwBorderAttrs::JoinedWithPrev( const SwFrm& _rFrm, +sal_Bool SwBorderAttrs::JoinedWithPrev( const SwFrm& _rFrm, const SwFrm* _pPrevFrm ) const { if ( !bCachedJoinedWithPrev || _pPrevFrm ) @@ -2265,7 +2265,7 @@ BOOL SwBorderAttrs::JoinedWithPrev( const SwFrm& _rFrm, return bJoinedWithPrev; } -BOOL SwBorderAttrs::JoinedWithNext( const SwFrm& _rFrm ) const +sal_Bool SwBorderAttrs::JoinedWithNext( const SwFrm& _rFrm ) const { if ( !bCachedJoinedWithNext ) { @@ -2280,7 +2280,7 @@ BOOL SwBorderAttrs::JoinedWithNext( const SwFrm& _rFrm ) const void SwBorderAttrs::_GetTopLine( const SwFrm& _rFrm, const SwFrm* _pPrevFrm ) { - USHORT nRet = CalcTopLine(); + sal_uInt16 nRet = CalcTopLine(); // OD 21.05.2003 #108789# - use new method <JoinWithPrev()> // OD 2004-02-26 #i25029# - add 2nd parameter @@ -2296,7 +2296,7 @@ void SwBorderAttrs::_GetTopLine( const SwFrm& _rFrm, void SwBorderAttrs::_GetBottomLine( const SwFrm& _rFrm ) { - USHORT nRet = CalcBottomLine(); + sal_uInt16 nRet = CalcBottomLine(); // OD 21.05.2003 #108789# - use new method <JoinWithPrev()> if ( JoinedWithNext( _rFrm ) ) @@ -2322,7 +2322,7 @@ SwBorderAttrAccess::SwBorderAttrAccess( SwCache &rCach, const SwFrm *pFrm ) : SwCacheAccess( rCach, (pFrm->IsCntntFrm() ? (void*)((SwCntntFrm*)pFrm)->GetNode() : (void*)((SwLayoutFrm*)pFrm)->GetFmt()), - (BOOL)(pFrm->IsCntntFrm() ? + (sal_Bool)(pFrm->IsCntntFrm() ? ((SwModify*)((SwCntntFrm*)pFrm)->GetNode())->IsInCache() : ((SwModify*)((SwLayoutFrm*)pFrm)->GetFmt())->IsInCache()) ), pConstructor( pFrm ) @@ -2340,7 +2340,7 @@ SwBorderAttrAccess::SwBorderAttrAccess( SwCache &rCach, const SwFrm *pFrm ) : SwCacheObj *SwBorderAttrAccess::NewObj() { - ((SwModify*)pOwner)->SetInCache( TRUE ); + ((SwModify*)pOwner)->SetInCache( sal_True ); return new SwBorderAttrs( (SwModify*)pOwner, pConstructor ); } @@ -2358,7 +2358,7 @@ SwBorderAttrs *SwBorderAttrAccess::Get() |* |*************************************************************************/ -SwOrderIter::SwOrderIter( const SwPageFrm *pPg, BOOL bFlys ) : +SwOrderIter::SwOrderIter( const SwPageFrm *pPg, sal_Bool bFlys ) : pPage( pPg ), pCurrent( 0 ), bFlysOnly( bFlys ) @@ -2379,17 +2379,17 @@ const SdrObject *SwOrderIter::Top() pCurrent = 0; if ( pPage->GetSortedObjs() ) { - UINT32 nTopOrd = 0; + sal_uInt32 nTopOrd = 0; const SwSortedObjs *pObjs = pPage->GetSortedObjs(); if ( pObjs->Count() ) { (*pObjs)[0]->GetDrawObj()->GetOrdNum(); //Aktualisieren erzwingen! - for ( USHORT i = 0; i < pObjs->Count(); ++i ) + for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i ) { const SdrObject* pObj = (*pObjs)[i]->GetDrawObj(); if ( bFlysOnly && !pObj->ISA(SwVirtFlyDrawObj) ) continue; - UINT32 nTmp = pObj->GetOrdNumDirect(); + sal_uInt32 nTmp = pObj->GetOrdNumDirect(); if ( nTmp >= nTopOrd ) { nTopOrd = nTmp; @@ -2415,17 +2415,17 @@ const SdrObject *SwOrderIter::Bottom() pCurrent = 0; if ( pPage->GetSortedObjs() ) { - UINT32 nBotOrd = USHRT_MAX; + sal_uInt32 nBotOrd = USHRT_MAX; const SwSortedObjs *pObjs = pPage->GetSortedObjs(); if ( pObjs->Count() ) { (*pObjs)[0]->GetDrawObj()->GetOrdNum(); //Aktualisieren erzwingen! - for ( USHORT i = 0; i < pObjs->Count(); ++i ) + for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i ) { const SdrObject* pObj = (*pObjs)[i]->GetDrawObj(); if ( bFlysOnly && !pObj->ISA(SwVirtFlyDrawObj) ) continue; - UINT32 nTmp = pObj->GetOrdNumDirect(); + sal_uInt32 nTmp = pObj->GetOrdNumDirect(); if ( nTmp < nBotOrd ) { nBotOrd = nTmp; @@ -2448,21 +2448,21 @@ const SdrObject *SwOrderIter::Bottom() const SdrObject *SwOrderIter::Next() { - const UINT32 nCurOrd = pCurrent ? pCurrent->GetOrdNumDirect() : 0; + const sal_uInt32 nCurOrd = pCurrent ? pCurrent->GetOrdNumDirect() : 0; pCurrent = 0; if ( pPage->GetSortedObjs() ) { - UINT32 nOrd = USHRT_MAX; + sal_uInt32 nOrd = USHRT_MAX; const SwSortedObjs *pObjs = pPage->GetSortedObjs(); if ( pObjs->Count() ) { (*pObjs)[0]->GetDrawObj()->GetOrdNum(); //Aktualisieren erzwingen! - for ( USHORT i = 0; i < pObjs->Count(); ++i ) + for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i ) { const SdrObject* pObj = (*pObjs)[i]->GetDrawObj(); if ( bFlysOnly && !pObj->ISA(SwVirtFlyDrawObj) ) continue; - UINT32 nTmp = pObj->GetOrdNumDirect(); + sal_uInt32 nTmp = pObj->GetOrdNumDirect(); if ( nTmp > nCurOrd && nTmp < nOrd ) { nOrd = nTmp; @@ -2485,21 +2485,21 @@ const SdrObject *SwOrderIter::Next() const SdrObject *SwOrderIter::Prev() { - const UINT32 nCurOrd = pCurrent ? pCurrent->GetOrdNumDirect() : 0; + const sal_uInt32 nCurOrd = pCurrent ? pCurrent->GetOrdNumDirect() : 0; pCurrent = 0; if ( pPage->GetSortedObjs() ) { - UINT32 nOrd = 0; + sal_uInt32 nOrd = 0; const SwSortedObjs *pObjs = pPage->GetSortedObjs(); if ( pObjs->Count() ) { (*pObjs)[0]->GetDrawObj()->GetOrdNum(); //Aktualisieren erzwingen! - for ( USHORT i = 0; i < pObjs->Count(); ++i ) + for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i ) { const SdrObject* pObj = (*pObjs)[i]->GetDrawObj(); if ( bFlysOnly && !pObj->ISA(SwVirtFlyDrawObj) ) continue; - UINT32 nTmp = pObj->GetOrdNumDirect(); + sal_uInt32 nTmp = pObj->GetOrdNumDirect(); if ( nTmp < nCurOrd && nTmp >= nOrd ) { nOrd = nTmp; @@ -2539,7 +2539,7 @@ void MA_FASTCALL lcl_RemoveObjsFromPage( SwFrm* _pFrm ) { ASSERT( _pFrm->GetDrawObjs(), "Keine DrawObjs fuer lcl_RemoveFlysFromPage." ); SwSortedObjs &rObjs = *_pFrm->GetDrawObjs(); - for ( USHORT i = 0; i < rObjs.Count(); ++i ) + for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i ) { SwAnchoredObject* pObj = rObjs[i]; // --> OD 2004-11-29 #115759# - reset member, at which the anchored @@ -2593,7 +2593,7 @@ void MA_FASTCALL lcl_RemoveObjsFromPage( SwFrm* _pFrm ) SwFrm *SaveCntnt( SwLayoutFrm *pLay, SwFrm *pStart ) { if( pLay->IsSctFrm() && pLay->Lower() && pLay->Lower()->IsColumnFrm() ) - lcl_RemoveFtns( (SwColumnFrm*)pLay->Lower(), TRUE, TRUE ); + lcl_RemoveFtns( (SwColumnFrm*)pLay->Lower(), sal_True, sal_True ); SwFrm *pSav; if ( 0 == (pSav = pLay->ContainsAny()) ) @@ -2628,7 +2628,7 @@ SwFrm *SaveCntnt( SwLayoutFrm *pLay, SwFrm *pStart ) SwFrm *pFloat = pSav; if( !pStart ) pStart = pSav; - BOOL bGo = pStart == pSav; + sal_Bool bGo = pStart == pSav; do { if( bGo ) @@ -2667,7 +2667,7 @@ SwFrm *SaveCntnt( SwLayoutFrm *pLay, SwFrm *pStart ) pFloat = pFloat->GetNext(); if( !bGo && pFloat == pStart ) { - bGo = TRUE; + bGo = sal_True; pFloat->pPrev->pNext = NULL; pFloat->pPrev = NULL; } @@ -2707,7 +2707,7 @@ void MA_FASTCALL lcl_AddObjsToPage( SwFrm* _pFrm, SwPageFrm* _pPage ) { ASSERT( _pFrm->GetDrawObjs(), "Keine DrawObjs fuer lcl_AddFlysToPage." ); SwSortedObjs &rObjs = *_pFrm->GetDrawObjs(); - for ( USHORT i = 0; i < rObjs.Count(); ++i ) + for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i ) { SwAnchoredObject* pObj = rObjs[i]; @@ -2859,7 +2859,7 @@ void RestoreCntnt( SwFrm *pSav, SwLayoutFrm *pParent, SwFrm *pSibling, bool bGro |* |*************************************************************************/ -ULONG MA_FASTCALL SqRt( BigInt nX ) +sal_uLong MA_FASTCALL SqRt( BigInt nX ) { BigInt nErg = 1; @@ -2872,7 +2872,7 @@ ULONG MA_FASTCALL SqRt( BigInt nX ) nOldErg = nErg; } } - return nErg >= BigInt(SAL_MAX_UINT32) ? ULONG_MAX : (ULONG)nErg; + return nErg >= BigInt(SAL_MAX_UINT32) ? ULONG_MAX : (sal_uLong)nErg; } /************************************************************************* @@ -2885,7 +2885,7 @@ ULONG MA_FASTCALL SqRt( BigInt nX ) |*************************************************************************/ SwPageFrm * MA_FASTCALL InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper, - BOOL bOdd, BOOL bInsertEmpty, BOOL bFtn, + sal_Bool bOdd, sal_Bool bInsertEmpty, sal_Bool bFtn, SwFrm *pSibling ) { SwPageFrm *pRet; @@ -2930,7 +2930,7 @@ SwPageFrm * MA_FASTCALL InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper, void MA_FASTCALL lcl_Regist( SwPageFrm *pPage, const SwFrm *pAnch ) { SwSortedObjs *pObjs = (SwSortedObjs*)pAnch->GetDrawObjs(); - for ( USHORT i = 0; i < pObjs->Count(); ++i ) + for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i ) { SwAnchoredObject* pObj = (*pObjs)[i]; if ( pObj->ISA(SwFlyFrm) ) @@ -3127,7 +3127,7 @@ void MA_FASTCALL lcl_NotifyCntnt( const SdrObject *pThis, SwCntntFrm *pCnt, if ( pCnt->GetDrawObjs() ) { const SwSortedObjs &rObjs = *pCnt->GetDrawObjs(); - for ( USHORT i = 0; i < rObjs.Count(); ++i ) + for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i ) { SwAnchoredObject* pObj = rObjs[i]; if ( pObj->ISA(SwFlyFrm) ) @@ -3152,7 +3152,7 @@ void Notify_Background( const SdrObject* pObj, SwPageFrm* pPage, const SwRect& rRect, const PrepareHint eHint, - const BOOL bInva ) + const sal_Bool bInva ) { //Wenn der Frm gerade erstmalig sinnvoll positioniert wurde, braucht der @@ -3257,7 +3257,7 @@ void Notify_Background( const SdrObject* pObj, { pObj->GetOrdNum(); const SwSortedObjs &rObjs = *pPage->GetSortedObjs(); - for ( USHORT i = 0; i < rObjs.Count(); ++i ) + for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i ) { SwAnchoredObject* pAnchoredObj = rObjs[i]; if ( pAnchoredObj->ISA(SwFlyFrm) ) @@ -3370,7 +3370,7 @@ const SwFrm* GetVirtualUpper( const SwFrm* pFrm, const Point& rPos ) |* |*************************************************************************/ -BOOL Is_Lower_Of( const SwFrm *pCurrFrm, const SdrObject* pObj ) +sal_Bool Is_Lower_Of( const SwFrm *pCurrFrm, const SdrObject* pObj ) { Point aPos; const SwFrm* pFrm; @@ -3389,7 +3389,7 @@ BOOL Is_Lower_Of( const SwFrm *pCurrFrm, const SdrObject* pObj ) pFrm = GetVirtualUpper( pFrm, aPos ); do { if ( pFrm == pCurrFrm ) - return TRUE; + return sal_True; if( pFrm->IsFlyFrm() ) { aPos = pFrm->Frm().Pos(); @@ -3398,14 +3398,14 @@ BOOL Is_Lower_Of( const SwFrm *pCurrFrm, const SdrObject* pObj ) else pFrm = pFrm->GetUpper(); } while ( pFrm ); - return FALSE; + return sal_False; } -const SwFrm *FindKontext( const SwFrm *pFrm, USHORT nAdditionalKontextTyp ) +const SwFrm *FindKontext( const SwFrm *pFrm, sal_uInt16 nAdditionalKontextTyp ) { //Liefert die Umgebung des Frm in die kein Fly aus einer anderen //Umgebung hineinragen kann. - const USHORT nTyp = FRM_ROOT | FRM_HEADER | FRM_FOOTER | FRM_FTNCONT | + const sal_uInt16 nTyp = FRM_ROOT | FRM_HEADER | FRM_FOOTER | FRM_FTNCONT | FRM_FTN | FRM_FLY | FRM_TAB | FRM_ROW | FRM_CELL | nAdditionalKontextTyp; @@ -3417,20 +3417,20 @@ const SwFrm *FindKontext( const SwFrm *pFrm, USHORT nAdditionalKontextTyp ) return pFrm; } -BOOL IsFrmInSameKontext( const SwFrm *pInnerFrm, const SwFrm *pFrm ) +sal_Bool IsFrmInSameKontext( const SwFrm *pInnerFrm, const SwFrm *pFrm ) { const SwFrm *pKontext = FindKontext( pInnerFrm, 0 ); - const USHORT nTyp = FRM_ROOT | FRM_HEADER | FRM_FOOTER | FRM_FTNCONT | + const sal_uInt16 nTyp = FRM_ROOT | FRM_HEADER | FRM_FOOTER | FRM_FTNCONT | FRM_FTN | FRM_FLY | FRM_TAB | FRM_ROW | FRM_CELL; do { if ( pFrm->GetType() & nTyp ) { if( pFrm == pKontext ) - return TRUE; + return sal_True; if( pFrm->IsCellFrm() ) - return FALSE; + return sal_False; } if( pFrm->IsFlyFrm() ) { @@ -3441,7 +3441,7 @@ BOOL IsFrmInSameKontext( const SwFrm *pInnerFrm, const SwFrm *pFrm ) pFrm = pFrm->GetUpper(); } while( pFrm ); - return FALSE; + return sal_False; } @@ -3516,8 +3516,8 @@ const SwFrm* MA_FASTCALL FindPage( const SwRect &rRect, const SwFrm *pPage ) return pPage; } -SwFrm* GetFrmOfModify( SwModify const& rMod, USHORT const nFrmType, - const Point* pPoint, const SwPosition *pPos, const BOOL bCalcFrm ) +SwFrm* GetFrmOfModify( SwModify const& rMod, sal_uInt16 const nFrmType, + const Point* pPoint, const SwPosition *pPos, const sal_Bool bCalcFrm ) { SwFrm *pMinFrm = 0, *pTmpFrm; SwRect aCalcRect; @@ -3617,7 +3617,7 @@ SwFrm* GetFrmOfModify( SwModify const& rMod, USHORT const nFrmType, return pMinFrm; } -BOOL IsExtraData( const SwDoc *pDoc ) +sal_Bool IsExtraData( const SwDoc *pDoc ) { const SwLineNumberInfo &rInf = pDoc->GetLineNumberInfo(); return rInf.IsPaintLineNumbers() || |