summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/flycnt.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout/flycnt.cxx')
-rw-r--r--sw/source/core/layout/flycnt.cxx104
1 files changed, 52 insertions, 52 deletions
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index 4d9b654fb79c..6a2621beaaa9 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -86,7 +86,7 @@ using namespace ::com::sun::star;
SwFlyAtCntFrm::SwFlyAtCntFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) :
SwFlyFreeFrm( pFmt, pAnch )
{
- bAtCnt = TRUE;
+ bAtCnt = sal_True;
bAutoPosition = (FLY_AT_CHAR == pFmt->GetAnchor().GetAnchorId());
}
@@ -104,11 +104,11 @@ TYPEINIT1(SwFlyAtCntFrm,SwFlyFreeFrm);
void SwFlyAtCntFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
- USHORT nWhich = pNew ? pNew->Which() : 0;
+ sal_uInt16 nWhich = pNew ? pNew->Which() : 0;
const SwFmtAnchor *pAnch = 0;
if( RES_ATTRSET_CHG == nWhich && SFX_ITEM_SET ==
- ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_ANCHOR, FALSE,
+ ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_ANCHOR, sal_False,
(const SfxPoolItem**)&pAnch ))
; // Beim GetItemState wird der AnkerPointer gesetzt !
@@ -132,7 +132,7 @@ void SwFlyAtCntFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
SwCntntFrm *pCntnt = (SwCntntFrm*)GetAnchorFrm();
AnchorFrm()->RemoveFly( this );
- const BOOL bBodyFtn = (pCntnt->IsInDocBody() || pCntnt->IsInFtn());
+ const sal_Bool bBodyFtn = (pCntnt->IsInDocBody() || pCntnt->IsInFtn());
//Den neuen Anker anhand des NodeIdx suchen, am alten und
//neuen NodeIdx kann auch erkannt werden, in welche Richtung
@@ -194,7 +194,7 @@ void SwFlyAtCntFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
if ( !pCntnt )
{
SwCntntNode *pNode = aNewIdx.GetNode().GetCntntNode();
- pCntnt = pNode->GetFrm( &pOldAnchor->Frm().Pos(), 0, FALSE );
+ pCntnt = pNode->GetFrm( &pOldAnchor->Frm().Pos(), 0, sal_False );
ASSERT( pCntnt, "Neuen Anker nicht gefunden" );
}
//Flys haengen niemals an einem Follow sondern immer am
@@ -269,7 +269,7 @@ public:
SwOszControl( const SwFlyFrm *pFrm );
~SwOszControl();
bool ChkOsz();
- static BOOL IsInProgress( const SwFlyFrm *pFly );
+ static sal_Bool IsInProgress( const SwFlyFrm *pFly );
};
const SwFlyFrm *SwOszControl::pStk1 = 0;
const SwFlyFrm *SwOszControl::pStk2 = 0;
@@ -318,19 +318,19 @@ SwOszControl::~SwOszControl()
// <--
}
-BOOL SwOszControl::IsInProgress( const SwFlyFrm *pFly )
+sal_Bool SwOszControl::IsInProgress( const SwFlyFrm *pFly )
{
if ( SwOszControl::pStk1 && !pFly->IsLowerOf( SwOszControl::pStk1 ) )
- return TRUE;
+ return sal_True;
if ( SwOszControl::pStk2 && !pFly->IsLowerOf( SwOszControl::pStk2 ) )
- return TRUE;
+ return sal_True;
if ( SwOszControl::pStk3 && !pFly->IsLowerOf( SwOszControl::pStk3 ) )
- return TRUE;
+ return sal_True;
if ( SwOszControl::pStk4 && !pFly->IsLowerOf( SwOszControl::pStk4 ) )
- return TRUE;
+ return sal_True;
if ( SwOszControl::pStk5 && !pFly->IsLowerOf( SwOszControl::pStk5 ) )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
bool SwOszControl::ChkOsz()
@@ -387,7 +387,7 @@ void SwFlyAtCntFrm::MakeAll()
// --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
if( GetPageFrm() )
{
- bSetCompletePaintOnInvalidate = TRUE;
+ bSetCompletePaintOnInvalidate = sal_True;
{
SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)GetFmt();
const SwFmtFrmSize &rFrmSz = GetFmt()->GetFrmSize();
@@ -421,7 +421,7 @@ void SwFlyAtCntFrm::MakeAll()
if( pFooter && !pFooter->IsFooterFrm() )
pFooter = NULL;
bool bOsz = false;
- BOOL bExtra = Lower() && Lower()->IsColumnFrm();
+ sal_Bool bExtra = Lower() && Lower()->IsColumnFrm();
// --> OD 2004-08-25 #i3317# - boolean, to apply temporarly the
// 'straightforward positioning process' for the frame due to its
// overlapping with a previous column.
@@ -548,7 +548,7 @@ void SwFlyAtCntFrm::MakeAll()
// Spalten hinterlaesst, so drehen wir lieber hier eine weitere
// Runde und formatieren unseren Inhalt via FormatWidthCols nochmal.
_InvalidateSize();
- bExtra = FALSE; // Sicherhaltshalber gibt es nur eine Ehrenrunde.
+ bExtra = sal_False; // Sicherhaltshalber gibt es nur eine Ehrenrunde.
}
} while ( !IsValid() && !bOsz &&
// --> OD 2004-08-25 #i3317#
@@ -595,7 +595,7 @@ void SwFlyAtCntFrm::MakeAll()
// <--
}
// <--
- bSetCompletePaintOnInvalidate = FALSE;
+ bSetCompletePaintOnInvalidate = sal_False;
}
}
}
@@ -632,10 +632,10 @@ public:
SwDistance() { nMain = nSub = 0; }
SwDistance& operator=( const SwDistance &rTwo )
{ nMain = rTwo.nMain; nSub = rTwo.nSub; return *this; }
- BOOL operator<( const SwDistance& rTwo )
+ sal_Bool operator<( const SwDistance& rTwo )
{ return nMain < rTwo.nMain || ( nMain == rTwo.nMain && nSub &&
rTwo.nSub && nSub < rTwo.nSub ); }
- BOOL operator<=( const SwDistance& rTwo )
+ sal_Bool operator<=( const SwDistance& rTwo )
{ return nMain < rTwo.nMain || ( nMain == rTwo.nMain && ( !nSub ||
!rTwo.nSub || nSub <= rTwo.nSub ) ); }
};
@@ -691,7 +691,7 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
{
// OD 26.09.2003 - <rPt> point is left of environment of given content frame
// OD: seems not to be correct for vertical layout!?
- const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, FALSE, pCnt );
+ const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, sal_False, pCnt );
if( !pLay ||
(bVert && (pLay->Frm().Top() + pLay->Prt().Bottom()) <rPt.Y())||
(!bVert && (pLay->Frm().Left() + pLay->Prt().Right())<rPt.X()) )
@@ -717,10 +717,10 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
// <--
const SwFrm *pPre = pCnt;
- const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, TRUE, pCnt );
+ const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, sal_True, pCnt );
SwTwips nFrmTop = 0;
SwTwips nPrtHeight = 0;
- BOOL bSct = FALSE;
+ sal_Bool bSct = sal_False;
const SwSectionFrm *pSect = pUp->FindSctFrm();
if( pSect )
{
@@ -729,7 +729,7 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
}
if( pSect && !pSect->IsAnLower( pLay ) )
{
- bSct = FALSE;
+ bSct = sal_False;
const SwSectionFrm* pNxtSect = pLay ? pLay->FindSctFrm() : 0;
if( pSect->IsAnFollow( pNxtSect ) )
{
@@ -801,13 +801,13 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
else
rRet.nMain += nPrtHeight;
pPre = pLay;
- pLay = pLay->GetLeaf( MAKEPAGE_NONE, TRUE, pCnt );
+ pLay = pLay->GetLeaf( MAKEPAGE_NONE, sal_True, pCnt );
if( pSect && !pSect->IsAnLower( pLay ) )
{ // If we're leaving a SwSectionFrm, the next Leaf-Frm
// is the part of the upper below the SectionFrm.
const SwSectionFrm* pNxtSect = pLay ?
pLay->FindSctFrm() : NULL;
- bSct = FALSE;
+ bSct = sal_False;
if( pSect->IsAnFollow( pNxtSect ) )
{
pSect = pNxtSect;
@@ -884,9 +884,9 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
return 0;
}
-ULONG MA_FASTCALL lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
+sal_uLong MA_FASTCALL lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
const SwCntntFrm *& rpCnt,
- const BOOL bBody, const BOOL bFtn )
+ const sal_Bool bBody, const sal_Bool bFtn )
{
//Sucht unterhalb von pLay den dichtesten Cnt zum Point. Der Bezugspunkt
//der Cntnts ist immer die linke obere Ecke.
@@ -897,8 +897,8 @@ ULONG MA_FASTCALL lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
#endif
rpCnt = 0;
- ULONG nDistance = ULONG_MAX;
- ULONG nNearest = ULONG_MAX;
+ sal_uLong nDistance = ULONG_MAX;
+ sal_uLong nNearest = ULONG_MAX;
const SwCntntFrm *pCnt = pLay->ContainsCntnt();
while ( pCnt && (bBody != pCnt->IsInDocBody() || bFtn != pCnt->IsInFtn()))
@@ -920,7 +920,7 @@ ULONG MA_FASTCALL lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
Min( pCnt->Frm().Top(), rPt.Y() );
BigInt dX1( dX ), dY1( dY );
dX1 *= dX1; dY1 *= dY1;
- const ULONG nDiff = ::SqRt( dX1 + dY1 );
+ const sal_uLong nDiff = ::SqRt( dX1 + dY1 );
if ( pCnt->Frm().Top() <= rPt.Y() )
{
if ( nDiff < nDistance )
@@ -949,7 +949,7 @@ ULONG MA_FASTCALL lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
}
const SwCntntFrm * MA_FASTCALL lcl_FindCnt( const Point &rPt, const SwCntntFrm *pCnt,
- const BOOL bBody, const BOOL bFtn )
+ const sal_Bool bBody, const sal_Bool bFtn )
{
//Sucht ausgehen von pCnt denjenigen CntntFrm, dessen linke obere
//Ecke am dichtesten am Point liegt.
@@ -963,7 +963,7 @@ const SwCntntFrm * MA_FASTCALL lcl_FindCnt( const Point &rPt, const SwCntntFrm *
//des Point sitzt.
const SwCntntFrm *pRet, *pNew;
const SwLayoutFrm *pLay = pCnt->FindPageFrm();
- ULONG nDist;
+ sal_uLong nDist;
nDist = ::lcl_FindCntDiff( rPt, pLay, pNew, bBody, bFtn );
if ( pNew )
@@ -973,16 +973,16 @@ const SwCntntFrm * MA_FASTCALL lcl_FindCnt( const Point &rPt, const SwCntntFrm *
nDist = ULONG_MAX;
}
const SwCntntFrm *pNearest = pRet;
- ULONG nNearest = nDist;
+ sal_uLong nNearest = nDist;
if ( pLay )
{
const SwLayoutFrm *pPge = pLay;
- ULONG nOldNew = ULONG_MAX;
- for ( USHORT i = 0; pPge->GetPrev() && (i < 3); ++i )
+ sal_uLong nOldNew = ULONG_MAX;
+ for ( sal_uInt16 i = 0; pPge->GetPrev() && (i < 3); ++i )
{
pPge = (SwLayoutFrm*)pPge->GetPrev();
- const ULONG nNew = ::lcl_FindCntDiff( rPt, pPge, pNew, bBody, bFtn );
+ const sal_uLong nNew = ::lcl_FindCntDiff( rPt, pPge, pNew, bBody, bFtn );
if ( nNew < nDist )
{
if ( pNew->Frm().Top() <= rPt.Y() )
@@ -1004,10 +1004,10 @@ const SwCntntFrm * MA_FASTCALL lcl_FindCnt( const Point &rPt, const SwCntntFrm *
}
pPge = pLay;
nOldNew = ULONG_MAX;
- for ( USHORT j = 0; pPge->GetNext() && (j < 3); ++j )
+ for ( sal_uInt16 j = 0; pPge->GetNext() && (j < 3); ++j )
{
pPge = (SwLayoutFrm*)pPge->GetNext();
- const ULONG nNew = ::lcl_FindCntDiff( rPt, pPge, pNew, bBody, bFtn );
+ const sal_uLong nNew = ::lcl_FindCntDiff( rPt, pPge, pNew, bBody, bFtn );
if ( nNew < nDist )
{
if ( pNew->Frm().Top() <= rPt.Y() )
@@ -1049,7 +1049,7 @@ void lcl_PointToPrt( Point &rPoint, const SwFrm *pFrm )
}
const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
- const BOOL bBodyOnly )
+ const sal_Bool bBodyOnly )
{
//Zu der angegebenen DokumentPosition wird der dichteste Cnt im
//Textfluss gesucht. AusgangsFrm ist der uebergebene Anker.
@@ -1067,14 +1067,14 @@ const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
SwRect aTmpRect( aTmp, Size(0,0) );
pTmpLay = (SwLayoutFrm*)::FindPage( aTmpRect, pTmpLay->Lower() );
}
- pCnt = pTmpLay->GetCntntPos( aTmp, FALSE, bBodyOnly );
+ pCnt = pTmpLay->GetCntntPos( aTmp, sal_False, bBodyOnly );
}
//Beim Suchen darauf achten, dass die Bereiche sinnvoll erhalten
//bleiben. D.h. in diesem Fall nicht in Header/Footer hinein und
//nicht aus Header/Footer hinaus.
- const BOOL bBody = pCnt->IsInDocBody() || bBodyOnly;
- const BOOL bFtn = !bBodyOnly && pCnt->IsInFtn();
+ const sal_Bool bBody = pCnt->IsInDocBody() || bBodyOnly;
+ const sal_Bool bFtn = !bBodyOnly && pCnt->IsInFtn();
Point aNew( rNew );
if ( bBody )
@@ -1096,7 +1096,7 @@ const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
//So gibt es kein Problem mit Spalten.
Point aTmp( aNew );
const SwCntntFrm *pTmp = pCnt->FindPageFrm()->
- GetCntntPos( aTmp, FALSE, TRUE, FALSE );
+ GetCntntPos( aTmp, sal_False, sal_True, sal_False );
if ( pTmp && pTmp->Frm().IsInside( aNew ) )
return pTmp;
}
@@ -1110,7 +1110,7 @@ const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
SwDistance nUp, nUpLst;
::lcl_CalcDownDist( nUp, aNew, pUpFrm );
SwDistance nDown = nUp;
- BOOL bNegAllowed = TRUE;//Einmal aus dem negativen Bereich heraus lassen.
+ sal_Bool bNegAllowed = sal_True;//Einmal aus dem negativen Bereich heraus lassen.
do
{
pUpLst = pUpFrm; nUpLst = nUp;
@@ -1138,7 +1138,7 @@ const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
nUp.nMain = LONG_MAX;
if ( nUp.nMain >= 0 && LONG_MAX != nUp.nMain )
{
- bNegAllowed = FALSE;
+ bNegAllowed = sal_False;
if ( nUpLst.nMain < 0 ) //nicht den falschen erwischen, wenn der Wert
//gerade von negativ auf positiv gekippt ist.
{ pUpLst = pUpFrm;
@@ -1336,7 +1336,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)GetFmt();
const SwFmtSurround& rSurround = pFmt->GetSurround();
- const BOOL bWrapThrough =
+ const sal_Bool bWrapThrough =
rSurround.GetSurround() == SURROUND_THROUGHT;
SwTwips nBaseOfstForFly = 0;
const SwFrm* pTmpFrm = pFrm ? pFrm : pCnt;
@@ -1425,7 +1425,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
if ( pOldPage != FindPageFrm() )
::Notify_Background( GetVirtDrawObj(), pOldPage, aOld, PREP_FLY_LEAVE,
- FALSE );
+ sal_False );
}
// OD 2004-08-12 #i32795# - Note: method no longer used in <flyincnt.cxx>
@@ -1438,9 +1438,9 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
// if( pFlow && pFlow->IsAnyJoinLocked() )
// return;
-// USHORT nCnt = 0;
+// sal_uInt16 nCnt = 0;
-// BOOL bContinue = FALSE;
+// sal_Bool bContinue = sal_False;
// do
// {
// if ( ++nCnt == 10 )
@@ -1449,7 +1449,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
// break;
// }
-// const BOOL bSetComplete = !pFrm->IsValid();
+// const sal_Bool bSetComplete = !pFrm->IsValid();
// const SwRect aOldFrm( pFrm->Frm() );
// const SwRect aOldPrt( pFrm->Prt() );
@@ -1480,7 +1480,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
// (((SwFlyFrm*)pUp)->IsFlyAtCntFrm() &&
// SwOszControl::IsInProgress( (const SwFlyFrm*)pUp )) )
// {
-// bContinue = FALSE;
+// bContinue = sal_False;
// }
// }
// } while ( bContinue );
@@ -1522,7 +1522,7 @@ void SwFlyAtCntFrm::MakeObjPos()
}
// OD 2004-03-24 #i26791# - validate position flag here.
- bValidPos = TRUE;
+ bValidPos = sal_True;
// --> OD 2004-10-22 #i35911# - no calculation of new position, if
// anchored object is marked that it clears its environment and its