diff options
Diffstat (limited to 'sw/source/core/frmedt')
-rw-r--r-- | sw/source/core/frmedt/fecopy.cxx | 176 | ||||
-rw-r--r-- | sw/source/core/frmedt/fedesc.cxx | 34 | ||||
-rw-r--r-- | sw/source/core/frmedt/fefly1.cxx | 30 | ||||
-rw-r--r-- | sw/source/core/frmedt/feflyole.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/frmedt/feshview.cxx | 286 | ||||
-rw-r--r-- | sw/source/core/frmedt/fetab.cxx | 312 | ||||
-rw-r--r-- | sw/source/core/frmedt/fews.cxx | 108 | ||||
-rw-r--r-- | sw/source/core/frmedt/tblsel.cxx | 372 |
8 files changed, 665 insertions, 665 deletions
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index 79a2b64433d9..e0ac3b203a56 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -100,11 +100,11 @@ using namespace ::com::sun::star; | |*************************************************************************/ -BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt ) +sal_Bool SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt ) { ASSERT( pClpDoc, "kein Clipboard-Dokument" ); - pClpDoc->DoUndo( FALSE ); // immer auf FALSE !! + pClpDoc->DoUndo( sal_False ); // immer auf sal_False !! // steht noch Inhalt im ClpDocument, dann muss dieser geloescht werden SwNodeIndex aSttIdx( pClpDoc->GetNodes().GetEndOfExtras(), 2 ); @@ -120,7 +120,7 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt ) } // stehen noch FlyFrames rum, loesche auch diese - for( USHORT n = 0; n < pClpDoc->GetSpzFrmFmts()->Count(); ++n ) + for( sal_uInt16 n = 0; n < pClpDoc->GetSpzFrmFmts()->Count(); ++n ) { SwFlyFrmFmt* pFly = (SwFlyFrmFmt*)(*pClpDoc->GetSpzFrmFmts())[n]; pClpDoc->DelLayoutFmt( pFly ); @@ -133,12 +133,12 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt ) if( pNewClpTxt ) { pTxtNd->InsertText( *pNewClpTxt, SwIndex( pTxtNd ) ); - return TRUE; // das wars. + return sal_True; // das wars. } pClpDoc->LockExpFlds(); pClpDoc->SetRedlineMode_intern( nsRedlineMode_t::REDLINE_DELETE_REDLINES ); - BOOL bRet; + sal_Bool bRet; // soll ein FlyFrame kopiert werden ? if( IsFrmSelected() ) @@ -167,7 +167,7 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt ) SwSpzFrmFmts& rSpzFrmFmts = *(SwSpzFrmFmts*)pClpDoc->GetSpzFrmFmts(); if( rSpzFrmFmts[ 0 ] != pFlyFmt ) { - USHORT nPos = rSpzFrmFmts.GetPos( pFlyFmt ); + sal_uInt16 nPos = rSpzFrmFmts.GetPos( pFlyFmt ); ASSERT( nPos != USHRT_MAX, "Fly steht nicht im Spz-Array" ); rSpzFrmFmts.Remove( nPos ); @@ -191,13 +191,13 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt ) pTxtNd->EraseText( rIdx, 1 ); } } - bRet = TRUE; + bRet = sal_True; } else if ( IsObjSelected() ) { SwPosition aPos( aSttIdx, SwIndex( pTxtNd, 0 )); const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); @@ -211,7 +211,7 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt ) aSet.Put( aAnchor ); SdrObject *const pNew = - pClpDoc->CloneSdrObj( *pObj, FALSE, TRUE ); + pClpDoc->CloneSdrObj( *pObj, sal_False, sal_True ); SwPaM aTemp(aPos); pClpDoc->Insert(aTemp, *pNew, &aSet, NULL); @@ -232,7 +232,7 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt ) pClpDoc->CopyLayoutFmt( *pFmt, aAnchor, true, true ); } } - bRet = TRUE; + bRet = sal_True; } else bRet = _CopySelToDoc( pClpDoc, 0 ); // kopiere die Selectionen @@ -261,17 +261,17 @@ const Point &lcl_FindBasePos( const SwFrm *pFrm, const Point &rPt ) return pFrm->Frm().Pos(); } -BOOL lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrm* pFly, +sal_Bool lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrm* pFly, const Point& rInsPt, SwFEShell& rDestShell, SwFmtAnchor& rAnchor, - Point& rNewPos, BOOL bCheckFlyRecur ) + Point& rNewPos, sal_Bool bCheckFlyRecur ) { - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; rAnchor.SetAnchor( &rPos ); - SwCntntFrm* pTmpFrm = rNd.GetCntntNode()->GetFrm( &rInsPt, 0, FALSE ); + SwCntntFrm* pTmpFrm = rNd.GetCntntNode()->GetFrm( &rInsPt, 0, sal_False ); SwFlyFrm *pTmpFly = pTmpFrm->FindFlyFrm(); if( pTmpFly && bCheckFlyRecur && pFly->IsUpperOf( *pTmpFly ) ) { - bRet = FALSE; + bRet = sal_False; } else if ( FLY_AT_FLY == rAnchor.GetAnchorId() ) { @@ -295,15 +295,15 @@ BOOL lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrm* pFly, return bRet; } -BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, - const Point& rInsPt, BOOL bIsMove, BOOL bSelectInsert ) +sal_Bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, + const Point& rInsPt, sal_Bool bIsMove, sal_Bool bSelectInsert ) { - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; //Die Liste muss kopiert werden, weil unten die neuen Objekte //selektiert werden. const SdrMarkList aMrkList( Imp()->GetDrawView()->GetMarkedObjectList() ); - ULONG nMarkCount = aMrkList.GetMarkCount(); + sal_uLong nMarkCount = aMrkList.GetMarkCount(); if( !pDestShell->Imp()->GetDrawView() ) // sollte mal eine erzeugt werden pDestShell->MakeDrawView(); @@ -317,7 +317,7 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, SwDoc* pDestDoc = pDestShell->GetDoc(); Size aSiz( rInsPt.X() - rSttPt.X(), rInsPt.Y() - rSttPt.Y() ); - for( USHORT i = 0; i < nMarkCount; ++i ) + for( sal_uInt16 i = 0; i < nMarkCount; ++i ) { SdrObject *pObj = aMrkList.GetMark( i )->GetMarkedSdrObj(); @@ -325,7 +325,7 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, SwFrmFmt *pFmt = pContact->GetFmt(); const SwFmtAnchor& rAnchor = pFmt->GetAnchor(); - BOOL bInsWithFmt = TRUE; + sal_Bool bInsWithFmt = sal_True; if( pDestDrwView->IsGroupEntered() ) { @@ -336,10 +336,10 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, { SdrObject* pNew = pDestDoc->CloneSdrObj( *pObj, bIsMove && - GetDoc() == pDestDoc, FALSE ); + GetDoc() == pDestDoc, sal_False ); pNew->NbcMove( aSiz ); pDestDrwView->InsertObjectAtView( pNew, *pDestPgView ); - bInsWithFmt = FALSE; + bInsWithFmt = sal_False; } } @@ -364,21 +364,21 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, GetLayout()->GetCrsrOfst( &aPos, aPt, &aState ); const SwNode *pNd; if( (pNd = &aPos.nNode.GetNode())->IsNoTxtNode() ) - bRet = FALSE; + bRet = sal_False; else bRet = ::lcl_SetAnchor( aPos, *pNd, 0, rInsPt, - *pDestShell, aAnchor, aNewAnch, FALSE ); + *pDestShell, aAnchor, aNewAnch, sal_False ); } else { SwPaM *pCrsr = pDestShell->GetCrsr(); if( pCrsr->GetNode()->IsNoTxtNode() ) - bRet = FALSE; + bRet = sal_False; else bRet = ::lcl_SetAnchor( *pCrsr->GetPoint(), *pCrsr->GetNode(), 0, rInsPt, *pDestShell, aAnchor, - aNewAnch, FALSE ); + aNewAnch, sal_False ); } } else if ( FLY_AT_PAGE == aAnchor.GetAnchorId() ) @@ -398,7 +398,7 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, SfxItemSet aSet( pDestDoc->GetAttrPool(),aFrmFmtSetRange); aSet.Put( aAnchor ); SdrObject* pNew = pDestDoc->CloneSdrObj( *pObj, bIsMove && - GetDoc() == pDestDoc, TRUE ); + GetDoc() == pDestDoc, sal_True ); pFmt = pDestDoc->Insert( *pDestShell->GetCrsr(), *pNew, &aSet, NULL ); } @@ -440,8 +440,8 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, const SdrMarkList aList( pSrcDrwView->GetMarkedObjectList() ); pSrcDrwView->UnmarkAll(); - ULONG nMrkCnt = aMrkList.GetMarkCount(); - USHORT i; + sal_uLong nMrkCnt = aMrkList.GetMarkCount(); + sal_uInt16 i; for ( i = 0; i < nMrkCnt; ++i ) { SdrObject *pObj = aMrkList.GetMark( i )->GetMarkedSdrObj(); @@ -462,10 +462,10 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, return bRet; } -BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, - const Point& rInsPt, BOOL bIsMove, BOOL bSelectInsert ) +sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, + const Point& rInsPt, sal_Bool bIsMove, sal_Bool bSelectInsert ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; ASSERT( pDestShell, "Copy ohne DestShell." ); ASSERT( this == pDestShell || !pDestShell->IsObjSelected(), @@ -477,10 +477,10 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, pDestShell->GetDoc()->LockExpFlds(); // Referenzen sollen verschoben werden. - BOOL bCopyIsMove = pDoc->IsCopyIsMove(); + sal_Bool bCopyIsMove = pDoc->IsCopyIsMove(); if( bIsMove ) // am Doc ein Flag setzen, damit in den TextNodes - pDoc->SetCopyIsMove( TRUE ); + pDoc->SetCopyIsMove( sal_True ); RedlineMode_t eOldRedlMode = pDestShell->GetDoc()->GetRedlineMode(); pDestShell->GetDoc()->SetRedlineMode_intern( (RedlineMode_t)(eOldRedlMode | nsRedlineMode_t::REDLINE_DELETE_REDLINES)); @@ -496,7 +496,7 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, SwFlyFrm* pFly = FindFlyFrm(); SwFrmFmt* pFlyFmt = pFly->GetFmt(); SwFmtAnchor aAnchor( pFlyFmt->GetAnchor() ); - bRet = TRUE; + bRet = sal_True; Point aNewAnch; if ((FLY_AT_PARA == aAnchor.GetAnchorId()) || @@ -515,25 +515,25 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, GetLayout()->GetCrsrOfst( &aPos, aPt, &aState ); const SwNode *pNd; if( (pNd = &aPos.nNode.GetNode())->IsNoTxtNode() ) - bRet = FALSE; + bRet = sal_False; else { //Nicht in sich selbst kopieren const SwNodeIndex *pTmp = pFlyFmt->GetCntnt().GetCntntIdx(); if ( aPos.nNode > *pTmp && aPos.nNode < pTmp->GetNode().EndOfSectionIndex() ) { - bRet = FALSE; + bRet = sal_False; } else bRet = ::lcl_SetAnchor( aPos, *pNd, pFly, rInsPt, - *pDestShell, aAnchor, aNewAnch, TRUE ); + *pDestShell, aAnchor, aNewAnch, sal_True ); } } else { const SwPaM *pCrsr = pDestShell->GetCrsr(); if( pCrsr->GetNode()->IsNoTxtNode() ) - bRet = FALSE; + bRet = sal_False; else bRet = ::lcl_SetAnchor( *pCrsr->GetPoint(), *pCrsr->GetNode(), pFly, rInsPt, *pDestShell, aAnchor, @@ -575,12 +575,12 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, // kopiert wird if( bSelectInsert ) { - SwFlyFrm* pFlyFrm = ((SwFlyFrmFmt*)pFlyFmt)->GetFrm( &aPt, FALSE ); + SwFlyFrm* pFlyFrm = ((SwFlyFrmFmt*)pFlyFmt)->GetFrm( &aPt, sal_False ); if( pFlyFrm ) { //JP 12.05.98: sollte das nicht im SelectFlyFrm stehen??? pDestShell->Imp()->GetDrawView()->UnmarkAll(); - pDestShell->SelectFlyFrm( *pFlyFrm, TRUE ); + pDestShell->SelectFlyFrm( *pFlyFrm, sal_True ); } } @@ -612,12 +612,12 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, Point aPt( rInsPt ); GetLayout()->GetCrsrOfst( pDstPos, aPt ); if( !pDstPos->nNode.GetNode().IsNoTxtNode() ) - bRet = TRUE; + bRet = sal_True; } else if( !pDestShell->GetCrsr()->GetNode()->IsNoTxtNode() ) { pDstPos = new SwPosition( *pDestShell->GetCrsr()->GetPoint() ); - bRet = TRUE; + bRet = sal_True; } if( bRet ) @@ -648,7 +648,7 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, } else { - bRet = TRUE; + bRet = sal_True; if( this == pDestShell ) { // gleiche Shell? Dann erfrage die Position an der @@ -659,7 +659,7 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, bRet = !aPos.nNode.GetNode().IsNoTxtNode(); } else if( pDestShell->GetCrsr()->GetNode()->IsNoTxtNode() ) - bRet = FALSE; + bRet = sal_False; if( bRet ) bRet = 0 != SwEditShell::Copy( pDestShell ); @@ -673,7 +673,7 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, { // alte Actions beenden; die Tabellen-Frames werden angelegt und // eine SSelection kann erzeugt werden - USHORT nActCnt; + sal_uInt16 nActCnt; for( nActCnt = 0; pDestShell->ActionPend(); ++nActCnt ) pDestShell->EndAllAction(); @@ -703,11 +703,11 @@ namespace { typedef std::pair< PaMPtr, PositionPtr > Insertion; } -BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) +sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames ) { SET_CURR_SHELL( this ); ASSERT( pClpDoc, "kein Clipboard-Dokument" ); - const USHORT nStartPageNumber = GetPhyPageNum(); + const sal_uInt16 nStartPageNumber = GetPhyPageNum(); // dann bis zum Ende vom Nodes Array SwNodeIndex aIdx( pClpDoc->GetNodes().GetEndOfExtras(), 2 ); SwPaM aCpyPam( aIdx ); //DocStart @@ -731,7 +731,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) aCpyPam.SetMark(); aCpyPam.Move( fnMoveForward, fnGoDoc ); - BOOL bRet = TRUE, bDelTbl = TRUE; + sal_Bool bRet = sal_True, bDelTbl = sal_True; StartAllAction(); GetDoc()->StartUndo( UNDO_INSGLOSSARY, NULL ); GetDoc()->LockExpFlds(); @@ -768,7 +768,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) SwPosition aStartPos( *pStartCursor->GetPoint() ); SwPosition aInsertPos( aStartPos ); // first insertion position bool bCompletePara = false; - USHORT nMove = 0; + sal_uInt16 nMove = 0; while( nCount ) { --nCount; @@ -786,7 +786,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) SwCursor aCrsr( aStartPos, 0, false); // Check if we find another insert position by moving // down the last given position - if( aCrsr.UpDown( FALSE, ++nMove, 0, 0 ) ) + if( aCrsr.UpDown( sal_False, ++nMove, 0, 0 ) ) aInsertPos = *aCrsr.GetPoint(); else // if there is no paragraph we have to create it bCompletePara = nCount > 0; @@ -854,7 +854,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) { SwPosition aDestPos( *PCURCRSR->GetPoint() ); - BOOL bParkTblCrsr = FALSE; + sal_Bool bParkTblCrsr = sal_False; const SwStartNode* pSttNd = PCURCRSR->GetNode()->FindTableBoxStartNode(); // TABLE IN TABLE: Tabelle in Tabelle kopieren @@ -864,7 +864,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) { GetTblSel( *this, aBoxes ); ParkTblCrsr(); - bParkTblCrsr = TRUE; + bParkTblCrsr = sal_True; } else if( !PCURCRSR->HasMark() && PCURCRSR->GetNext() == PCURCRSR && ( !pSrcNd->GetTable().IsTblComplex() || @@ -890,7 +890,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) } bRet = GetDoc()->InsCopyOfTbl( aDestPos, aBoxes, &pSrcNd->GetTable(), - FALSE, FALSE ); + sal_False, sal_False ); if( bParkTblCrsr ) GetCrsr(); @@ -917,9 +917,9 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) if( !Imp()->GetDrawView() ) MakeDrawView(); - for ( USHORT i = 0; i < pClpDoc->GetSpzFrmFmts()->Count(); ++i ) + for ( sal_uInt16 i = 0; i < pClpDoc->GetSpzFrmFmts()->Count(); ++i ) { - BOOL bInsWithFmt = TRUE; + sal_Bool bInsWithFmt = sal_True; const SwFrmFmt& rCpyFmt = *(*pClpDoc->GetSpzFrmFmts())[i]; if( Imp()->GetDrawView()->IsGroupEntered() && @@ -930,7 +930,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) if( pSdrObj ) { SdrObject* pNew = GetDoc()->CloneSdrObj( *pSdrObj, - FALSE, FALSE ); + sal_False, sal_False ); // Insert object sets any anchor position to 0. // Therefore we calculate the absolute position here @@ -965,7 +965,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) pNew->NbcSetAnchorPos( aGrpAnchor ); pNew->SetSnapRect( aSnapRect ); - bInsWithFmt = FALSE; + bInsWithFmt = sal_False; } } @@ -993,7 +993,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) { Point aPt; lcl_SetAnchor( *PCURCRSR->GetPoint(), *PCURCRSR->GetNode(), - 0, aPt, *this, aAnchor, aPt, FALSE ); + 0, aPt, *this, aAnchor, aPt, sal_False ); } SwFrmFmt * pNew = GetDoc()->CopyLayoutFmt( rCpyFmt, aAnchor, true, true ); @@ -1004,9 +1004,9 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) { const Point aPt( GetCrsrDocPos() ); SwFlyFrm* pFlyFrm = ((SwFlyFrmFmt*)pNew)-> - GetFrm( &aPt, FALSE ); + GetFrm( &aPt, sal_False ); if( pFlyFrm ) - SelectFlyFrm( *pFlyFrm, TRUE ); + SelectFlyFrm( *pFlyFrm, sal_True ); // immer nur den ersten Fly-Frame nehmen; die anderen // wurden ueber Fly in Fly ins ClipBoard kopiert ! break; @@ -1042,7 +1042,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) if( bDelTbl && IsTableMode() ) { SwEditShell::Delete(); - bDelTbl = FALSE; + bDelTbl = sal_False; } SwPosition& rInsPos = *PCURCRSR->GetPoint(); @@ -1090,9 +1090,9 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) if( !Imp()->GetDrawView() ) MakeDrawView(); - for ( USHORT i = 0; i < pClpDoc->GetSpzFrmFmts()->Count(); ++i ) + for ( sal_uInt16 i = 0; i < pClpDoc->GetSpzFrmFmts()->Count(); ++i ) { - BOOL bInsWithFmt = TRUE; + sal_Bool bInsWithFmt = sal_True; const SwFrmFmt& rCpyFmt = *(*pClpDoc->GetSpzFrmFmts())[i]; if( bInsWithFmt ) { @@ -1119,7 +1119,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) { // alte Actions beenden; die Tabellen-Frames werden angelegt und // eine Selection kann erzeugt werden - USHORT nActCnt; + sal_uInt16 nActCnt; for( nActCnt = 0; ActionPend(); ++nActCnt ) EndAllAction(); @@ -1136,25 +1136,25 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames ) /*-- 14.06.2004 13:31:17--------------------------------------------------- -----------------------------------------------------------------------*/ -BOOL SwFEShell::PastePages( SwFEShell& rToFill, USHORT nStartPage, USHORT nEndPage) +sal_Bool SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt16 nEndPage) { Push(); if(!GotoPage(nStartPage)) { Pop(sal_False); - return FALSE; + return sal_False; } MovePage( fnPageCurr, fnPageStart ); SwPaM aCpyPam( *GetCrsr()->GetPoint() ); String sStartingPageDesc = GetPageDesc( GetCurPageDesc()).GetName(); - SwPageDesc* pDesc = rToFill.FindPageDescByName( sStartingPageDesc, TRUE ); + SwPageDesc* pDesc = rToFill.FindPageDescByName( sStartingPageDesc, sal_True ); if( pDesc ) rToFill.ChgCurPageDesc( *pDesc ); if(!GotoPage(nEndPage)) { Pop(sal_False); - return FALSE; + return sal_False; } //if the page starts with a table a paragraph has to be inserted before SwNode* pTableNode = aCpyPam.GetNode()->FindTableNode(); @@ -1201,7 +1201,7 @@ BOOL SwFEShell::PastePages( SwFEShell& rToFill, USHORT nStartPage, USHORT nEndPa if( !rToFill.Imp()->GetDrawView() ) rToFill.MakeDrawView(); - for ( USHORT i = 0; i < GetDoc()->GetSpzFrmFmts()->Count(); ++i ) + for ( sal_uInt16 i = 0; i < GetDoc()->GetSpzFrmFmts()->Count(); ++i ) { const SwFrmFmt& rCpyFmt = *(*GetDoc()->GetSpzFrmFmts())[i]; SwFmtAnchor aAnchor( rCpyFmt.GetAnchor() ); @@ -1220,14 +1220,14 @@ BOOL SwFEShell::PastePages( SwFEShell& rToFill, USHORT nStartPage, USHORT nEndPa Pop(sal_False); EndAllAction(); - return TRUE; + return sal_True; } -BOOL SwFEShell::GetDrawObjGraphic( ULONG nFmt, Graphic& rGrf ) const +sal_Bool SwFEShell::GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const { ASSERT( Imp()->HasDrawView(), "GetDrawObjGraphic without DrawView?" ); const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - BOOL bConvert = TRUE; + sal_Bool bConvert = sal_True; if( rMrkList.GetMarkCount() ) { if( rMrkList.GetMarkCount() == 1 && @@ -1246,7 +1246,7 @@ BOOL SwFEShell::GetDrawObjGraphic( ULONG nFmt, Graphic& rGrf ) const if( GRAPHIC_BITMAP != aGrf.GetType() ) { rGrf = aGrf; - bConvert = FALSE; + bConvert = sal_False; } else if( GetWin() ) { @@ -1255,7 +1255,7 @@ BOOL SwFEShell::GetDrawObjGraphic( ULONG nFmt, Graphic& rGrf ) const GetGrfSize( aSz ); VirtualDevice aVirtDev; - aVirtDev.EnableOutput( FALSE ); + aVirtDev.EnableOutput( sal_False ); MapMode aTmp( GetWin()->GetMapMode() ); aTmp.SetOrigin( aPt ); @@ -1273,7 +1273,7 @@ BOOL SwFEShell::GetDrawObjGraphic( ULONG nFmt, Graphic& rGrf ) const else if( GRAPHIC_BITMAP == aGrf.GetType() ) { rGrf = aGrf; - bConvert = FALSE; + bConvert = sal_False; } else { @@ -1293,7 +1293,7 @@ BOOL SwFEShell::GetDrawObjGraphic( ULONG nFmt, Graphic& rGrf ) const else { rGrf = aGrf; - bConvert = FALSE; + bConvert = sal_False; } } } @@ -1347,7 +1347,7 @@ void lcl_ConvertSdrOle2ObjsToSdrGrafObjs( SdrModel* _pModel ) } } // <-- -void SwFEShell::Paste( SvStream& rStrm, USHORT nAction, const Point* pPt ) +void SwFEShell::Paste( SvStream& rStrm, sal_uInt16 nAction, const Point* pPt ) { SET_CURR_SHELL( this ); StartAllAction(); @@ -1462,7 +1462,7 @@ void SwFEShell::Paste( SvStream& rStrm, USHORT nAction, const Point* pPt ) pFmt = GetDoc()->Insert( *GetCrsr(), *pNewObj, &aFrmSet, NULL ); } else - pView->ReplaceObjectAtView( pOldObj, *Imp()->GetPageView(), pNewObj, TRUE ); + pView->ReplaceObjectAtView( pOldObj, *Imp()->GetPageView(), pNewObj, sal_True ); } break; @@ -1470,7 +1470,7 @@ void SwFEShell::Paste( SvStream& rStrm, USHORT nAction, const Point* pPt ) { SfxItemSet aSet( GetAttrPool() ); aSet.Put(pClpObj->GetMergedItemSet()); - pView->SetAttributes( aSet, FALSE ); + pView->SetAttributes( aSet, sal_False ); } break; @@ -1484,7 +1484,7 @@ void SwFEShell::Paste( SvStream& rStrm, USHORT nAction, const Point* pPt ) if( SW_PASTESDR_INSERT == nAction ) { - GetDoc()->SetNoDrawUndoObj( TRUE ); + GetDoc()->SetNoDrawUndoObj( sal_True ); sal_Bool bDesignMode = pView->IsDesignMode(); if( !bDesignMode ) @@ -1497,11 +1497,11 @@ void SwFEShell::Paste( SvStream& rStrm, USHORT nAction, const Point* pPt ) // <-- pView->Paste( *pModel, aPos ); - ULONG nCnt = pView->GetMarkedObjectList().GetMarkCount(); + sal_uLong nCnt = pView->GetMarkedObjectList().GetMarkCount(); if( nCnt ) { const Point aNull( 0, 0 ); - for( ULONG i=0; i < nCnt; ++i ) + for( sal_uLong i=0; i < nCnt; ++i ) { SdrObject *pObj = pView->GetMarkedObjectList().GetMark(i)->GetMarkedSdrObj(); pObj->ImpSetAnchorPos( aNull ); @@ -1525,20 +1525,20 @@ void SwFEShell::Paste( SvStream& rStrm, USHORT nAction, const Point* pPt ) if( !bDesignMode ) pView->SetDesignMode( sal_False ); } - GetDoc()->SetNoDrawUndoObj( FALSE ); + GetDoc()->SetNoDrawUndoObj( sal_False ); } EndUndo(); EndAllAction(); delete pModel; } -BOOL SwFEShell::Paste( const Graphic &rGrf ) +sal_Bool SwFEShell::Paste( const Graphic &rGrf ) { SET_CURR_SHELL( this ); SdrObject* pObj; SdrView *pView = Imp()->GetDrawView(); - BOOL bRet = 1 == pView->GetMarkedObjectList().GetMarkCount() && + sal_Bool bRet = 1 == pView->GetMarkedObjectList().GetMarkCount() && (pObj = pView->GetMarkedObjectList().GetMark( 0 )->GetMarkedSdrObj())->IsClosedObj() && !pObj->ISA( SdrOle2Obj ); @@ -1548,7 +1548,7 @@ BOOL SwFEShell::Paste( const Graphic &rGrf ) SfxItemSet aSet( GetAttrPool(), XATTR_FILLSTYLE, XATTR_FILLBITMAP ); aSet.Put( XFillStyleItem( XFILL_BITMAP )); aSet.Put( XFillBitmapItem( aEmptyStr, aXOBitmap )); - pView->SetAttributes( aSet, FALSE ); + pView->SetAttributes( aSet, sal_False ); } return bRet; } diff --git a/sw/source/core/frmedt/fedesc.cxx b/sw/source/core/frmedt/fedesc.cxx index fe73c36016a0..e2b322212224 100644 --- a/sw/source/core/frmedt/fedesc.cxx +++ b/sw/source/core/frmedt/fedesc.cxx @@ -51,7 +51,7 @@ |* |*************************************************************************/ -USHORT SwFEShell::GetPageDescCnt() const +sal_uInt16 SwFEShell::GetPageDescCnt() const { return GetDoc()->GetPageDescCnt(); } @@ -70,10 +70,10 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc ) #ifdef DBG_UTIL //Die SS veraendert keinen PageDesc, sondern setzt nur das Attribut. //Der Pagedesc muss im Dokument vorhanden sein! - BOOL bFound = FALSE; - for ( USHORT nTst = 0; nTst < GetPageDescCnt(); ++nTst ) + sal_Bool bFound = sal_False; + for ( sal_uInt16 nTst = 0; nTst < GetPageDescCnt(); ++nTst ) if ( &rDesc == &GetPageDesc( nTst ) ) - bFound = TRUE; + bFound = sal_True; ASSERT( bFound, "ChgCurPageDesc mit ungueltigem Descriptor." ); #endif @@ -81,7 +81,7 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc ) SwPageFrm *pPage = GetCurrFrm()->FindPageFrm(); const SwFrm *pFlow = 0; - USHORT nPageNmOffset = 0; + sal_uInt16 nPageNmOffset = 0; ASSERT( !GetCrsr()->HasMark(), "ChgCurPageDesc nur ohne Selektion!"); @@ -138,7 +138,7 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc ) |* |*************************************************************************/ -void SwFEShell::ChgPageDesc( USHORT i, const SwPageDesc &rChged ) +void SwFEShell::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged ) { StartAllAction(); SET_CURR_SHELL( this ); @@ -162,19 +162,19 @@ void SwFEShell::ChgPageDesc( USHORT i, const SwPageDesc &rChged ) | |*************************************************************************/ -const SwPageDesc& SwFEShell::GetPageDesc( USHORT i ) const +const SwPageDesc& SwFEShell::GetPageDesc( sal_uInt16 i ) const { return const_cast<const SwDoc *>(GetDoc())->GetPageDesc( i ); } SwPageDesc* SwFEShell::FindPageDescByName( const String& rName, - BOOL bGetFromPool, - USHORT* pPos ) + sal_Bool bGetFromPool, + sal_uInt16* pPos ) { SwPageDesc* pDesc = GetDoc()->FindPageDescByName( rName, pPos ); if( !pDesc && bGetFromPool ) { - USHORT nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC ); + sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC ); if( USHRT_MAX != nPoolId && 0 != (pDesc = GetDoc()->GetPageDescFromPool( nPoolId )) && pPos ) @@ -184,7 +184,7 @@ SwPageDesc* SwFEShell::FindPageDescByName( const String& rName, return pDesc; } -USHORT SwFEShell::GetMousePageDesc( const Point &rPt ) const +sal_uInt16 SwFEShell::GetMousePageDesc( const Point &rPt ) const { if( GetLayout() ) { @@ -195,7 +195,7 @@ USHORT SwFEShell::GetMousePageDesc( const Point &rPt ) const while( pPage->GetNext() && rPt.Y() > pPage->Frm().Bottom() ) pPage = static_cast<const SwPageFrm*>( pPage->GetNext() ); SwDoc *pMyDoc = GetDoc(); - for ( USHORT i = 0; i < GetDoc()->GetPageDescCnt(); ++i ) + for ( sal_uInt16 i = 0; i < GetDoc()->GetPageDescCnt(); ++i ) { if ( pPage->GetPageDesc() == &const_cast<const SwDoc *>(pMyDoc) ->GetPageDesc(i) ) @@ -206,7 +206,7 @@ USHORT SwFEShell::GetMousePageDesc( const Point &rPt ) const return 0; } -USHORT SwFEShell::GetCurPageDesc( const BOOL bCalcFrm ) const +sal_uInt16 SwFEShell::GetCurPageDesc( const sal_Bool bCalcFrm ) const { const SwFrm *pFrm = GetCurrFrm( bCalcFrm ); if ( pFrm ) @@ -215,7 +215,7 @@ USHORT SwFEShell::GetCurPageDesc( const BOOL bCalcFrm ) const if ( pPage ) { SwDoc *pMyDoc = GetDoc(); - for ( USHORT i = 0; i < GetDoc()->GetPageDescCnt(); ++i ) + for ( sal_uInt16 i = 0; i < GetDoc()->GetPageDescCnt(); ++i ) { if ( pPage->GetPageDesc() == &const_cast<const SwDoc *>(pMyDoc) ->GetPageDesc(i) ) @@ -238,14 +238,14 @@ const SwPageDesc* SwFEShell::GetSelectedPageDescs() const FOREACHPAM_START(this) if( 0 != (pCNd = PCURCRSR->GetCntntNode() ) && - 0 != ( pPtFrm = pCNd->GetFrm( &aNulPt, 0, FALSE )) ) + 0 != ( pPtFrm = pCNd->GetFrm( &aNulPt, 0, sal_False )) ) pPtFrm = pPtFrm->FindPageFrm(); else pPtFrm = 0; if( PCURCRSR->HasMark() && - 0 != (pCNd = PCURCRSR->GetCntntNode( FALSE ) ) && - 0 != ( pMkFrm = pCNd->GetFrm( &aNulPt, 0, FALSE )) ) + 0 != (pCNd = PCURCRSR->GetCntntNode( sal_False ) ) && + 0 != ( pMkFrm = pCNd->GetFrm( &aNulPt, 0, sal_False )) ) pMkFrm = pMkFrm->FindPageFrm(); else pMkFrm = pPtFrm; diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index e4d4f2e9b399..145f0e5d93dd 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -123,10 +123,10 @@ sal_Bool lcl_SetNewFlyPos( const SwNode& rNode, SwFmtAnchor& rAnchor, return bRet; } -BOOL lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm, +sal_Bool lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm, SfxItemSet& rSet ) { - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; SwFmtAnchor aNewAnch( (SwFmtAnchor&)rSet.Get( RES_ANCHOR ) ); RndStdIds nNew = aNewAnch.GetAnchorId(); const SwFrm *pNewAnch; @@ -146,7 +146,7 @@ BOOL lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm, pNewAnch = ::FindAnchor( pFrm, aTmpPnt ); if( pNewAnch->IsProtected() ) { - bRet = FALSE; + bRet = sal_False; break; } @@ -491,7 +491,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt ) SwPosition aPos( GetDoc()->GetNodes().GetEndOfExtras() ); Point aTmpPnt( rAbsPos ); GetLayout()->GetCrsrOfst( &aPos, aTmpPnt, &aState ); - pTxtFrm = aPos.nNode.GetNode().GetCntntNode()->GetFrm(0,&aPos,FALSE ); + pTxtFrm = aPos.nNode.GetNode().GetCntntNode()->GetFrm(0,&aPos,sal_False ); } const SwFrm *pNewAnch; if( pTxtFrm ) @@ -617,7 +617,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt ) //TODO: That doesn't seem to be intended if( Color(COL_TRANSPARENT) != GetOut()->GetLineColor() ) { - ASSERT( FALSE, "Hey, Joe: Where's my Null Pen?" ); + ASSERT( sal_False, "Hey, Joe: Where's my Null Pen?" ); GetOut()->SetLineColor( Color(COL_TRANSPARENT) ); } #endif @@ -787,7 +787,7 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali /* #109161# If called from a shell try to propagate an existing adjust item from rPos to the content node of the new frame. */ - pRet = GetDoc()->MakeFlySection( eRndId, &rPos, &rSet, pParent, TRUE ); + pRet = GetDoc()->MakeFlySection( eRndId, &rPos, &rSet, pParent, sal_True ); if( pRet ) { @@ -1458,7 +1458,7 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < { // search for a sequence field: const SfxPoolItem* pItem; - for( USHORT n = 0, nEnd = pHts->Count(); n < nEnd; ++n ) + for( sal_uInt16 n = 0, nEnd = pHts->Count(); n < nEnd; ++n ) if( RES_TXTATR_FIELD == ( pItem = &(*pHts)[ n ]->GetAttr())->Which() && TYP_SEQFLD == ((SwFmtFld*)pItem)->GetFld()->GetTypeId() ) @@ -1640,8 +1640,8 @@ const SwFrmFmt* SwFEShell::IsURLGrfAtPos( const Point& rPt, String* pURL, const SwFmtURL &rURL = pFly->GetFmt()->GetURL(); if( rURL.GetURL().Len() || rURL.GetMap() ) { - BOOL bSetTargetFrameName = pTargetFrameName != 0; - BOOL bSetDescription = pDescription != 0; + sal_Bool bSetTargetFrameName = pTargetFrameName != 0; + sal_Bool bSetDescription = pDescription != 0; if ( rURL.GetMap() ) { IMapObject *pObject = pFly->GetFmt()->GetIMapObject( rPt, pFly ); @@ -1968,13 +1968,13 @@ sal_Bool SwFEShell::ReplaceSdrObj( const String& rGrfName, const String& rFltNam return bRet; } -static USHORT SwFmtGetPageNum(const SwFlyFrmFmt * pFmt) +static sal_uInt16 SwFmtGetPageNum(const SwFlyFrmFmt * pFmt) { ASSERT(pFmt != NULL, "invalid argument"); SwFlyFrm * pFrm = pFmt->GetFrm(); - USHORT aResult; + sal_uInt16 aResult; if (pFrm != NULL) aResult = pFrm->GetPhyPageNum(); @@ -1988,7 +1988,7 @@ static USHORT SwFmtGetPageNum(const SwFlyFrmFmt * pFmt) void SwFEShell::GetConnectableFrmFmts(SwFrmFmt & rFmt, const String & rReference, - BOOL bSuccessors, + sal_Bool bSuccessors, ::std::vector< String > & aPrevPageVec, ::std::vector< String > & aThisPageVec, ::std::vector< String > & aNextPageVec, @@ -2048,7 +2048,7 @@ void SwFEShell::GetConnectableFrmFmts(SwFrmFmt & rFmt, aRestVec.clear(); /* number of page rFmt resides on */ - USHORT nPageNum = SwFmtGetPageNum((SwFlyFrmFmt *) &rFmt); + sal_uInt16 nPageNum = SwFmtGetPageNum((SwFlyFrmFmt *) &rFmt); ::std::vector< const SwFrmFmt * >::const_iterator aIt; @@ -2060,7 +2060,7 @@ void SwFEShell::GetConnectableFrmFmts(SwFrmFmt & rFmt, itself */ if (aString != rReference && aString != rFmt.GetName()) { - USHORT nNum1 = + sal_uInt16 nNum1 = SwFmtGetPageNum((SwFlyFrmFmt *) *aIt); if (nNum1 == nPageNum -1) @@ -2213,7 +2213,7 @@ void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedO } catch ( uno::Exception& ) { - ASSERT( FALSE , "Baseline could not be retrieved from Starmath!" ); + ASSERT( sal_False , "Baseline could not be retrieved from Starmath!" ); } } } diff --git a/sw/source/core/frmedt/feflyole.cxx b/sw/source/core/frmedt/feflyole.cxx index 070a031e83d3..96373fffb57b 100644 --- a/sw/source/core/frmedt/feflyole.cxx +++ b/sw/source/core/frmedt/feflyole.cxx @@ -68,9 +68,9 @@ SwFlyFrm *SwFEShell::FindFlyFrm( const uno::Reference < embed::XEmbeddedObject > if ( !pFly ) { //Kein Fly oder der falsche selektiert. Ergo muessen wir leider suchen. - BOOL bExist = FALSE; + sal_Bool bExist = sal_False; SwStartNode *pStNd; - ULONG nSttIdx = GetNodes().GetEndOfAutotext().StartOfSectionIndex() + 1, + sal_uLong nSttIdx = GetNodes().GetEndOfAutotext().StartOfSectionIndex() + 1, nEndIdx = GetNodes().GetEndOfAutotext().GetIndex(); while( nSttIdx < nEndIdx && 0 != (pStNd = GetNodes()[ nSttIdx ]->GetStartNode()) ) @@ -79,7 +79,7 @@ SwFlyFrm *SwFEShell::FindFlyFrm( const uno::Reference < embed::XEmbeddedObject > if ( pNd->IsOLENode() && ((SwOLENode*)pNd)->GetOLEObj().GetOleRef() == xObj ) { - bExist = TRUE; + bExist = sal_True; SwFrm *pFrm = ((SwOLENode*)pNd)->GetFrm(); if ( pFrm ) pFly = pFrm->FindFlyFrm(); @@ -122,13 +122,13 @@ void SwFEShell::MakeObjVisible( const uno::Reference < embed::XEmbeddedObject >& } } -BOOL SwFEShell::FinishOLEObj() // Server wird beendet +sal_Bool SwFEShell::FinishOLEObj() // Server wird beendet { SfxInPlaceClient* pIPClient = GetSfxViewShell()->GetIPClient(); if ( !pIPClient ) - return FALSE; + return sal_False; - BOOL bRet = pIPClient->IsObjectInPlaceActive(); + sal_Bool bRet = pIPClient->IsObjectInPlaceActive(); if( bRet ) { uno::Reference < embed::XEmbeddedObject > xObj = pIPClient->GetObject(); diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 0f8a61134595..eb2f5062b773 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -98,7 +98,7 @@ using namespace com::sun::star; //Tattergrenze fuer Drawing-SS -#define MINMOVE ((USHORT)GetOut()->PixelToLogic(Size(Imp()->GetDrawView()->GetMarkHdlSizePixel()/2,0)).Width()) +#define MINMOVE ((sal_uInt16)GetOut()->PixelToLogic(Size(Imp()->GetDrawView()->GetMarkHdlSizePixel()/2,0)).Width()) SwFlyFrm *GetFlyFromMarked( const SdrMarkList *pLst, ViewShell *pSh ) { @@ -122,12 +122,12 @@ void lcl_GrabCursor( SwFEShell* pSh, SwFlyFrm* pOldSelFly) { // dann das evt. gesetzte Macro rufen pSh->GetFlyMacroLnk().Call( (void*)pFlyFmt ); -extern BOOL bNoInterrupt; // in swapp.cxx +extern sal_Bool bNoInterrupt; // in swapp.cxx // wir in dem Makro ein Dialog gestartet, dann kommt das // MouseButtonUp zu diesem und nicht zu uns. Dadurch ist // Flag bei uns immer gesetzt und schaltet nie die auf die // entsp. Shell um !!!!!!! - bNoInterrupt = FALSE; + bNoInterrupt = sal_False; } else if( !pFlyFmt || RES_DRAWFRMFMT == pFlyFmt->Which() ) { @@ -136,7 +136,7 @@ extern BOOL bNoInterrupt; // in swapp.cxx pSh->KillPams(); pSh->ClearMark(); // <-- - pSh->SetCrsr( pSh->Imp()->GetDrawView()->GetAllMarkedRect().TopLeft(), TRUE); + pSh->SetCrsr( pSh->Imp()->GetDrawView()->GetAllMarkedRect().TopLeft(), sal_True); } } @@ -149,7 +149,7 @@ extern BOOL bNoInterrupt; // in swapp.cxx |* *************************************************************************/ -BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj ) +sal_Bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj ) { SwDrawView *pDView = Imp()->GetDrawView(); if(!pDView) @@ -160,16 +160,16 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj ) //durchkommen const SdrMarkList &rMrkList = pDView->GetMarkedObjectList(); - const BOOL bHadSelection = rMrkList.GetMarkCount() ? TRUE : FALSE; - const BOOL bAddSelect = 0 != (SW_ADD_SELECT & nFlag); - const BOOL bEnterGroup = 0 != (SW_ENTER_GROUP & nFlag); + const sal_Bool bHadSelection = rMrkList.GetMarkCount() ? sal_True : sal_False; + const sal_Bool bAddSelect = 0 != (SW_ADD_SELECT & nFlag); + const sal_Bool bEnterGroup = 0 != (SW_ENTER_GROUP & nFlag); SwFlyFrm* pOldSelFly = 0; const Point aOldPos( pDView->GetAllMarkedRect().TopLeft() ); if( bHadSelection ) { //Unmark rufen wenn !bAddSelect oder wenn ein Fly selektiert ist. - BOOL bUnmark = !bAddSelect; + sal_Bool bUnmark = !bAddSelect; if ( rMrkList.GetMarkCount() == 1 ) { @@ -177,7 +177,7 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj ) pOldSelFly = ::GetFlyFromMarked( &rMrkList, this ); if ( pOldSelFly ) { - const USHORT nType = GetCntType(); + const sal_uInt16 nType = GetCntType(); if( nType != CNT_TXT || (SW_LEAVE_FRAME & nFlag) || ( pOldSelFly->GetFmt()->GetProtect().IsCntntProtected() && !IsReadOnlyAvailable() )) @@ -189,18 +189,18 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj ) //linke obere Ecke gesetzt. Point aPt( pOldSelFly->Frm().Pos() ); aPt.X() -= 1; - BOOL bUnLockView = !IsViewLocked(); - LockView( TRUE ); - SetCrsr( aPt, TRUE ); + sal_Bool bUnLockView = !IsViewLocked(); + LockView( sal_True ); + SetCrsr( aPt, sal_True ); if( bUnLockView ) - LockView( FALSE ); + LockView( sal_False ); } if ( nType & CNT_GRF && ((SwNoTxtFrm*)pOldSelFly->Lower())->HasAnimation() ) { GetWin()->Invalidate( pOldSelFly->Frm().SVRect() ); } - bUnmark = TRUE; + bUnmark = sal_True; } } if ( bUnmark ) @@ -222,16 +222,16 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj ) pDView->MarkObj( rPt, MINMOVE, bAddSelect, bEnterGroup ); } - const BOOL bRet = 0 != rMrkList.GetMarkCount(); + const sal_Bool bRet = 0 != rMrkList.GetMarkCount(); if ( rMrkList.GetMarkCount() > 1 ) { //Ganz dumm ist es, wenn Zeichenobjekte Selektiert waren und //nun ein Fly hinzuselektiert wird. - for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject *pTmpObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); - BOOL bForget = pTmpObj->ISA(SwVirtFlyDrawObj); + sal_Bool bForget = pTmpObj->ISA(SwVirtFlyDrawObj); if( bForget ) { pDView->UnmarkAll(); @@ -253,7 +253,7 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj ) } } else if ( !pOldSelFly && bHadSelection ) - SetCrsr( aOldPos, TRUE); + SetCrsr( aOldPos, sal_True); if( bRet || !bHadSelection ) CallChgLnk(); @@ -267,7 +267,7 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj ) /************************************************************************* |* -|* sal_Bool SwFEShell::MoveAnchor( USHORT nDir ) +|* sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir ) |* |* Created AMA 05/28/2002 |* Last modify AMA 05/30/2002 @@ -294,7 +294,7 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj ) ( aPt1.Y() == aPt2.Y() && ( aPt1.X() < aPt2.X() || \ ( aPt1.X() == aPt2.X() && bOld ) ) ) ) -sal_Bool SwFEShell::MoveAnchor( USHORT nDir ) +sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir ) { const SdrMarkList* pMrkList; if( !Imp()->GetDrawView() || @@ -429,7 +429,7 @@ sal_Bool SwFEShell::MoveAnchor( USHORT nDir ) Point aCenter( pOld->Frm().Left() + pOld->Frm().Width()/2, pOld->Frm().Top() + pOld->Frm().Height()/2 ); Point aBest; - for( i = 0; (USHORT)i<pPage->GetSortedObjs()->Count(); ++i ) + for( i = 0; (sal_uInt16)i<pPage->GetSortedObjs()->Count(); ++i ) { SwAnchoredObject* pAnchObj = (*pPage->GetSortedObjs())[i]; @@ -556,9 +556,9 @@ const SdrMarkList* SwFEShell::_GetMarkList() const return pMarkList; } -USHORT SwFEShell::GetSelFrmType() const +sal_uInt16 SwFEShell::GetSelFrmType() const { - USHORT eType; + sal_uInt16 eType; // get marked frame list, and check if anything is selected const SdrMarkList* pMarkList = _GetMarkList(); @@ -636,7 +636,7 @@ void SwFEShell::ScrollTo( const Point &rPt ) |* *************************************************************************/ -void SwFEShell::SetDragMode( UINT16 eDragMode ) +void SwFEShell::SetDragMode( sal_uInt16 eDragMode ) { if ( Imp()->HasDrawView() ) Imp()->GetDrawView()->SetDragMode( (SdrDragMode)eDragMode ); @@ -651,7 +651,7 @@ void SwFEShell::SetDragMode( UINT16 eDragMode ) |* *************************************************************************/ -long SwFEShell::BeginDrag( const Point* pPt, BOOL ) +long SwFEShell::BeginDrag( const Point* pPt, sal_Bool ) { SdrView *pView = Imp()->GetDrawView(); if ( pView && pView->AreObjectsMarked() ) @@ -673,7 +673,7 @@ long SwFEShell::BeginDrag( const Point* pPt, BOOL ) |* *************************************************************************/ -long SwFEShell::Drag( const Point *pPt, BOOL ) +long SwFEShell::Drag( const Point *pPt, sal_Bool ) { ASSERT( Imp()->HasDrawView(), "Drag without DrawView?" ); if ( Imp()->GetDrawView()->IsDragObj() ) @@ -696,7 +696,7 @@ long SwFEShell::Drag( const Point *pPt, BOOL ) |* *************************************************************************/ -long SwFEShell::EndDrag( const Point *, BOOL ) +long SwFEShell::EndDrag( const Point *, sal_Bool ) { ASSERT( Imp()->HasDrawView(), "EndDrag without DrawView?" ); SdrView *pView = Imp()->GetDrawView(); @@ -722,8 +722,8 @@ long SwFEShell::EndDrag( const Point *, BOOL ) pView->EndDragObj(); // JP 18.08.95: DrawUndo-Action auf FlyFrames werden nicht gespeichert // Die Fly aendern das Flag - GetDoc()->SetNoDrawUndoObj( FALSE ); - ChgAnchor( 0, TRUE ); + GetDoc()->SetNoDrawUndoObj( sal_False ); + ChgAnchor( 0, sal_True ); EndUndo( UNDO_END ); @@ -825,10 +825,10 @@ void lcl_NotifyNeighbours( const SdrMarkList *pLst ) //3. Rahmen die dem Rahmen ausweichen bzw. wichen muessen benachrichtigt werden. //4. Auch Zeichenobjekte koennen Rahmen verdraengen - for( USHORT j = 0; j < pLst->GetMarkCount(); ++j ) + for( sal_uInt16 j = 0; j < pLst->GetMarkCount(); ++j ) { SwPageFrm *pPage; - BOOL bCheckNeighbours = FALSE; + sal_Bool bCheckNeighbours = sal_False; sal_Int16 aHori = text::HoriOrientation::NONE; SwRect aRect; SdrObject *pO = pLst->GetMark( 0 )->GetMarkedSdrObj(); @@ -841,7 +841,7 @@ void lcl_NotifyNeighbours( const SdrMarkList *pLst ) if( text::HoriOrientation::NONE != aHori && text::HoriOrientation::CENTER != aHori && pFly->IsFlyAtCntFrm() ) { - bCheckNeighbours = TRUE; + bCheckNeighbours = sal_True; pFly->InvalidatePos(); pFly->Frm().Pos().Y() += 1; } @@ -897,7 +897,7 @@ void lcl_NotifyNeighbours( const SdrMarkList *pLst ) } } -void SwFEShell::SelectionToTop( BOOL bTop ) +void SwFEShell::SelectionToTop( sal_Bool bTop ) { ASSERT( Imp()->HasDrawView(), "SelectionToTop without DrawView?" ); const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); @@ -917,7 +917,7 @@ void SwFEShell::SelectionToTop( BOOL bTop ) EndAllAction(); } -void SwFEShell::SelectionToBottom( BOOL bBottom ) +void SwFEShell::SelectionToBottom( sal_Bool bBottom ) { ASSERT( Imp()->HasDrawView(), "SelectionToBottom without DrawView?" ); const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); @@ -954,7 +954,7 @@ short SwFEShell::GetLayerId() const if ( Imp()->HasDrawView() ) { const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) { const SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); if ( nRet == SHRT_MAX ) @@ -991,7 +991,7 @@ void SwFEShell::ChangeOpaque( SdrLayerID nLayerId ) const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); const IDocumentDrawModelAccess* pIDDMA = getIDocumentDrawModelAccess(); // OD 25.06.2003 #108784# - correct type of <nControls> - for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject* pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); // OD 21.08.2003 #i18447# - no change of layer for controls @@ -1040,18 +1040,18 @@ void SwFEShell::SelectionToHell() |* *************************************************************************/ -USHORT SwFEShell::IsObjSelected() const +sal_uInt16 SwFEShell::IsObjSelected() const { if ( IsFrmSelected() || !Imp()->HasDrawView() ) return 0; else - return USHORT( Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() ); + return sal_uInt16( Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() ); } -BOOL SwFEShell::IsFrmSelected() const +sal_Bool SwFEShell::IsFrmSelected() const { if ( !Imp()->HasDrawView() ) - return FALSE; + return sal_False; else return 0 != ::GetFlyFromMarked( &Imp()->GetDrawView()->GetMarkedObjectList(), (ViewShell*)this ); @@ -1112,7 +1112,7 @@ void SwFEShell::EndTextEdit() DelSelectedObj(); if ( aSave.GetMarkCount() ) { - for ( USHORT i = 0; i < aSave.GetMarkCount(); ++i ) + for ( sal_uInt16 i = 0; i < aSave.GetMarkCount(); ++i ) pView->MarkObj( aSave.GetMark( i )->GetMarkedSdrObj(), Imp()->GetPageView() ); } @@ -1174,7 +1174,7 @@ bool SwFEShell::IsObjSelectable( const Point& rPt ) { SdrObject* pObj; SdrPageView* pPV; - USHORT nOld = pDView->GetHitTolerancePixel(); + sal_uInt16 nOld = pDView->GetHitTolerancePixel(); pDView->SetHitTolerancePixel( pDView->GetMarkHdlSizePixel()/2 ); bRet = 0 != pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMARKABLE ); @@ -1297,18 +1297,18 @@ sal_Bool SwFEShell::ShouldObjectBeSelected(const Point& rPt) * Beinhaltet das Objekt ein Control oder Gruppen, * die nur aus Controls bestehen * --------------------------------------------------*/ -BOOL lcl_IsControlGroup( const SdrObject *pObj ) +sal_Bool lcl_IsControlGroup( const SdrObject *pObj ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if(pObj->ISA(SdrUnoObj)) - bRet = TRUE; + bRet = sal_True; else if( pObj->ISA( SdrObjGroup ) ) { - bRet = TRUE; + bRet = sal_True; const SdrObjList *pLst = ((SdrObjGroup*)pObj)->GetSubList(); - for ( USHORT i = 0; i < pLst->GetObjCount(); ++i ) + for ( sal_uInt16 i = 0; i < pLst->GetObjCount(); ++i ) if( !::lcl_IsControlGroup( pLst->GetObj( i ) ) ) - return FALSE; + return sal_False; } return bRet; } @@ -1333,7 +1333,7 @@ namespace }; } -const SdrObject* SwFEShell::GetBestObject( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType, BOOL bFlat, const ::svx::ISdrObjectFilter* pFilter ) +const SdrObject* SwFEShell::GetBestObject( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_...*/ eType, sal_Bool bFlat, const ::svx::ISdrObjectFilter* pFilter ) { if( !Imp()->HasDrawView() ) return NULL; @@ -1346,12 +1346,12 @@ const SdrObject* SwFEShell::GetBestObject( BOOL bNext, USHORT /*GOTOOBJ_...*/ eT Point aTopPos( nTmp, nTmp ); Point aCurPos; Point aPos; - BOOL bNoDraw = 0 == (GOTOOBJ_DRAW_ANY & eType); - BOOL bNoFly = 0 == (GOTOOBJ_FLY_ANY & eType); + sal_Bool bNoDraw = 0 == (GOTOOBJ_DRAW_ANY & eType); + sal_Bool bNoFly = 0 == (GOTOOBJ_FLY_ANY & eType); if( !bNoFly && bNoDraw ) { - SwFlyFrm *pFly = GetCurrFrm( FALSE )->FindFlyFrm(); + SwFlyFrm *pFly = GetCurrFrm( sal_False )->FindFlyFrm(); if( pFly ) pBest = pFly->GetVirtDrawObj(); } @@ -1404,7 +1404,7 @@ const SdrObject* SwFEShell::GetBestObject( BOOL bNext, USHORT /*GOTOOBJ_...*/ eT while ( aObjIter.IsMore() ) { SdrObject* pObj = aObjIter.Next(); - BOOL bFlyFrm = pObj->ISA(SwVirtFlyDrawObj); + sal_Bool bFlyFrm = pObj->ISA(SwVirtFlyDrawObj); if( ( bNoFly && bFlyFrm ) || ( bNoDraw && !bFlyFrm ) || ( eType == GOTOOBJ_DRAW_SIMPLE && lcl_IsControlGroup( pObj ) ) || @@ -1510,14 +1510,14 @@ const SdrObject* SwFEShell::GetBestObject( BOOL bNext, USHORT /*GOTOOBJ_...*/ eT return pBest; } -BOOL SwFEShell::GotoObj( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType ) +sal_Bool SwFEShell::GotoObj( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_...*/ eType ) { const SdrObject* pBest = GetBestObject( bNext, eType ); if ( !pBest ) - return FALSE; + return sal_False; - BOOL bFlyFrm = pBest->ISA(SwVirtFlyDrawObj); + sal_Bool bFlyFrm = pBest->ISA(SwVirtFlyDrawObj); if( bFlyFrm ) { SwVirtFlyDrawObj *pO = (SwVirtFlyDrawObj*)pBest; @@ -1533,7 +1533,7 @@ BOOL SwFEShell::GotoObj( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType ) MakeVisible( pBest->GetCurrentBoundRect() ); } CallChgLnk(); - return TRUE; + return sal_True; } /************************************************************************* @@ -1545,9 +1545,9 @@ BOOL SwFEShell::GotoObj( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType ) |* *************************************************************************/ -BOOL SwFEShell::BeginCreate( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos ) +sal_Bool SwFEShell::BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if ( !Imp()->HasDrawView() ) Imp()->MakeDrawView(); @@ -1569,10 +1569,10 @@ BOOL SwFEShell::BeginCreate( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, const Poin return bRet; } -BOOL SwFEShell::BeginCreate( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, UINT32 eObjInventor, +sal_Bool SwFEShell::BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, sal_uInt32 eObjInventor, const Point &rPos ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if ( !Imp()->HasDrawView() ) Imp()->MakeDrawView(); @@ -1616,34 +1616,34 @@ void SwFEShell::MoveCreate( const Point &rPos ) |* *************************************************************************/ -BOOL SwFEShell::EndCreate( UINT16 eSdrCreateCmd ) +sal_Bool SwFEShell::EndCreate( sal_uInt16 eSdrCreateCmd ) { // JP 18.08.95: Damit das Undo-Object aus der DrawEngine nicht bei uns // gespeichert wird, (wir erzeugen ein eigenes Undo-Object!) hier kurz // das Undo abschalten ASSERT( Imp()->HasDrawView(), "EndCreate without DrawView?" ); if( !Imp()->GetDrawView()->IsGroupEntered() ) - GetDoc()->SetNoDrawUndoObj( TRUE ); - BOOL bCreate = Imp()->GetDrawView()->EndCreateObj( + GetDoc()->SetNoDrawUndoObj( sal_True ); + sal_Bool bCreate = Imp()->GetDrawView()->EndCreateObj( SdrCreateCmd( eSdrCreateCmd ) ); - GetDoc()->SetNoDrawUndoObj( FALSE ); + GetDoc()->SetNoDrawUndoObj( sal_False ); if ( !bCreate ) { ::FrameNotify( this, FLY_DRAG_END ); - return FALSE; + return sal_False; } if ( (SdrCreateCmd)eSdrCreateCmd == SDRCREATE_NEXTPOINT ) { ::FrameNotify( this, FLY_DRAG ); - return TRUE; + return sal_True; } return ImpEndCreate(); } -BOOL SwFEShell::ImpEndCreate() +sal_Bool SwFEShell::ImpEndCreate() { ASSERT( Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() == 1, "Neues Object nicht selektiert." ); @@ -1657,7 +1657,7 @@ BOOL SwFEShell::ImpEndCreate() Imp()->GetDrawView()->DeleteMarked(); Imp()->GetDrawView()->UnmarkAll(); ::FrameNotify( this, FLY_DRAG_END ); - return FALSE; + return sal_False; } if( rSdrObj.GetUpGroup() ) @@ -1668,7 +1668,7 @@ BOOL SwFEShell::ImpEndCreate() rSdrObj.NbcSetRelativePos( aTmpPos - aNewAnchor ); rSdrObj.NbcSetAnchorPos( aNewAnchor ); ::FrameNotify( this, FLY_DRAG ); - return TRUE; + return sal_True; } LockPaint(); @@ -1681,14 +1681,14 @@ BOOL SwFEShell::ImpEndCreate() //Fremde Identifier sollen in den Default laufen. //Ueberschneidungen sind moeglich!! - UINT16 nIdent = SdrInventor == rSdrObj.GetObjInventor() + sal_uInt16 nIdent = SdrInventor == rSdrObj.GetObjInventor() ? rSdrObj.GetObjIdentifier() : 0xFFFF; //Default fuer Controls ist Zeichengebunden, Absatzgebunden sonst. SwFmtAnchor aAnch; const SwFrm *pAnch = 0; - BOOL bCharBound = FALSE; + sal_Bool bCharBound = sal_False; if( rSdrObj.ISA( SdrUnoObj ) ) { SwPosition aPos( GetDoc()->GetNodes() ); @@ -1704,7 +1704,7 @@ BOOL SwFEShell::ImpEndCreate() pAnch->GetCharRect( aTmp, aPos ); //Der Crsr darf nicht zu weit entfernt sein. - bCharBound = TRUE; + bCharBound = sal_True; Rectangle aRect( aTmp.SVRect() ); aRect.Left() -= MM50*2; aRect.Top() -= MM50*2; @@ -1712,7 +1712,7 @@ BOOL SwFEShell::ImpEndCreate() aRect.Bottom()+= MM50*2; if( !aRect.IsOver( rBound ) && !::GetHtmlMode( GetDoc()->GetDocShell() )) - bCharBound = FALSE; + bCharBound = sal_False; //Bindung in Kopf-/Fusszeilen ist ebenfalls nicht erlaubt. if( bCharBound ) @@ -1747,7 +1747,7 @@ BOOL SwFEShell::ImpEndCreate() // die naechste nicht READONLY Position suchen? bAtPage = true; - pAnch = aPos.nNode.GetNode().GetCntntNode()->GetFrm( &aPoint, 0, FALSE ); + pAnch = aPos.nNode.GetNode().GetCntntNode()->GetFrm( &aPoint, 0, sal_False ); if( !bAtPage ) { @@ -1852,29 +1852,29 @@ BOOL SwFEShell::ImpEndCreate() //Erzeugtes Object wegwerfen, so kann der Fly am elegentesten //ueber vorhandene SS erzeugt werden. - GetDoc()->SetNoDrawUndoObj( TRUE ); // siehe oben + GetDoc()->SetNoDrawUndoObj( sal_True ); // siehe oben // --> OD 2005-08-08 #i52858# - method name changed SdrPage *pPg = getIDocumentDrawModelAccess()->GetOrCreateDrawModel()->GetPage( 0 ); // <-- if( !pPg ) { SdrModel* pTmpSdrModel = getIDocumentDrawModelAccess()->GetDrawModel(); - pPg = pTmpSdrModel->AllocPage( FALSE ); + pPg = pTmpSdrModel->AllocPage( sal_False ); pTmpSdrModel->InsertPage( pPg ); } pPg->RecalcObjOrdNums(); SdrObject* pRemovedObject = pPg->RemoveObject( rSdrObj.GetOrdNumDirect() ); SdrObject::Free( pRemovedObject ); - GetDoc()->SetNoDrawUndoObj( FALSE ); + GetDoc()->SetNoDrawUndoObj( sal_False ); SwFlyFrm* pFlyFrm; - if( NewFlyFrm( aSet, TRUE ) && + if( NewFlyFrm( aSet, sal_True ) && ::GetHtmlMode( GetDoc()->GetDocShell() ) && 0 != ( pFlyFrm = FindFlyFrm() )) { SfxItemSet aHtmlSet( GetDoc()->GetAttrPool(), RES_VERT_ORIENT, RES_HORI_ORIENT ); //Horizontale Ausrichtung: - const BOOL bLeftFrm = aFlyRect.Left() < + const sal_Bool bLeftFrm = aFlyRect.Left() < pAnch->Frm().Left() + pAnch->Prt().Left(), bLeftPrt = aFlyRect.Left() + aFlyRect.Width() < pAnch->Frm().Left() + pAnch->Prt().Width()/2; @@ -1885,7 +1885,7 @@ BOOL SwFEShell::ImpEndCreate() } else { - const BOOL bRightFrm = aFlyRect.Left() > + const sal_Bool bRightFrm = aFlyRect.Left() > pAnch->Frm().Left() + pAnch->Prt().Width(); aHori.SetHoriOrient( text::HoriOrientation::RIGHT ); aHori.SetRelationOrient( bRightFrm ? text::RelOrientation::FRAME : text::RelOrientation::PRINT_AREA ); @@ -1966,12 +1966,12 @@ BOOL SwFEShell::ImpEndCreate() if ( pMarkObj ) { Imp()->GetDrawView()->MarkObj( pMarkObj, Imp()->GetPageView(), - FALSE, FALSE ); + sal_False, sal_False ); } else { Imp()->GetDrawView()->MarkObj( &rSdrObj, Imp()->GetPageView(), - FALSE, FALSE ); + sal_False, sal_False ); } } } @@ -1981,7 +1981,7 @@ BOOL SwFEShell::ImpEndCreate() KillPams(); EndAllActionAndCall(); UnlockPaint(); - return TRUE; + return sal_True; } @@ -2010,9 +2010,9 @@ void SwFEShell::BreakCreate() |* *************************************************************************/ -BOOL SwFEShell::IsDrawCreate() const +sal_Bool SwFEShell::IsDrawCreate() const { - return Imp()->HasDrawView() ? Imp()->GetDrawView()->IsCreateObj() : FALSE; + return Imp()->HasDrawView() ? Imp()->GetDrawView()->IsCreateObj() : sal_False; } /************************************************************************* @@ -2024,7 +2024,7 @@ BOOL SwFEShell::IsDrawCreate() const |* *************************************************************************/ -BOOL SwFEShell::BeginMark( const Point &rPos ) +sal_Bool SwFEShell::BeginMark( const Point &rPos ) { if ( !Imp()->HasDrawView() ) Imp()->MakeDrawView(); @@ -2039,7 +2039,7 @@ BOOL SwFEShell::BeginMark( const Point &rPos ) return pDView->BegMarkObj( rPos ); } else - return FALSE; + return sal_False; } /************************************************************************* @@ -2079,9 +2079,9 @@ void SwFEShell::MoveMark( const Point &rPos ) |* *************************************************************************/ -BOOL SwFEShell::EndMark() +sal_Bool SwFEShell::EndMark() { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; ASSERT( Imp()->HasDrawView(), "EndMark without DrawView?" ); if (Imp()->GetDrawView()->IsMarkObj()) @@ -2090,7 +2090,7 @@ BOOL SwFEShell::EndMark() if ( bRet ) { - BOOL bShowHdl = FALSE; + sal_Bool bShowHdl = sal_False; SwDrawView* pDView = Imp()->GetDrawView(); //Rahmen werden auf diese Art nicht Selektiert, es sein denn es //ist nur ein Rahmen. @@ -2098,7 +2098,7 @@ BOOL SwFEShell::EndMark() SwFlyFrm* pOldSelFly = ::GetFlyFromMarked( &rMrkList, this ); if ( rMrkList.GetMarkCount() > 1 ) - for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); if( pObj->ISA(SwVirtFlyDrawObj) ) @@ -2106,7 +2106,7 @@ BOOL SwFEShell::EndMark() if ( !bShowHdl ) { //HMHpDView->HideMarkHdl(); - bShowHdl = TRUE; + bShowHdl = sal_True; } rMrkList.DeleteMark( i ); --i; //keinen auslassen. @@ -2123,7 +2123,7 @@ BOOL SwFEShell::EndMark() if ( rMrkList.GetMarkCount() ) ::lcl_GrabCursor(this, pOldSelFly); else - bRet = FALSE; + bRet = sal_False; } if ( bRet ) ::FrameNotify( this, FLY_DRAG_START ); @@ -2168,7 +2168,7 @@ short SwFEShell::GetAnchorId() const if ( Imp()->HasDrawView() ) { const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); if ( pObj->ISA(SwVirtFlyDrawObj) ) @@ -2201,7 +2201,7 @@ short SwFEShell::GetAnchorId() const |* *************************************************************************/ -void SwFEShell::ChgAnchor( int eAnchorId, BOOL bSameOnly, BOOL bPosCorr ) +void SwFEShell::ChgAnchor( int eAnchorId, sal_Bool bSameOnly, sal_Bool bPosCorr ) { ASSERT( Imp()->HasDrawView(), "ChgAnchor without DrawView?" ); const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); @@ -2310,12 +2310,12 @@ Point SwFEShell::GetObjAbsPos() const |* *************************************************************************/ -BOOL SwFEShell::IsGroupSelected() +sal_Bool SwFEShell::IsGroupSelected() { if ( IsObjSelected() ) { const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); // OD 30.06.2003 #108784# - consider 'virtual' drawing objects. @@ -2327,11 +2327,11 @@ BOOL SwFEShell::IsGroupSelected() FLY_AS_CHAR != ((SwDrawContact*)GetUserCall(pObj))-> GetFmt()->GetAnchor().GetAnchorId() ) { - return TRUE; + return sal_True; } } } - return FALSE; + return sal_False; } // OD 27.06.2003 #108784# - change return type. @@ -2347,7 +2347,7 @@ bool SwFEShell::IsGroupAllowed() const const SdrObject* pUpGroup = 0L; const SwFrm* pHeaderFooterFrm = 0L; const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - for ( USHORT i = 0; bIsGroupAllowed && i < rMrkList.GetMarkCount(); ++i ) + for ( sal_uInt16 i = 0; bIsGroupAllowed && i < rMrkList.GetMarkCount(); ++i ) { const SdrObject* pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); if ( i ) @@ -2471,7 +2471,7 @@ void SwFEShell::UnGroupSelection() |* *************************************************************************/ -void SwFEShell::MirrorSelection( BOOL bHorizontal ) +void SwFEShell::MirrorSelection( sal_Bool bHorizontal ) { SdrView *pView = Imp()->GetDrawView(); if ( IsObjSelected() && pView->IsMirrorAllowed() ) @@ -2485,10 +2485,10 @@ void SwFEShell::MirrorSelection( BOOL bHorizontal ) // springe zum benannten Rahmen (Grafik/OLE) -BOOL SwFEShell::GotoFly( const String& rName, FlyCntType eType, BOOL bSelFrm ) +sal_Bool SwFEShell::GotoFly( const String& rName, FlyCntType eType, sal_Bool bSelFrm ) { - BOOL bRet = FALSE; -static BYTE __READONLY_DATA aChkArr[ 4 ] = { + sal_Bool bRet = sal_False; +static sal_uInt8 __READONLY_DATA aChkArr[ 4 ] = { /* FLYCNTTYPE_ALL */ 0, /* FLYCNTTYPE_FRM */ ND_TEXTNODE, /* FLYCNTTYPE_GRF */ ND_GRFNODE, @@ -2531,19 +2531,19 @@ static BYTE __READONLY_DATA aChkArr[ 4 ] = { GetCrsrDocPos() = rChrRect.Pos(); } } - bRet = TRUE; + bRet = sal_True; } } return bRet; } -USHORT SwFEShell::GetFlyCount( FlyCntType eType ) const +sal_uInt16 SwFEShell::GetFlyCount( FlyCntType eType ) const { return GetDoc()->GetFlyCount(eType); } -const SwFrmFmt* SwFEShell::GetFlyNum(USHORT nIdx, FlyCntType eType ) const +const SwFrmFmt* SwFEShell::GetFlyNum(sal_uInt16 nIdx, FlyCntType eType ) const { return GetDoc()->GetFlyNum(nIdx, eType ); } @@ -2562,14 +2562,14 @@ void SwFEShell::MakeSelVisible() //Welcher Schutz ist am selektierten Objekt gesetzt? -BYTE SwFEShell::IsSelObjProtected( USHORT eType ) const +sal_uInt8 SwFEShell::IsSelObjProtected( sal_uInt16 eType ) const { int nChk = 0; const bool bParent = (eType & FLYPROTECT_PARENT); if( Imp()->HasDrawView() ) { const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - for( ULONG i = rMrkList.GetMarkCount(); i; ) + for( sal_uLong i = rMrkList.GetMarkCount(); i; ) { SdrObject *pObj = rMrkList.GetMark( --i )->GetMarkedSdrObj(); if( !bParent ) @@ -2608,7 +2608,7 @@ BYTE SwFEShell::IsSelObjProtected( USHORT eType ) const } nChk &= eType; if( nChk == eType ) - return static_cast<BYTE>(eType); + return static_cast<sal_uInt8>(eType); } const SwFrm* pAnch; if( pObj->ISA(SwVirtFlyDrawObj) ) @@ -2619,19 +2619,19 @@ BYTE SwFEShell::IsSelObjProtected( USHORT eType ) const pAnch = pTmp ? pTmp->GetAnchorFrm( pObj ) : NULL; } if( pAnch && pAnch->IsProtected() ) - return static_cast<BYTE>(eType); + return static_cast<sal_uInt8>(eType); } } - return static_cast<BYTE>(nChk); + return static_cast<sal_uInt8>(nChk); } -BOOL SwFEShell::GetObjAttr( SfxItemSet &rSet ) const +sal_Bool SwFEShell::GetObjAttr( SfxItemSet &rSet ) const { if ( !IsObjSelected() ) - return FALSE; + return sal_False; const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj); @@ -2646,23 +2646,23 @@ BOOL SwFEShell::GetObjAttr( SfxItemSet &rSet ) const } // <-- } - return TRUE; + return sal_True; } -BOOL SwFEShell::SetObjAttr( const SfxItemSet& rSet ) +sal_Bool SwFEShell::SetObjAttr( const SfxItemSet& rSet ) { SET_CURR_SHELL( this ); if ( !rSet.Count() ) { ASSERT( !this, "SetObjAttr, empty set." ); - return FALSE; + return sal_False; } StartAllAction(); StartUndo( UNDO_INSATTR ); const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj); @@ -2672,15 +2672,15 @@ BOOL SwFEShell::SetObjAttr( const SfxItemSet& rSet ) EndUndo( UNDO_INSATTR ); EndAllActionAndCall(); GetDoc()->SetModified(); - return TRUE; + return sal_True; } -BOOL SwFEShell::IsAlignPossible() const +sal_Bool SwFEShell::IsAlignPossible() const { - USHORT nCnt; + sal_uInt16 nCnt; if ( 0 < (nCnt = IsObjSelected()) ) { - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; if ( nCnt == 1 ) { SdrObject *pO = Imp()->GetDrawView()->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj(); @@ -2691,7 +2691,7 @@ BOOL SwFEShell::IsAlignPossible() const if ( bRet ) return Imp()->GetDrawView()->IsAlignPossible(); } - return FALSE; + return sal_False; } @@ -2701,7 +2701,7 @@ void SwFEShell::CheckUnboundObjects() SET_CURR_SHELL( this ); const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); if ( !GetUserCall(pObj) ) @@ -2722,14 +2722,14 @@ void SwFEShell::CheckUnboundObjects() //Fremde Identifier sollen in den Default laufen. //Ueberschneidungen sind moeglich!! - UINT16 nIdent = + sal_uInt16 nIdent = Imp()->GetDrawView()->GetCurrentObjInventor() == SdrInventor ? Imp()->GetDrawView()->GetCurrentObjIdentifier() : 0xFFFF; SwFmtAnchor aAnch; const SwFrm *pAnch = 0; { - pAnch = ::FindAnchor( pPage, aPt, TRUE ); + pAnch = ::FindAnchor( pPage, aPt, sal_True ); SwPosition aPos( *((SwCntntFrm*)pAnch)->GetNode() ); aAnch.SetType( FLY_AT_PARA ); aAnch.SetAnchor( &aPos ); @@ -2789,7 +2789,7 @@ int SwFEShell::Chainable( SwRect &rRect, const SwFrmFmt &rSource, SdrObject* pObj; SdrPageView* pPView; SwDrawView *pDView = (SwDrawView*)Imp()->GetDrawView(); - const USHORT nOld = pDView->GetHitTolerancePixel(); + const sal_uInt16 nOld = pDView->GetHitTolerancePixel(); pDView->SetHitTolerancePixel( 0 ); if( pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SDRSEARCH_PICKMARKABLE ) && pObj->ISA(SwVirtFlyDrawObj) ) @@ -2824,7 +2824,7 @@ int SwFEShell::Chain( SwFrmFmt &rSource, const Point &rPt ) SdrObject* pObj; SdrPageView* pPView; SwDrawView *pDView = (SwDrawView*)Imp()->GetDrawView(); - const USHORT nOld = pDView->GetHitTolerancePixel(); + const sal_uInt16 nOld = pDView->GetHitTolerancePixel(); pDView->SetHitTolerancePixel( 0 ); pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SDRSEARCH_PICKMARKABLE ); pDView->SetHitTolerancePixel( nOld ); @@ -2862,15 +2862,15 @@ void SwFEShell::HideChainMarker() void SwFEShell::SetChainMarker() { - BOOL bDelFrom = TRUE, - bDelTo = TRUE; + sal_Bool bDelFrom = sal_True, + bDelTo = sal_True; if ( IsFrmSelected() ) { SwFlyFrm *pFly = FindFlyFrm(); if ( pFly->GetPrevLink() ) { - bDelFrom = FALSE; + bDelFrom = sal_False; const SwFrm *pPre = pFly->GetPrevLink(); Point aStart( pPre->Frm().Right(), pPre->Frm().Bottom()); @@ -2883,7 +2883,7 @@ void SwFEShell::SetChainMarker() } if ( pFly->GetNextLink() ) { - bDelTo = FALSE; + bDelTo = sal_False; const SwFlyFrm *pNxt = pFly->GetNextLink(); Point aStart( pFly->Frm().Right(), pFly->Frm().Bottom()); @@ -2941,8 +2941,8 @@ long SwFEShell::GetSectionWidth( SwFmt& rFmt ) const /* -----------------------------2002/06/24 15:07------------------------------ ---------------------------------------------------------------------------*/ -void SwFEShell::CreateDefaultShape( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, const Rectangle& rRect, - USHORT nSlotId) +void SwFEShell::CreateDefaultShape( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Rectangle& rRect, + sal_uInt16 nSlotId) { SdrView* pDrawView = GetDrawView(); SdrModel* pDrawModel = pDrawView->GetModel(); @@ -3070,7 +3070,7 @@ void SwFEShell::CreateDefaultShape( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, cons } else if(pObj->ISA(SdrCaptionObj)) { - BOOL bVerticalText = ( SID_DRAW_TEXT_VERTICAL == nSlotId || + sal_Bool bVerticalText = ( SID_DRAW_TEXT_VERTICAL == nSlotId || SID_DRAW_CAPTION_VERTICAL == nSlotId ); ((SdrTextObj*)pObj)->SetVerticalWriting(bVerticalText); if(bVerticalText) @@ -3098,8 +3098,8 @@ void SwFEShell::CreateDefaultShape( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, cons if(bVertical) { SfxItemSet aSet(pDrawModel->GetItemPool()); - aSet.Put(SdrTextAutoGrowWidthItem(TRUE)); - aSet.Put(SdrTextAutoGrowHeightItem(FALSE)); + aSet.Put(SdrTextAutoGrowWidthItem(sal_True)); + aSet.Put(SdrTextAutoGrowHeightItem(sal_False)); aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP)); aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT)); pText->SetMergedItemSet(aSet); @@ -3108,12 +3108,12 @@ void SwFEShell::CreateDefaultShape( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, cons if(bMarquee) { SfxItemSet aSet(pDrawModel->GetItemPool(), SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST); - aSet.Put( SdrTextAutoGrowWidthItem( FALSE ) ); - aSet.Put( SdrTextAutoGrowHeightItem( FALSE ) ); + aSet.Put( SdrTextAutoGrowWidthItem( sal_False ) ); + aSet.Put( SdrTextAutoGrowHeightItem( sal_False ) ); aSet.Put( SdrTextAniKindItem( SDRTEXTANI_SLIDE ) ); aSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) ); aSet.Put( SdrTextAniCountItem( 1 ) ); - aSet.Put( SdrTextAniAmountItem( (INT16)GetWin()->PixelToLogic(Size(2,1)).Width()) ); + aSet.Put( SdrTextAniAmountItem( (sal_Int16)GetWin()->PixelToLogic(Size(2,1)).Width()) ); pObj->SetMergedItemSetAndBroadcast(aSet); } } diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index ad2e077e5d7c..c94602e66177 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -80,8 +80,8 @@ using namespace ::com::sun::star; //siehe auch swtable.cxx #define COLFUZZY 20L -inline BOOL IsSame( long nA, long nB ) { return Abs(nA-nB) <= COLFUZZY; } -inline BOOL IsNear( long nA, long nB, long nTolerance ) { return Abs( nA - nB ) <= nTolerance; } +inline sal_Bool IsSame( long nA, long nB ) { return Abs(nA-nB) <= COLFUZZY; } +inline sal_Bool IsNear( long nA, long nB, long nTolerance ) { return Abs( nA - nB ) <= nTolerance; } // table column cache SwTabCols *pLastCols = 0; @@ -100,17 +100,17 @@ class TblWait { SwWait *pWait; public: - TblWait( USHORT nCnt, SwFrm *pFrm, SwDocShell &rDocShell, USHORT nCnt2 = 0); + TblWait( sal_uInt16 nCnt, SwFrm *pFrm, SwDocShell &rDocShell, sal_uInt16 nCnt2 = 0); ~TblWait() { delete pWait; } }; -TblWait::TblWait( USHORT nCnt, SwFrm *pFrm, SwDocShell &rDocShell, USHORT nCnt2): +TblWait::TblWait( sal_uInt16 nCnt, SwFrm *pFrm, SwDocShell &rDocShell, sal_uInt16 nCnt2): pWait( 0 ) { - BOOL bWait = 20 < nCnt || 20 < nCnt2 || (pFrm && + sal_Bool bWait = 20 < nCnt || 20 < nCnt2 || (pFrm && 20 < pFrm->ImplFindTabFrm()->GetTable()->GetTabLines().Count()); if( bWait ) - pWait = new SwWait( rDocShell, TRUE ); + pWait = new SwWait( rDocShell, sal_True ); } @@ -205,18 +205,18 @@ void SwFEShell::ParkCursorInTab() #* Datum : MA 03. May. 93 #* Update : MA 19. Apr. 95 #***********************************************************************/ -BOOL SwFEShell::InsertRow( USHORT nCnt, BOOL bBehind ) +sal_Bool SwFEShell::InsertRow( sal_uInt16 nCnt, sal_Bool bBehind ) { // pruefe ob vom aktuellen Crsr der Point/Mark in einer Tabelle stehen SwFrm *pFrm = GetCurrFrm(); if( !pFrm || !pFrm->IsInTab() ) - return FALSE; + return sal_False; if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable )) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); - return FALSE; + return sal_False; } SET_CURR_SHELL( this ); @@ -228,7 +228,7 @@ BOOL SwFEShell::InsertRow( USHORT nCnt, BOOL bBehind ) TblWait( nCnt, pFrm, *GetDoc()->GetDocShell(), aBoxes.Count() ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if ( aBoxes.Count() ) bRet = GetDoc()->InsertRow( aBoxes, nCnt, bBehind ); @@ -236,18 +236,18 @@ BOOL SwFEShell::InsertRow( USHORT nCnt, BOOL bBehind ) return bRet; } -BOOL SwFEShell::InsertCol( USHORT nCnt, BOOL bBehind ) +sal_Bool SwFEShell::InsertCol( sal_uInt16 nCnt, sal_Bool bBehind ) { // pruefe ob vom aktuellen Crsr der Point/Mark in einer Tabelle stehen SwFrm *pFrm = GetCurrFrm(); if( !pFrm || !pFrm->IsInTab() ) - return FALSE; + return sal_False; if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable )) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); - return FALSE; + return sal_False; } SET_CURR_SHELL( this ); @@ -256,7 +256,7 @@ BOOL SwFEShell::InsertCol( USHORT nCnt, BOOL bBehind ) { ErrorHandler::HandleError( ERR_TBLINSCOL_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); - return FALSE; + return sal_False; } StartAllAction(); @@ -266,7 +266,7 @@ BOOL SwFEShell::InsertCol( USHORT nCnt, BOOL bBehind ) TblWait( nCnt, pFrm, *GetDoc()->GetDocShell(), aBoxes.Count() ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( aBoxes.Count() ) bRet = GetDoc()->InsertCol( aBoxes, nCnt, bBehind ); @@ -284,11 +284,11 @@ BOOL SwFEShell::InsertCol( USHORT nCnt, BOOL bBehind ) /** Determines if the current cursor is in the last row of the table. */ -BOOL SwFEShell::IsLastCellInRow() const +sal_Bool SwFEShell::IsLastCellInRow() const { SwTabCols aTabCols; GetTabCols( aTabCols ); - BOOL bResult = FALSE; + sal_Bool bResult = sal_False; if (IsTableRightToLeft()) /* If the table is right-to-left the last row is the most left one. */ @@ -300,25 +300,25 @@ BOOL SwFEShell::IsLastCellInRow() const return bResult; } -BOOL SwFEShell::DeleteCol() +sal_Bool SwFEShell::DeleteCol() { // pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen SwFrm *pFrm = GetCurrFrm(); if( !pFrm || !pFrm->IsInTab() ) - return FALSE; + return sal_False; if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable )) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); - return FALSE; + return sal_False; } SET_CURR_SHELL( this ); StartAllAction(); // lasse ueber das Layout die Boxen suchen - BOOL bRet; + sal_Bool bRet; SwSelBoxes aBoxes; GetTblSel( *this, aBoxes, nsSwTblSearchType::TBLSEARCH_COL ); if ( aBoxes.Count() ) @@ -340,31 +340,31 @@ BOOL SwFEShell::DeleteCol() } else - bRet = FALSE; + bRet = sal_False; EndAllActionAndCall(); return bRet; } -BOOL SwFEShell::DeleteRow() +sal_Bool SwFEShell::DeleteRow() { // pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen SwFrm *pFrm = GetCurrFrm(); if( !pFrm || !pFrm->IsInTab() ) - return FALSE; + return sal_False; if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable )) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); - return FALSE; + return sal_False; } SET_CURR_SHELL( this ); StartAllAction(); // lasse ueber das Layout die Boxen suchen - BOOL bRet; + sal_Bool bRet; SwSelBoxes aBoxes; GetTblSel( *this, aBoxes, nsSwTblSearchType::TBLSEARCH_ROW ); @@ -390,7 +390,7 @@ BOOL SwFEShell::DeleteRow() if( !aFndBox.GetLines().Count() ) { EndAllActionAndCall(); - return FALSE; + return sal_False; } KillPams(); @@ -416,7 +416,7 @@ BOOL SwFEShell::DeleteRow() pDelBox = pLn->GetTabBoxes()[ pLn->GetTabBoxes().Count() - 1 ]; } SwTableBox* pNextBox = pDelLine->FindNextBox( pTblNd->GetTable(), - pDelBox, TRUE ); + pDelBox, sal_True ); while( pNextBox && pNextBox->GetFrmFmt()->GetProtect().IsCntntProtected() ) pNextBox = pNextBox->FindNextBox( pTblNd->GetTable(), pNextBox ); @@ -428,13 +428,13 @@ BOOL SwFEShell::DeleteRow() while( !pDelBox->GetSttNd() ) pDelBox = pDelBox->GetTabLines()[0]->GetTabBoxes()[0]; pNextBox = pDelLine->FindPreviousBox( pTblNd->GetTable(), - pDelBox, TRUE ); + pDelBox, sal_True ); while( pNextBox && pNextBox->GetFrmFmt()->GetProtect().IsCntntProtected() ) pNextBox = pNextBox->FindPreviousBox( pTblNd->GetTable(), pNextBox ); } - ULONG nIdx; + sal_uLong nIdx; if( pNextBox ) // dann den Cursor hier hinein nIdx = pNextBox->GetSttIdx() + 1; else // ansonsten hinter die Tabelle @@ -461,7 +461,7 @@ BOOL SwFEShell::DeleteRow() EndUndo(UNDO_ROW_DELETE); } else - bRet = FALSE; + bRet = sal_False; EndAllActionAndCall(); return bRet; @@ -474,10 +474,10 @@ BOOL SwFEShell::DeleteRow() #* Update : MA 19. Apr. 95 #***********************************************************************/ -USHORT SwFEShell::MergeTab() +sal_uInt16 SwFEShell::MergeTab() { // pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen - USHORT nRet = TBLMERGE_NOSELECTION; + sal_uInt16 nRet = TBLMERGE_NOSELECTION; if( IsTableMode() ) { SwShellTableCrsr* pTableCrsr = GetTableCrsr(); @@ -505,18 +505,18 @@ USHORT SwFEShell::MergeTab() return nRet; } -BOOL SwFEShell::SplitTab( BOOL bVert, USHORT nCnt, BOOL bSameHeight ) +sal_Bool SwFEShell::SplitTab( sal_Bool bVert, sal_uInt16 nCnt, sal_Bool bSameHeight ) { // pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen SwFrm *pFrm = GetCurrFrm(); if( !pFrm || !pFrm->IsInTab() ) - return FALSE; + return sal_False; if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable )) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); - return FALSE; + return sal_False; } SET_CURR_SHELL( this ); @@ -525,11 +525,11 @@ BOOL SwFEShell::SplitTab( BOOL bVert, USHORT nCnt, BOOL bSameHeight ) { ErrorHandler::HandleError( ERR_TBLSPLIT_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); - return FALSE; + return sal_False; } StartAllAction(); // lasse ueber das Layout die Boxen suchen - BOOL bRet; + sal_Bool bRet; SwSelBoxes aBoxes; GetTblSel( *this, aBoxes ); if( aBoxes.Count() ) @@ -543,7 +543,7 @@ BOOL SwFEShell::SplitTab( BOOL bVert, USHORT nCnt, BOOL bSameHeight ) DELETEZ( pLastRows ); } else - bRet = FALSE; + bRet = sal_False; EndAllActionAndCall(); return bRet; } @@ -561,16 +561,16 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const if ( pLastCols ) { //Paar Kleinigkeiten muessen wir schon noch sicherstellen - BOOL bDel = TRUE; + sal_Bool bDel = sal_True; if ( pColumnCacheLastTable == pTab->GetTable() ) { - bDel = FALSE; + bDel = sal_False; SWRECTFN( pTab ) const SwPageFrm* pPage = pTab->FindPageFrm(); - const ULONG nLeftMin = (pTab->Frm().*fnRect->fnGetLeft)() - + const sal_uLong nLeftMin = (pTab->Frm().*fnRect->fnGetLeft)() - (pPage->Frm().*fnRect->fnGetLeft)(); - const ULONG nRightMax = (pTab->Frm().*fnRect->fnGetRight)() - + const sal_uLong nRightMax = (pTab->Frm().*fnRect->fnGetRight)() - (pPage->Frm().*fnRect->fnGetLeft)(); if ( pColumnCacheLastTabFrm != pTab ) @@ -590,25 +590,25 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const pColumnCacheLastTabFrm = pTab; } else - bDel = TRUE; + bDel = sal_True; } if ( !bDel && - pLastCols->GetLeftMin () == (USHORT)nLeftMin && - pLastCols->GetLeft () == (USHORT)(pTab->Prt().*fnRect->fnGetLeft)() && - pLastCols->GetRight () == (USHORT)(pTab->Prt().*fnRect->fnGetRight)()&& - pLastCols->GetRightMax() == (USHORT)nRightMax - pLastCols->GetLeftMin() ) + pLastCols->GetLeftMin () == (sal_uInt16)nLeftMin && + pLastCols->GetLeft () == (sal_uInt16)(pTab->Prt().*fnRect->fnGetLeft)() && + pLastCols->GetRight () == (sal_uInt16)(pTab->Prt().*fnRect->fnGetRight)()&& + pLastCols->GetRightMax() == (sal_uInt16)nRightMax - pLastCols->GetLeftMin() ) { if ( pColumnCacheLastCellFrm != pBox ) { pTab->GetTable()->GetTabCols( *pLastCols, - ((SwCellFrm*)pBox)->GetTabBox(), TRUE); + ((SwCellFrm*)pBox)->GetTabBox(), sal_True); pColumnCacheLastCellFrm = pBox; } rToFill = *pLastCols; } else - bDel = TRUE; + bDel = sal_True; } if ( bDel ) DELETEZ(pLastCols); @@ -625,7 +625,7 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const #if OSL_DEBUG_LEVEL > 1 SwTabColsEntry aEntry; - for ( USHORT i = 0; i < rToFill.Count(); ++i ) + for ( sal_uInt16 i = 0; i < rToFill.Count(); ++i ) { aEntry = rToFill.GetEntry( i ); (void)aEntry; @@ -645,10 +645,10 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const if ( pLastRows ) { //Paar Kleinigkeiten muessen wir schon noch sicherstellen - BOOL bDel = TRUE; + sal_Bool bDel = sal_True; if ( pRowCacheLastTable == pTab->GetTable() ) { - bDel = FALSE; + bDel = sal_False; SWRECTFN( pTab ) const SwPageFrm* pPage = pTab->FindPageFrm(); const long nLeftMin = ( bVert ? @@ -660,7 +660,7 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const if ( pRowCacheLastTabFrm != pTab || pRowCacheLastCellFrm != pBox ) - bDel = TRUE; + bDel = sal_True; if ( !bDel && pLastRows->GetLeftMin () == nLeftMin && @@ -671,7 +671,7 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const rToFill = *pLastRows; } else - bDel = TRUE; + bDel = sal_True; } if ( bDel ) DELETEZ(pLastRows); @@ -693,7 +693,7 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const #* Datum : MA 03. May. 93 #* Update : MA 18. May. 93 #***********************************************************************/ -void SwFEShell::SetTabCols( const SwTabCols &rNew, BOOL bCurRowOnly ) +void SwFEShell::SetTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly ) { SwFrm *pBox = GetCurrFrm(); if( !pBox || !pBox->IsInTab() ) @@ -739,7 +739,7 @@ void SwFEShell::GetTabRows( SwTabCols &rToFill ) const /*-- 19.01.2004 08:56:44--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwFEShell::SetTabRows( const SwTabCols &rNew, BOOL bCurColOnly ) +void SwFEShell::SetTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly ) { SwFrm *pBox = GetCurrFrm(); if( !pBox || !pBox->IsInTab() ) @@ -767,7 +767,7 @@ void SwFEShell::GetMouseTabRows( SwTabCols &rToFill, const Point &rPt ) const /*-- 19.01.2004 08:59:45--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwFEShell::SetMouseTabRows( const SwTabCols &rNew, BOOL bCurColOnly, const Point &rPt ) +void SwFEShell::SetMouseTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly, const Point &rPt ) { const SwFrm *pBox = GetBox( rPt ); if( pBox ) @@ -822,12 +822,12 @@ void SwFEShell::GetRowHeight( SwFmtFrmSize *& rpSz ) const GetDoc()->GetRowHeight( *getShellCrsr( false ), rpSz ); } -BOOL SwFEShell::BalanceRowHeight( BOOL bTstOnly ) +sal_Bool SwFEShell::BalanceRowHeight( sal_Bool bTstOnly ) { SET_CURR_SHELL( this ); if( !bTstOnly ) StartAllAction(); - BOOL bRet = GetDoc()->BalanceRowHeight( *getShellCrsr( false ), bTstOnly ); + sal_Bool bRet = GetDoc()->BalanceRowHeight( *getShellCrsr( false ), bTstOnly ); if( !bTstOnly ) EndAllActionAndCall(); return bRet; @@ -847,7 +847,7 @@ void SwFEShell::SetRowBackground( const SvxBrushItem &rNew ) /****************************************************************************** * SwTwips SwFEShell::GetRowBackground() const ******************************************************************************/ -BOOL SwFEShell::GetRowBackground( SvxBrushItem &rToFill ) const +sal_Bool SwFEShell::GetRowBackground( SvxBrushItem &rToFill ) const { return GetDoc()->GetRowBackground( *getShellCrsr( false ), rToFill ); } @@ -867,7 +867,7 @@ void SwFEShell::SetTabBorders( const SfxItemSet& rSet ) EndAllActionAndCall(); } -void SwFEShell::SetTabLineStyle( const Color* pColor, BOOL bSetLine, +void SwFEShell::SetTabLineStyle( const Color* pColor, sal_Bool bSetLine, const SvxBorderLine* pBorderLine ) { SET_CURR_SHELL( this ); @@ -897,7 +897,7 @@ void SwFEShell::SetBoxBackground( const SvxBrushItem &rNew ) EndAllActionAndCall(); } -BOOL SwFEShell::GetBoxBackground( SvxBrushItem &rToFill ) const +sal_Bool SwFEShell::GetBoxBackground( SvxBrushItem &rToFill ) const { return GetDoc()->GetBoxAttr( *getShellCrsr( false ), rToFill ); } @@ -916,7 +916,7 @@ void SwFEShell::SetBoxDirection( const SvxFrameDirectionItem& rNew ) EndAllActionAndCall(); } -BOOL SwFEShell::GetBoxDirection( SvxFrameDirectionItem& rToFill ) const +sal_Bool SwFEShell::GetBoxDirection( SvxFrameDirectionItem& rToFill ) const { return GetDoc()->GetBoxAttr( *getShellCrsr( false ), rToFill ); } @@ -927,7 +927,7 @@ BOOL SwFEShell::GetBoxDirection( SvxFrameDirectionItem& rToFill ) const #* Datum : MA 18. Dec. 96 #* Update : JP 29.04.98 #***********************************************************************/ -void SwFEShell::SetBoxAlign( USHORT nAlign ) +void SwFEShell::SetBoxAlign( sal_uInt16 nAlign ) { SET_CURR_SHELL( this ); StartAllAction(); @@ -935,7 +935,7 @@ void SwFEShell::SetBoxAlign( USHORT nAlign ) EndAllActionAndCall(); } -USHORT SwFEShell::GetBoxAlign() const +sal_uInt16 SwFEShell::GetBoxAlign() const { return GetDoc()->GetBoxAlign( *getShellCrsr( false ) ); } @@ -973,7 +973,7 @@ void SwFEShell::GetTabBackground( SvxBrushItem &rToFill ) const #* Datum : MA 18. May. 93 #* Update : MA 20. Jul. 93 #***********************************************************************/ -BOOL SwFEShell::HasWholeTabSelection() const +sal_Bool SwFEShell::HasWholeTabSelection() const { //Ist die ganze Tabelle Selektiert? if ( IsTableMode() ) @@ -989,24 +989,24 @@ BOOL SwFEShell::HasWholeTabSelection() const == pTblNd->EndOfSectionIndex() ); } } - return FALSE; + return sal_False; } -BOOL SwFEShell::HasBoxSelection() const +sal_Bool SwFEShell::HasBoxSelection() const { if(!IsCrsrInTbl()) - return FALSE; + return sal_False; //Ist die ganze Tabelle Selektiert? if( IsTableMode() ) - return TRUE; + return sal_True; SwPaM* pPam = GetCrsr(); // leere Boxen gelten auch ohne Selektion als selektiert // if( !pPam->HasMark() ) -// return FALSE; - BOOL bChg = FALSE; +// return sal_False; + sal_Bool bChg = sal_False; if( pPam->GetPoint() == pPam->End()) { - bChg = TRUE; + bChg = sal_True; pPam->Exchange(); } SwNode* pNd; @@ -1027,12 +1027,12 @@ BOOL SwFEShell::HasBoxSelection() const { if( bChg ) pPam->Exchange(); - return TRUE; + return sal_True; } } if( bChg ) pPam->Exchange(); - return FALSE; + return sal_False; } /*********************************************************************** @@ -1044,7 +1044,7 @@ BOOL SwFEShell::HasBoxSelection() const void SwFEShell::ProtectCells() { SvxProtectItem aProt( RES_PROTECT ); - aProt.SetCntntProtect( TRUE ); + aProt.SetCntntProtect( sal_True ); SET_CURR_SHELL( this ); StartAllAction(); @@ -1096,16 +1096,16 @@ void SwFEShell::UnProtectTbls() EndAllActionAndCall(); } -BOOL SwFEShell::HasTblAnyProtection( const String* pTblName, - BOOL* pFullTblProtection ) +sal_Bool SwFEShell::HasTblAnyProtection( const String* pTblName, + sal_Bool* pFullTblProtection ) { return GetDoc()->HasTblAnyProtection( GetCrsr()->GetPoint(), pTblName, pFullTblProtection ); } -BOOL SwFEShell::CanUnProtectCells() const +sal_Bool SwFEShell::CanUnProtectCells() const { - BOOL bUnProtectAvailable = FALSE; + sal_Bool bUnProtectAvailable = sal_False; const SwTableNode *pTblNd = IsCrsrInTbl(); if( pTblNd && !pTblNd->IsProtect() ) { @@ -1134,7 +1134,7 @@ BOOL SwFEShell::CanUnProtectCells() const #* Class : SwFEShell #* Methoden : GetRowsToRepeat(), SetRowsToRepeat() #***********************************************************************/ -USHORT SwFEShell::GetRowsToRepeat() const +sal_uInt16 SwFEShell::GetRowsToRepeat() const { const SwFrm *pFrm = GetCurrFrm(); const SwTabFrm *pTab = pFrm ? pFrm->FindTabFrm() : 0; @@ -1143,13 +1143,13 @@ USHORT SwFEShell::GetRowsToRepeat() const return 0; } -void SwFEShell::SetRowsToRepeat( USHORT nSet ) +void SwFEShell::SetRowsToRepeat( sal_uInt16 nSet ) { SwFrm *pFrm = GetCurrFrm(); SwTabFrm *pTab = pFrm ? pFrm->FindTabFrm() : 0; if( pTab && pTab->GetTable()->GetRowsToRepeat() != nSet ) { - SwWait aWait( *GetDoc()->GetDocShell(), TRUE ); + SwWait aWait( *GetDoc()->GetDocShell(), sal_True ); SET_CURR_SHELL( this ); StartAllAction(); GetDoc()->SetRowsToRepeat( *pTab->GetTable(), nSet ); @@ -1159,15 +1159,15 @@ void SwFEShell::SetRowsToRepeat( USHORT nSet ) /*-- 30.06.2004 08:46:35--------------------------------------------------- returns the number of rows consecutively selected from top -----------------------------------------------------------------------*/ -USHORT lcl_GetRowNumber( const SwPosition& rPos ) +sal_uInt16 lcl_GetRowNumber( const SwPosition& rPos ) { - USHORT nRet = USHRT_MAX; + sal_uInt16 nRet = USHRT_MAX; Point aTmpPt; const SwCntntNode *pNd; const SwCntntFrm *pFrm; if( 0 != ( pNd = rPos.nNode.GetNode().GetCntntNode() )) - pFrm = pNd->GetFrm( &aTmpPt, &rPos, FALSE ); + pFrm = pNd->GetFrm( &aTmpPt, &rPos, sal_False ); else pFrm = 0; @@ -1180,7 +1180,7 @@ USHORT lcl_GetRowNumber( const SwPosition& rPos ) const SwTabFrm* pTabFrm = (const SwTabFrm*)pRow->GetUpper(); const SwTableLine* pTabLine = static_cast<const SwRowFrm*>(pRow)->GetTabLine(); - USHORT nI = 0; + sal_uInt16 nI = 0; while ( nI < pTabFrm->GetTable()->GetTabLines().Count() ) { if ( pTabFrm->GetTable()->GetTabLines()[ nI ] == pTabLine ) @@ -1194,11 +1194,11 @@ USHORT lcl_GetRowNumber( const SwPosition& rPos ) return nRet; } -USHORT SwFEShell::GetRowSelectionFromTop() const +sal_uInt16 SwFEShell::GetRowSelectionFromTop() const { - USHORT nRet = 0; + sal_uInt16 nRet = 0; const SwPaM* pPaM = IsTableMode() ? GetTableCrsr() : _GetCrsr(); - const USHORT nPtLine = lcl_GetRowNumber( *pPaM->GetPoint() ); + const sal_uInt16 nPtLine = lcl_GetRowNumber( *pPaM->GetPoint() ); if ( !IsTableMode() ) { @@ -1206,7 +1206,7 @@ USHORT SwFEShell::GetRowSelectionFromTop() const } else { - const USHORT nMkLine = lcl_GetRowNumber( *pPaM->GetMark() ); + const sal_uInt16 nMkLine = lcl_GetRowNumber( *pPaM->GetMark() ); if ( ( nPtLine == 0 && nMkLine != USHRT_MAX ) || ( nMkLine == 0 && nPtLine != USHRT_MAX ) ) @@ -1227,9 +1227,9 @@ USHORT SwFEShell::GetRowSelectionFromTop() const * returns true if the current frame is localed inside a table headline OR * inside the first line of a table!!! */ -BOOL SwFEShell::CheckHeadline( bool bRepeat ) const +sal_Bool SwFEShell::CheckHeadline( bool bRepeat ) const { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if ( !IsTableMode() ) { SwFrm *pFrm = GetCurrFrm(); // DONE MULTIIHEADER @@ -1257,7 +1257,7 @@ BOOL SwFEShell::CheckHeadline( bool bRepeat ) const #* Update : MA 27. Jul. 95 #***********************************************************************/ -void SwFEShell::AdjustCellWidth( BOOL bBalance ) +void SwFEShell::AdjustCellWidth( sal_Bool bBalance ) { SET_CURR_SHELL( this ); StartAllAction(); @@ -1270,14 +1270,14 @@ void SwFEShell::AdjustCellWidth( BOOL bBalance ) EndAllActionAndCall(); } -BOOL SwFEShell::IsAdjustCellWidthAllowed( BOOL bBalance ) const +sal_Bool SwFEShell::IsAdjustCellWidthAllowed( sal_Bool bBalance ) const { //Es muss mindestens eine Zelle mit Inhalt in der Selektion enthalten //sein. SwFrm *pFrm = GetCurrFrm(); if( !pFrm || !pFrm->IsInTab() ) - return FALSE; + return sal_False; SwSelBoxes aBoxes; ::GetTblSelCrs( *this, aBoxes ); @@ -1294,7 +1294,7 @@ BOOL SwFEShell::IsAdjustCellWidthAllowed( BOOL bBalance ) const aBoxes.Insert( pBox ); } - for ( USHORT i = 0; i < aBoxes.Count(); ++i ) + for ( sal_uInt16 i = 0; i < aBoxes.Count(); ++i ) { SwTableBox *pBox = aBoxes[i]; if ( pBox->GetSttNd() ) @@ -1307,21 +1307,21 @@ BOOL SwFEShell::IsAdjustCellWidthAllowed( BOOL bBalance ) const while ( pCNd ) { if ( pCNd->GetTxt().Len() ) - return TRUE; + return sal_True; ++aIdx; pCNd = GetDoc()->GetNodes()[ aIdx ]->GetTxtNode(); } } } - return FALSE; + return sal_False; } // AutoFormat fuer die Tabelle/TabellenSelection -BOOL SwFEShell::SetTableAutoFmt( const SwTableAutoFmt& rNew ) +sal_Bool SwFEShell::SetTableAutoFmt( const SwTableAutoFmt& rNew ) { SwTableNode *pTblNd = (SwTableNode*)IsCrsrInTbl(); if( !pTblNd || pTblNd->GetTable().IsTblComplex() ) - return FALSE; + return sal_False; SwSelBoxes aBoxes; @@ -1334,14 +1334,14 @@ BOOL SwFEShell::SetTableAutoFmt( const SwTableAutoFmt& rNew ) else { const SwTableSortBoxes& rTBoxes = pTblNd->GetTable().GetTabSortBoxes(); - for( USHORT n = 0; n < rTBoxes.Count(); ++n ) + for( sal_uInt16 n = 0; n < rTBoxes.Count(); ++n ) { SwTableBox* pBox = rTBoxes[ n ]; aBoxes.Insert( pBox ); } } - BOOL bRet; + sal_Bool bRet; if( aBoxes.Count() ) { SET_CURR_SHELL( this ); @@ -1352,15 +1352,15 @@ BOOL SwFEShell::SetTableAutoFmt( const SwTableAutoFmt& rNew ) EndAllActionAndCall(); } else - bRet = FALSE; + bRet = sal_False; return bRet; } -BOOL SwFEShell::GetTableAutoFmt( SwTableAutoFmt& rGet ) +sal_Bool SwFEShell::GetTableAutoFmt( SwTableAutoFmt& rGet ) { const SwTableNode *pTblNd = IsCrsrInTbl(); if( !pTblNd || pTblNd->GetTable().IsTblComplex() ) - return FALSE; + return sal_False; SwSelBoxes aBoxes; @@ -1373,7 +1373,7 @@ BOOL SwFEShell::GetTableAutoFmt( SwTableAutoFmt& rGet ) else { const SwTableSortBoxes& rTBoxes = pTblNd->GetTable().GetTabSortBoxes(); - for( USHORT n = 0; n < rTBoxes.Count(); ++n ) + for( sal_uInt16 n = 0; n < rTBoxes.Count(); ++n ) { SwTableBox* pBox = rTBoxes[ n ]; aBoxes.Insert( pBox ); @@ -1389,25 +1389,25 @@ BOOL SwFEShell::GetTableAutoFmt( SwTableAutoFmt& rGet ) #* Datum : MA 03. May. 93 #* Update : MA 19. Apr. 95 #***********************************************************************/ -BOOL SwFEShell::DeleteTblSel() +sal_Bool SwFEShell::DeleteTblSel() { // pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen SwFrm *pFrm = GetCurrFrm(); if( !pFrm || !pFrm->IsInTab() ) - return FALSE; + return sal_False; if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable )) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); - return FALSE; + return sal_False; } SET_CURR_SHELL( this ); StartAllAction(); // lasse ueber das Layout die Boxen suchen - BOOL bRet; + sal_Bool bRet; SwSelBoxes aBoxes; GetTblSelCrs( *this, aBoxes ); if( aBoxes.Count() ) @@ -1427,7 +1427,7 @@ BOOL SwFEShell::DeleteTblSel() DELETEZ( pLastRows ); } else - bRet = FALSE; + bRet = sal_False; EndAllActionAndCall(); return bRet; } @@ -1440,10 +1440,10 @@ BOOL SwFEShell::DeleteTblSel() |* Letzte Aenderung MA 21. May. 95 | |*************************************************************************/ -USHORT SwFEShell::GetCurTabColNum() const +sal_uInt16 SwFEShell::GetCurTabColNum() const { //!!!GetCurMouseTabColNum() mitpflegen!!!! - USHORT nRet = 0; + sal_uInt16 nRet = 0; SwFrm *pFrm = GetCurrFrm(); ASSERT( pFrm, "Crsr geparkt?" ); @@ -1472,7 +1472,7 @@ USHORT SwFEShell::GetCurTabColNum() const if ( !::IsSame( nX, nRight ) ) { nX = nRight - nX + aTabCols.GetLeft(); - for ( USHORT i = 0; i < aTabCols.Count(); ++i ) + for ( sal_uInt16 i = 0; i < aTabCols.Count(); ++i ) if ( ::IsSame( nX, aTabCols[i] ) ) { nRet = i + 1; @@ -1489,7 +1489,7 @@ USHORT SwFEShell::GetCurTabColNum() const if ( !::IsSame( nX, nLeft + aTabCols.GetLeft() ) ) { - for ( USHORT i = 0; i < aTabCols.Count(); ++i ) + for ( sal_uInt16 i = 0; i < aTabCols.Count(); ++i ) if ( ::IsSame( nX, nLeft + aTabCols[i] ) ) { nRet = i + 1; @@ -1756,7 +1756,7 @@ const SwFrm* SwFEShell::GetBox( const Point &rPt, bool* pbRow, bool* pbCol ) con //Erst die Flys checken. if ( pPage->GetSortedObjs() ) { - for ( USHORT i = 0; !pFrm && i < pPage->GetSortedObjs()->Count(); ++i ) + for ( sal_uInt16 i = 0; !pFrm && i < pPage->GetSortedObjs()->Count(); ++i ) { SwAnchoredObject* pObj = (*pPage->GetSortedObjs())[i]; if ( pObj->ISA(SwFlyFrm) ) @@ -1915,7 +1915,7 @@ bool SwFEShell::SelTblRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag bool pbCol[2] = { 0, 0 }; // pEnd is set during dragging. - for ( USHORT i = 0; i < ( pEnd ? 2 : 1 ); ++i ) + for ( sal_uInt16 i = 0; i < ( pEnd ? 2 : 1 ); ++i ) { const SwCellFrm* pFrm = static_cast<const SwCellFrm*>(GetBox( paPt[i], &pbRow[i], &pbCol[i] ) ); @@ -1967,7 +1967,7 @@ bool SwFEShell::SelTblRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag *pCrsr->GetPoint() = *ppPos[0]; pCrsr->GetPtPos() = paPt[0]; - if ( !pCrsr->IsInProtectTable( FALSE, TRUE ) ) + if ( !pCrsr->IsInProtectTable( sal_False, sal_True ) ) { bool bNewSelection = true; @@ -1981,7 +1981,7 @@ bool SwFEShell::SelTblRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag *pCrsr->GetPoint() = *ppPos[1]; pCrsr->GetPtPos() = paPt[1]; - if ( pCrsr->IsInProtectTable( FALSE, FALSE ) ) + if ( pCrsr->IsInProtectTable( sal_False, sal_False ) ) { pCrsr->RestoreSavePos(); bNewSelection = false; @@ -2030,9 +2030,9 @@ bool SwFEShell::SelTblRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag |* Last change AMA 12. Jun. 02 | |*************************************************************************/ -BYTE SwFEShell::WhichMouseTabCol( const Point &rPt ) const +sal_uInt8 SwFEShell::WhichMouseTabCol( const Point &rPt ) const { - BYTE nRet = SW_TABCOL_NONE; + sal_uInt8 nRet = SW_TABCOL_NONE; bool bRow = false; bool bCol = false; bool bSelect = false; @@ -2122,9 +2122,9 @@ SwTxtNode * SwFEShell::GetNumRuleNodeAtPos( const Point &rPt) return pResult; } -BOOL SwFEShell::IsNumLabel( const Point &rPt, int nMaxOffset ) +sal_Bool SwFEShell::IsNumLabel( const Point &rPt, int nMaxOffset ) { - BOOL bResult = FALSE; + sal_Bool bResult = sal_False; SwContentAtPos aCntntAtPos (SwContentAtPos::SW_NUMLABEL); @@ -2133,7 +2133,7 @@ BOOL SwFEShell::IsNumLabel( const Point &rPt, int nMaxOffset ) { if ((nMaxOffset >= 0 && aCntntAtPos.nDist <= nMaxOffset) || (nMaxOffset < 0)) - bResult = TRUE; + bResult = sal_True; } return bResult; @@ -2184,7 +2184,7 @@ void SwFEShell::GetMouseTabCols( SwTabCols &rToFill, const Point &rPt ) const _GetTabCols( rToFill, pBox ); } -void SwFEShell::SetMouseTabCols( const SwTabCols &rNew, BOOL bCurRowOnly, +void SwFEShell::SetMouseTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly, const Point &rPt ) { const SwFrm *pBox = GetBox( rPt ); @@ -2205,16 +2205,16 @@ void SwFEShell::SetMouseTabCols( const SwTabCols &rNew, BOOL bCurRowOnly, |* Letzte Aenderung MA 04. Jul. 95 | |*************************************************************************/ -USHORT SwFEShell::GetCurMouseColNum( const Point &rPt, +sal_uInt16 SwFEShell::GetCurMouseColNum( const Point &rPt, SwGetCurColNumPara* pPara ) const { return _GetCurColNum( GetBox( rPt ), pPara ); } -USHORT SwFEShell::GetCurMouseTabColNum( const Point &rPt ) const +sal_uInt16 SwFEShell::GetCurMouseTabColNum( const Point &rPt ) const { //!!!GetCurTabColNum() mitpflegen!!!! - USHORT nRet = 0; + sal_uInt16 nRet = 0; const SwFrm *pFrm = GetBox( rPt ); ASSERT( pFrm, "Table not found" ); @@ -2230,7 +2230,7 @@ USHORT SwFEShell::GetCurMouseTabColNum( const Point &rPt ) const if ( !::IsSame( nX, nLeft + aTabCols.GetLeft() ) ) { - for ( USHORT i = 0; i < aTabCols.Count(); ++i ) + for ( sal_uInt16 i = 0; i < aTabCols.Count(); ++i ) if ( ::IsSame( nX, nLeft + aTabCols[i] ) ) { nRet = i + 1; @@ -2308,18 +2308,18 @@ bool lcl_GoTableRow( SwCrsrShell* pShell, bool bUp ) } // aender eine Zellenbreite/-Hoehe/Spaltenbreite/Zeilenhoehe -BOOL SwFEShell::SetColRowWidthHeight( USHORT eType, USHORT nDiff ) +sal_Bool SwFEShell::SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff ) { SwFrm *pFrm = GetCurrFrm(); if( !pFrm || !pFrm->IsInTab() ) - return FALSE; + return sal_False; if( nsTblChgWidthHeightType::WH_FLAG_INSDEL & eType && pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable )) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); - return FALSE; + return sal_False; } SET_CURR_SHELL( this ); @@ -2349,7 +2349,7 @@ BOOL SwFEShell::SetColRowWidthHeight( USHORT eType, USHORT nDiff ) if( (eType & (nsTblChgWidthHeightType::WH_FLAG_BIGGER | nsTblChgWidthHeightType::WH_FLAG_INSDEL)) == (nsTblChgWidthHeightType::WH_FLAG_BIGGER | nsTblChgWidthHeightType::WH_FLAG_INSDEL) ) { - nDiff = USHORT((pFrm->Frm().*fnRect->fnGetWidth)()); + nDiff = sal_uInt16((pFrm->Frm().*fnRect->fnGetWidth)()); // we must move the cursor outside the current cell before // deleting the cells. @@ -2379,7 +2379,7 @@ BOOL SwFEShell::SetColRowWidthHeight( USHORT eType, USHORT nDiff ) nLogDiff /= nPrtWidth; /** The cells are destroyed in here */ - BOOL bRet = GetDoc()->SetColRowWidthHeight( + sal_Bool bRet = GetDoc()->SetColRowWidthHeight( *(SwTableBox*)((SwCellFrm*)pFrm)->GetTabBox(), eType, nDiff, nLogDiff ); @@ -2415,44 +2415,44 @@ BOOL SwFEShell::SetColRowWidthHeight( USHORT eType, USHORT nDiff ) return bRet; } -BOOL lcl_IsFormulaSelBoxes( const SwTable& rTbl, const SwTblBoxFormula& rFml, +sal_Bool lcl_IsFormulaSelBoxes( const SwTable& rTbl, const SwTblBoxFormula& rFml, SwCellFrms& rCells ) { SwTblBoxFormula aTmp( rFml ); SwSelBoxes aBoxes; - for( USHORT nSelBoxes = aTmp.GetBoxesOfFormula( rTbl,aBoxes ); nSelBoxes; ) + for( sal_uInt16 nSelBoxes = aTmp.GetBoxesOfFormula( rTbl,aBoxes ); nSelBoxes; ) { SwTableBox* pBox = aBoxes[ --nSelBoxes ]; - USHORT i; + sal_uInt16 i; for( i = 0; i < rCells.Count(); ++i ) if( rCells[ i ]->GetTabBox() == pBox ) break; // gefunden if( i == rCells.Count() ) - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } // erfrage die Formel fuer die Autosumme -BOOL SwFEShell::GetAutoSum( String& rFml ) const +sal_Bool SwFEShell::GetAutoSum( String& rFml ) const { SwFrm *pFrm = GetCurrFrm(); SwTabFrm *pTab = pFrm ? pFrm->ImplFindTabFrm() : 0; if( !pTab ) - return FALSE; + return sal_False; rFml = String::CreateFromAscii( sCalc_Sum ); SwCellFrms aCells; if( ::GetAutoSumSel( *this, aCells )) { - USHORT nW = 0, nInsPos = 0; - for( USHORT n = aCells.Count(); n; ) + sal_uInt16 nW = 0, nInsPos = 0; + for( sal_uInt16 n = aCells.Count(); n; ) { SwCellFrm* pCFrm = aCells[ --n ]; - USHORT nBoxW = pCFrm->GetTabBox()->IsFormulaOrValueBox(); + sal_uInt16 nBoxW = pCFrm->GetTabBox()->IsFormulaOrValueBox(); if( !nBoxW ) break; @@ -2471,7 +2471,7 @@ BOOL SwFEShell::GetAutoSum( String& rFml ) const { nW = RES_BOXATR_VALUE; // alle vorhierigen Leere wieder mit aufnehmen ! - for( USHORT i = aCells.Count(); n+1 < i; ) + for( sal_uInt16 i = aCells.Count(); n+1 < i; ) { String sTmp( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "|<" )) ); @@ -2509,7 +2509,7 @@ BOOL SwFEShell::GetAutoSum( String& rFml ) const nW = RES_BOXATR_VALUE; rFml.Erase( nInsPos ); // alle vorhierigen Leere wieder mit aufnehmen ! - for( USHORT i = aCells.Count(); n+1 < i; ) + for( sal_uInt16 i = aCells.Count(); n+1 < i; ) { String sTmp( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "|<" )) ); @@ -2544,7 +2544,7 @@ BOOL SwFEShell::GetAutoSum( String& rFml ) const // TabellenSelektion erzeugen?? SwTblBoxFormula aTmp( rFml ); SwSelBoxes aBoxes; - for( USHORT nSelBoxes = aTmp.GetBoxesOfFormula( rTbl,aBoxes ); + for( sal_uInt16 nSelBoxes = aTmp.GetBoxesOfFormula( rTbl,aBoxes ); nSelBoxes; ) { } @@ -2552,16 +2552,16 @@ BOOL SwFEShell::GetAutoSum( String& rFml ) const } } - return TRUE; + return sal_True; } /* -----------------------------22.08.2002 12:50------------------------------ ---------------------------------------------------------------------------*/ -BOOL SwFEShell::IsTableRightToLeft() const +sal_Bool SwFEShell::IsTableRightToLeft() const { SwFrm *pFrm = GetCurrFrm(); if( !pFrm || !pFrm->IsInTab() ) - return FALSE; + return sal_False; return pFrm->ImplFindTabFrm()->IsRightToLeft(); } @@ -2569,22 +2569,22 @@ BOOL SwFEShell::IsTableRightToLeft() const /* -----------------------------22.08.2002 12:50------------------------------ ---------------------------------------------------------------------------*/ -BOOL SwFEShell::IsMouseTableRightToLeft(const Point &rPt) const +sal_Bool SwFEShell::IsMouseTableRightToLeft(const Point &rPt) const { SwFrm *pFrm = (SwFrm *)GetBox( rPt ); const SwTabFrm* pTabFrm = pFrm ? pFrm->ImplFindTabFrm() : 0; ASSERT( pTabFrm, "Table not found" ); - return pTabFrm ? pTabFrm->IsRightToLeft() : FALSE; + return pTabFrm ? pTabFrm->IsRightToLeft() : sal_False; } /* -----------------------------11.02.2004 12:50------------------------------ ---------------------------------------------------------------------------*/ -BOOL SwFEShell::IsTableVertical() const +sal_Bool SwFEShell::IsTableVertical() const { SwFrm *pFrm = GetCurrFrm(); if( !pFrm || !pFrm->IsInTab() ) - return FALSE; + return sal_False; return pFrm->ImplFindTabFrm()->IsVertical(); } diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 02baddd201bd..965d7c4ffe87 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -101,7 +101,7 @@ void SwFEShell::EndAllActionAndCall() #* Update : MA 02. May. 95 #***********************************************************************/ -Point SwFEShell::GetCntntPos( const Point& rPoint, BOOL bNext ) const +Point SwFEShell::GetCntntPos( const Point& rPoint, sal_Bool bNext ) const { SET_CURR_SHELL( (ViewShell*)this ); return GetLayout()->GetNextPrevCntntPos( rPoint, bNext ); @@ -133,10 +133,10 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt, if( !pFrm ) return GetLayout()->Frm(); - BOOL bFrm = TRUE; + sal_Bool bFrm = sal_True; switch ( eType ) { - case RECT_PAGE_PRT: bFrm = FALSE; /* no break */ + case RECT_PAGE_PRT: bFrm = sal_False; /* no break */ case RECT_PAGE : pFrm = pFrm->FindPageFrm(); break; @@ -145,7 +145,7 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt, pFrm->Calc(); break; - case RECT_FLY_PRT_EMBEDDED: bFrm = FALSE; /* no break */ + case RECT_FLY_PRT_EMBEDDED: bFrm = sal_False; /* no break */ case RECT_FLY_EMBEDDED: pFrm = xObj.is() ? FindFlyFrm( xObj ) : pFrm->IsFlyFrm() ? pFrm @@ -156,22 +156,22 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt, case RECT_OUTTABSECTION : if( pFrm->IsInTab() ) pFrm = pFrm->FindTabFrm(); else { - ASSERT( FALSE, "Missing Table" ); + ASSERT( sal_False, "Missing Table" ); } /* KEIN BREAK */ case RECT_SECTION_PRT: case RECT_SECTION: if( pFrm->IsInSct() ) pFrm = pFrm->FindSctFrm(); else { - ASSERT( FALSE, "Missing section" ); + ASSERT( sal_False, "Missing section" ); } if( RECT_OUTTABSECTION_PRT == eType || RECT_SECTION_PRT == eType ) - bFrm = FALSE; + bFrm = sal_False; break; - case RECT_HEADERFOOTER_PRT: bFrm = FALSE; /* no break */ + case RECT_HEADERFOOTER_PRT: bFrm = sal_False; /* no break */ case RECT_HEADERFOOTER: if( 0 == (pFrm = pFrm->FindFooterOrHeader()) ) return GetLayout()->Frm(); break; @@ -184,7 +184,7 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt, } -USHORT SwFEShell::GetPageNumber( const Point &rPoint ) const +sal_uInt16 SwFEShell::GetPageNumber( const Point &rPoint ) const { const SwFrm *pPage = GetLayout()->Lower(); while ( pPage && !pPage->Frm().IsInside( rPoint ) ) @@ -196,13 +196,13 @@ USHORT SwFEShell::GetPageNumber( const Point &rPoint ) const } -BOOL SwFEShell::GetPageNumber( long nYPos, BOOL bAtCrsrPos, USHORT& rPhyNum, USHORT& rVirtNum, String &rDisplay) const +sal_Bool SwFEShell::GetPageNumber( long nYPos, sal_Bool bAtCrsrPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, String &rDisplay) const { const SwFrm *pPage; if ( bAtCrsrPos ) //Seite vom Crsr besorgen { - pPage = GetCurrFrm( FALSE ); + pPage = GetCurrFrm( sal_False ); if ( pPage ) pPage = pPage->FindPageFrm(); } @@ -241,7 +241,7 @@ BOOL SwFEShell::GetPageNumber( long nYPos, BOOL bAtCrsrPos, USHORT& rPhyNum, USH bool SwFEShell::IsDirectlyInSection() const { - SwFrm* pFrm = GetCurrFrm( FALSE ); + SwFrm* pFrm = GetCurrFrm( sal_False ); return pFrm && pFrm->GetUpper() && pFrm->GetUpper()->IsSctFrm(); } @@ -254,9 +254,9 @@ bool SwFEShell::IsDirectlyInSection() const |* *************************************************************************/ -USHORT SwFEShell::GetFrmType( const Point *pPt, BOOL bStopAtFly ) const +sal_uInt16 SwFEShell::GetFrmType( const Point *pPt, sal_Bool bStopAtFly ) const { - USHORT nReturn = FRMTYPE_NONE; + sal_uInt16 nReturn = FRMTYPE_NONE; const SwFrm *pFrm; if ( pPt ) { @@ -267,7 +267,7 @@ USHORT SwFEShell::GetFrmType( const Point *pPt, BOOL bStopAtFly ) const pFrm = pNd->GetFrm( pPt ); } else - pFrm = GetCurrFrm( FALSE ); + pFrm = GetCurrFrm( sal_False ); while ( pFrm ) { switch ( pFrm->GetType() ) @@ -330,7 +330,7 @@ USHORT SwFEShell::GetFrmType( const Point *pPt, BOOL bStopAtFly ) const |* *************************************************************************/ -void SwFEShell::ShGetFcs( BOOL bUpdate ) +void SwFEShell::ShGetFcs( sal_Bool bUpdate ) { ::SetShell( this ); SwCrsrShell::ShGetFcs( bUpdate ); @@ -365,7 +365,7 @@ void SwFEShell::ShLooseFcs() |* *************************************************************************/ -USHORT SwFEShell::GetPhyPageNum() +sal_uInt16 SwFEShell::GetPhyPageNum() { SwFrm *pFrm = GetCurrFrm(); if ( pFrm ) @@ -373,7 +373,7 @@ USHORT SwFEShell::GetPhyPageNum() return 0; } -USHORT SwFEShell::GetVirtPageNum( const BOOL bCalcFrm ) +sal_uInt16 SwFEShell::GetVirtPageNum( const sal_Bool bCalcFrm ) { SwFrm *pFrm = GetCurrFrm( bCalcFrm ); if ( pFrm ) @@ -386,14 +386,14 @@ USHORT SwFEShell::GetVirtPageNum( const BOOL bCalcFrm ) |* void lcl_SetAPageOffset() |* void SwFEShell::SetNewPageOffset() |* void SwFEShell::SetPageOffset() -|* USHORT SwFEShell::GetPageOffset() const +|* sal_uInt16 SwFEShell::GetPageOffset() const |* |* Ersterstellung OK 07.07.93 08:20 |* Letzte Aenderung MA 30. Mar. 95 |* *************************************************************************/ -void lcl_SetAPageOffset( USHORT nOffset, SwPageFrm* pPage, SwFEShell* pThis ) +void lcl_SetAPageOffset( sal_uInt16 nOffset, SwPageFrm* pPage, SwFEShell* pThis ) { pThis->StartAllAction(); ASSERT( pPage->FindFirstBodyCntnt(), @@ -402,7 +402,7 @@ void lcl_SetAPageOffset( USHORT nOffset, SwPageFrm* pPage, SwFEShell* pThis ) SwFmtPageDesc aDesc( pPage->GetPageDesc() ); aDesc.SetNumOffset( nOffset ); - SwFrm *pFrm = pThis->GetCurrFrm( FALSE ); + SwFrm *pFrm = pThis->GetCurrFrm( sal_False ); if ( pFrm->IsInTab() ) pThis->GetDoc()->SetAttr( aDesc, *pFrm->FindTabFrm()->GetFmt() ); else @@ -413,16 +413,16 @@ void lcl_SetAPageOffset( USHORT nOffset, SwPageFrm* pPage, SwFEShell* pThis ) pThis->EndAllAction(); } -void SwFEShell::SetNewPageOffset( USHORT nOffset ) +void SwFEShell::SetNewPageOffset( sal_uInt16 nOffset ) { - GetLayout()->SetVirtPageNum( TRUE ); - const SwPageFrm *pPage = GetCurrFrm( FALSE )->FindPageFrm(); + GetLayout()->SetVirtPageNum( sal_True ); + const SwPageFrm *pPage = GetCurrFrm( sal_False )->FindPageFrm(); lcl_SetAPageOffset( nOffset, (SwPageFrm*)pPage, this ); } -void SwFEShell::SetPageOffset( USHORT nOffset ) +void SwFEShell::SetPageOffset( sal_uInt16 nOffset ) { - const SwPageFrm *pPage = GetCurrFrm( FALSE )->FindPageFrm(); + const SwPageFrm *pPage = GetCurrFrm( sal_False )->FindPageFrm(); const SwRootFrm* pLayout = GetLayout(); while ( pPage ) { @@ -434,7 +434,7 @@ void SwFEShell::SetPageOffset( USHORT nOffset ) const SwFmtPageDesc& rPgDesc = pFlow->GetAttrSet()->GetPageDesc(); if ( rPgDesc.GetNumOffset() ) { - pLayout->SetVirtPageNum( TRUE ); + pLayout->SetVirtPageNum( sal_True ); lcl_SetAPageOffset( nOffset, (SwPageFrm*)pPage, this ); break; } @@ -443,7 +443,7 @@ void SwFEShell::SetPageOffset( USHORT nOffset ) } } -USHORT SwFEShell::GetPageOffset() const +sal_uInt16 SwFEShell::GetPageOffset() const { const SwPageFrm *pPage = GetCurrFrm()->FindPageFrm(); while ( pPage ) @@ -453,7 +453,7 @@ USHORT SwFEShell::GetPageOffset() const { if ( pFlow->IsInTab() ) pFlow = pFlow->FindTabFrm(); - const USHORT nOffset = pFlow->GetAttrSet()->GetPageDesc().GetNumOffset(); + const sal_uInt16 nOffset = pFlow->GetAttrSet()->GetPageDesc().GetNumOffset(); if ( nOffset ) return nOffset; } @@ -473,18 +473,18 @@ USHORT SwFEShell::GetPageOffset() const void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator, const String& rNumberSeparator, - const BOOL bBefore, const USHORT nId, + const sal_Bool bBefore, const sal_uInt16 nId, const String& rCharacterStyle, - const BOOL bCpyBrd ) + const sal_Bool bCpyBrd ) { //NodeIndex der CrsrPosition besorgen, den Rest kann das Dokument //selbst erledigen. - SwCntntFrm *pCnt = LTYPE_DRAW==eType ? 0 : GetCurrFrm( FALSE ); + SwCntntFrm *pCnt = LTYPE_DRAW==eType ? 0 : GetCurrFrm( sal_False ); if( LTYPE_DRAW==eType || pCnt ) { StartAllAction(); - ULONG nIdx = 0; + sal_uLong nIdx = 0; SwFlyFrmFmt* pFlyFmt = 0; switch( eType ) { @@ -518,7 +518,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const // local list to perform the corresponding action for each object std::vector<SdrObject*> aDrawObjs; { - for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i ) + for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject* pDrawObj = rMrkList.GetMark(i)->GetMarkedSdrObj(); aDrawObjs.push_back( pDrawObj ); @@ -554,7 +554,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const SwFlyFrm* pFrm; const Point aPt( GetCrsrDocPos() ); if( pFlyFmt && 0 != ( pFrm = pFlyFmt->GetFrm( &aPt ))) - SelectFlyFrm( *pFrm, TRUE ); + SelectFlyFrm( *pFrm, sal_True ); EndAllActionAndCall(); } @@ -568,19 +568,19 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const #* Update : ?? #***********************************************************************/ -BOOL SwFEShell::Sort(const SwSortOptions& rOpt) +sal_Bool SwFEShell::Sort(const SwSortOptions& rOpt) { if( !HasSelection() ) - return FALSE; + return sal_False; SET_CURR_SHELL( this ); - BOOL bRet; + sal_Bool bRet; StartAllAction(); if(IsTableMode()) { // Tabelle sortieren // pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen - SwFrm *pFrm = GetCurrFrm( FALSE ); + SwFrm *pFrm = GetCurrFrm( sal_False ); ASSERT( pFrm->FindTabFrm(), "Crsr nicht in Tabelle." ); // lasse ueber das Layout die Boxen suchen @@ -611,7 +611,7 @@ BOOL SwFEShell::Sort(const SwSortOptions& rOpt) SwPosition* pEnd = pPam->End(); SwNodeIndex aPrevIdx( pStart->nNode, -1 ); - ULONG nOffset = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex(); + sal_uLong nOffset = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex(); xub_StrLen nCntStt = pStart->nContent.GetIndex(); // Das Sortieren @@ -647,10 +647,10 @@ BOOL SwFEShell::Sort(const SwSortOptions& rOpt) | |*************************************************************************/ -USHORT SwFEShell::_GetCurColNum( const SwFrm *pFrm, +sal_uInt16 SwFEShell::_GetCurColNum( const SwFrm *pFrm, SwGetCurColNumPara* pPara ) const { - USHORT nRet = 0; + sal_uInt16 nRet = 0; while ( pFrm ) { pFrm = pFrm->GetUpper(); @@ -690,15 +690,15 @@ USHORT SwFEShell::_GetCurColNum( const SwFrm *pFrm, return nRet; } -USHORT SwFEShell::GetCurColNum( SwGetCurColNumPara* pPara ) const +sal_uInt16 SwFEShell::GetCurColNum( SwGetCurColNumPara* pPara ) const { ASSERT( GetCurrFrm(), "Crsr geparkt?" ); return _GetCurColNum( GetCurrFrm(), pPara ); } -USHORT SwFEShell::GetCurOutColNum( SwGetCurColNumPara* pPara ) const +sal_uInt16 SwFEShell::GetCurOutColNum( SwGetCurColNumPara* pPara ) const { - USHORT nRet = 0; + sal_uInt16 nRet = 0; SwFrm* pFrm = GetCurrFrm(); ASSERT( pFrm, "Crsr geparkt?" ); if( pFrm ) @@ -714,13 +714,13 @@ USHORT SwFEShell::GetCurOutColNum( SwGetCurColNumPara* pPara ) const SwFEShell::SwFEShell( SwDoc& rDoc, Window *pWindow, const SwViewOption *pOptions ) : SwEditShell( rDoc, pWindow, pOptions ), - pChainFrom( 0 ), pChainTo( 0 ), bCheckForOLEInCaption( FALSE ) + pChainFrom( 0 ), pChainTo( 0 ), bCheckForOLEInCaption( sal_False ) { } SwFEShell::SwFEShell( SwEditShell& rShell, Window *pWindow ) : SwEditShell( rShell, pWindow ), - pChainFrom( 0 ), pChainTo( 0 ), bCheckForOLEInCaption( FALSE ) + pChainFrom( 0 ), pChainTo( 0 ), bCheckForOLEInCaption( sal_False ) { } @@ -772,8 +772,8 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, _bMirror = _bMirror && !pPage->OnRightPage(); Point aPos; - BOOL bVertic = FALSE; - BOOL bRTL = FALSE; + sal_Bool bVertic = sal_False; + sal_Bool bRTL = sal_False; if ((FLY_AT_PAGE == _nAnchorId) || (FLY_AT_FLY == _nAnchorId)) // LAYER_IMPL { @@ -800,7 +800,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, if( bVert ) { - bVertic = TRUE; + bVertic = sal_True; _bMirror = false; // no mirroring in vertical environment switch ( _eHoriRelOrient ) { @@ -1100,7 +1100,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, 0; if( bVert ) { - bVertic = TRUE; + bVertic = sal_True; _bMirror = false; switch ( _eHoriRelOrient ) @@ -1239,10 +1239,10 @@ Size SwFEShell::GetGraphicDefaultSize() const /* -----------------------------12.08.2002 12:51------------------------------ ---------------------------------------------------------------------------*/ -BOOL SwFEShell::IsFrmVertical(BOOL bEnvironment, BOOL& bRTL) const +sal_Bool SwFEShell::IsFrmVertical(sal_Bool bEnvironment, sal_Bool& bRTL) const { - BOOL bVert = FALSE; - bRTL = FALSE; + sal_Bool bVert = sal_False; + bRTL = sal_False; if ( Imp()->HasDrawView() ) { diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index deefc2205b67..3353e8d2f9ac 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -75,11 +75,11 @@ _SV_IMPL_SORTAR_ALG( SwSelBoxes, SwTableBoxPtr ) -BOOL SwSelBoxes::Seek_Entry( const SwTableBoxPtr rSrch, USHORT* pFndPos ) const +sal_Bool SwSelBoxes::Seek_Entry( const SwTableBoxPtr rSrch, sal_uInt16* pFndPos ) const { - ULONG nIdx = rSrch->GetSttIdx(); + sal_uLong nIdx = rSrch->GetSttIdx(); - USHORT nO = Count(), nM, nU = 0; + sal_uInt16 nO = Count(), nM, nU = 0; if( nO > 0 ) { nO--; @@ -90,7 +90,7 @@ BOOL SwSelBoxes::Seek_Entry( const SwTableBoxPtr rSrch, USHORT* pFndPos ) const { if( pFndPos ) *pFndPos = nM; - return TRUE; + return sal_True; } else if( (*this)[ nM ]->GetSttIdx() < nIdx ) nU = nM + 1; @@ -98,7 +98,7 @@ BOOL SwSelBoxes::Seek_Entry( const SwTableBoxPtr rSrch, USHORT* pFndPos ) const { if( pFndPos ) *pFndPos = nU; - return FALSE; + return sal_False; } else nO = nM - 1; @@ -106,7 +106,7 @@ BOOL SwSelBoxes::Seek_Entry( const SwTableBoxPtr rSrch, USHORT* pFndPos ) const } if( pFndPos ) *pFndPos = nU; - return FALSE; + return sal_False; } @@ -116,21 +116,21 @@ struct _CmpLPt { Point aPos; const SwTableBox* pSelBox; - BOOL bVert; + sal_Bool bVert; - _CmpLPt( const Point& rPt, const SwTableBox* pBox, BOOL bVertical ); + _CmpLPt( const Point& rPt, const SwTableBox* pBox, sal_Bool bVertical ); - BOOL operator==( const _CmpLPt& rCmp ) const - { return X() == rCmp.X() && Y() == rCmp.Y() ? TRUE : FALSE; } + sal_Bool operator==( const _CmpLPt& rCmp ) const + { return X() == rCmp.X() && Y() == rCmp.Y() ? sal_True : sal_False; } - BOOL operator<( const _CmpLPt& rCmp ) const + sal_Bool operator<( const _CmpLPt& rCmp ) const { if ( bVert ) return X() > rCmp.X() || ( X() == rCmp.X() && Y() < rCmp.Y() ) - ? TRUE : FALSE; + ? sal_True : sal_False; else return Y() < rCmp.Y() || ( Y() == rCmp.Y() && X() < rCmp.X() ) - ? TRUE : FALSE; + ? sal_True : sal_False; } long X() const { return aPos.X(); } @@ -181,7 +181,7 @@ const SwLayoutFrm *lcl_FindNextCellFrm( const SwLayoutFrm *pLay ) void GetTblSelCrs( const SwCrsrShell &rShell, SwSelBoxes& rBoxes ) { if( rBoxes.Count() ) - rBoxes.Remove( USHORT(0), rBoxes.Count() ); + rBoxes.Remove( sal_uInt16(0), rBoxes.Count() ); if( rShell.IsTableMode() && ((SwCrsrShell&)rShell).UpdateTblSelBoxes()) rBoxes.Insert( &rShell.GetTableCrsr()->GetBoxes() ); } @@ -189,7 +189,7 @@ void GetTblSelCrs( const SwCrsrShell &rShell, SwSelBoxes& rBoxes ) void GetTblSelCrs( const SwTableCursor& rTblCrsr, SwSelBoxes& rBoxes ) { if( rBoxes.Count() ) - rBoxes.Remove( USHORT(0), rBoxes.Count() ); + rBoxes.Remove( sal_uInt16(0), rBoxes.Count() ); if( rTblCrsr.IsChgd() || !rTblCrsr.GetBoxesCount() ) { @@ -215,7 +215,7 @@ void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes, const SwTblSearchType eSearchType ) { //Start- und Endzelle besorgen und den naechsten fragen. - ASSERT( rCrsr.GetCntntNode() && rCrsr.GetCntntNode( FALSE ), + ASSERT( rCrsr.GetCntntNode() && rCrsr.GetCntntNode( sal_False ), "Tabselection nicht auf Cnt." ); // Zeilen-Selektion: @@ -243,31 +243,31 @@ void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes, const SwTable& rTbl = pTblNd->GetTable(); const SwTableLines& rLines = rTbl.GetTabLines(); - const SwNode* pMarkNode = rCrsr.GetNode( FALSE ); - const ULONG nMarkSectionStart = pMarkNode->StartOfSectionIndex(); + const SwNode* pMarkNode = rCrsr.GetNode( sal_False ); + const sal_uLong nMarkSectionStart = pMarkNode->StartOfSectionIndex(); const SwTableBox* pMarkBox = rTbl.GetTblBox( nMarkSectionStart ); ASSERT( pMarkBox, "Point in table, mark outside?" ) const SwTableLine* pLine = pMarkBox ? pMarkBox->GetUpper() : 0; - USHORT nSttPos = rLines.GetPos( pLine ); + sal_uInt16 nSttPos = rLines.GetPos( pLine ); ASSERT( USHRT_MAX != nSttPos, "Wo ist meine Zeile in der Tabelle?" ); - pLine = rTbl.GetTblBox( rCrsr.GetNode( TRUE )->StartOfSectionIndex() )->GetUpper(); - USHORT nEndPos = rLines.GetPos( pLine ); + pLine = rTbl.GetTblBox( rCrsr.GetNode( sal_True )->StartOfSectionIndex() )->GetUpper(); + sal_uInt16 nEndPos = rLines.GetPos( pLine ); ASSERT( USHRT_MAX != nEndPos, "Wo ist meine Zeile in der Tabelle?" ); // pb: #i20193# if tableintable then nSttPos == nEndPos == USHRT_MAX if ( nSttPos != USHRT_MAX && nEndPos != USHRT_MAX ) { if( nEndPos < nSttPos ) // vertauschen { - USHORT nTmp = nSttPos; nSttPos = nEndPos; nEndPos = nTmp; + sal_uInt16 nTmp = nSttPos; nSttPos = nEndPos; nEndPos = nTmp; } int bChkProtected = nsSwTblSearchType::TBLSEARCH_PROTECT & eSearchType; for( ; nSttPos <= nEndPos; ++nSttPos ) { pLine = rLines[ nSttPos ]; - for( USHORT n = pLine->GetTabBoxes().Count(); n ; ) + for( sal_uInt16 n = pLine->GetTabBoxes().Count(); n ; ) { SwTableBox* pBox = pLine->GetTabBoxes()[ --n ]; // Zellenschutzt beachten ?? @@ -290,7 +290,7 @@ void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes, const SwCntntNode *pCntNd = rCrsr.GetCntntNode(); const SwLayoutFrm *pStart = pCntNd ? pCntNd->GetFrm( &aPtPos )->GetUpper() : 0; - pCntNd = rCrsr.GetCntntNode(FALSE); + pCntNd = rCrsr.GetCntntNode(sal_False); const SwLayoutFrm *pEnd = pCntNd ? pCntNd->GetFrm( &aMkPos )->GetUpper() : 0; if( pStart && pEnd ) @@ -312,14 +312,14 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, int bChkProtected = nsSwTblSearchType::TBLSEARCH_PROTECT & eSearchType; - BOOL bTblIsValid; + sal_Bool bTblIsValid; // --> FME 2006-01-25 #i55421# Reduced value 10 int nLoopMax = 10; //JP 28.06.99: max 100 loops - Bug 67292 // <-- - USHORT i; + sal_uInt16 i; do { - bTblIsValid = TRUE; + bTblIsValid = sal_True; //Zuerst lassen wir uns die Tabellen und die Rechtecke heraussuchen. SwSelUnions aUnions; @@ -341,7 +341,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, const SwTabFrm *pTable = pUnion->GetTable(); if( !pTable->IsValid() && nLoopMax ) { - bTblIsValid = FALSE; + bTblIsValid = sal_False; break; } @@ -354,7 +354,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, { if( !pRow->IsValid() && nLoopMax ) { - bTblIsValid = FALSE; + bTblIsValid = sal_False; break; } @@ -366,7 +366,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, { if( !pCell->IsValid() && nLoopMax ) { - bTblIsValid = FALSE; + bTblIsValid = sal_False; break; } @@ -476,24 +476,24 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, rBoxes.Remove( i, rBoxes.Count() ); --nLoopMax; - } while( TRUE ); + } while( sal_True ); ASSERT( nLoopMax, "das Layout der Tabelle wurde nicht valide!" ); } -BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, +sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, SwChartLines* pGetCLines ) { const SwTableNode* pTNd = rSttNd.FindTableNode(); if( !pTNd ) - return FALSE; + return sal_False; Point aNullPos; SwNodeIndex aIdx( rSttNd ); const SwCntntNode* pCNd = aIdx.GetNode().GetCntntNode(); if( !pCNd ) - pCNd = aIdx.GetNodes().GoNextSection( &aIdx, FALSE, FALSE ); + pCNd = aIdx.GetNodes().GoNextSection( &aIdx, sal_False, sal_False ); // #109394# if table is invisible, return // (layout needed for forming table selection further down, so we can't @@ -502,7 +502,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, // invisible - e.g. in a hidden section // Robust: check, if content was found (e.g. empty table cells) if ( !pCNd || pCNd->GetFrm() == NULL ) - return FALSE; + return sal_False; const SwLayoutFrm *pStart = pCNd ? pCNd->GetFrm( &aNullPos )->GetUpper() : 0; ASSERT( pStart, "ohne Frame geht gar nichts" ); @@ -510,29 +510,29 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, aIdx = rEndNd; pCNd = aIdx.GetNode().GetCntntNode(); if( !pCNd ) - pCNd = aIdx.GetNodes().GoNextSection( &aIdx, FALSE, FALSE ); + pCNd = aIdx.GetNodes().GoNextSection( &aIdx, sal_False, sal_False ); // OD 07.11.2003 #i22135# - Robust: check, if content was found and if it's visible if ( !pCNd || pCNd->GetFrm() == NULL ) { - return FALSE; + return sal_False; } const SwLayoutFrm *pEnd = pCNd ? pCNd->GetFrm( &aNullPos )->GetUpper() : 0; ASSERT( pEnd, "ohne Frame geht gar nichts" ); - BOOL bTblIsValid, bValidChartSel; + sal_Bool bTblIsValid, bValidChartSel; // --> FME 2006-01-25 #i55421# Reduced value 10 int nLoopMax = 10; //JP 28.06.99: max 100 loops - Bug 67292 // <-- - USHORT i = 0; + sal_uInt16 i = 0; do { - bTblIsValid = TRUE; - bValidChartSel = TRUE; + bTblIsValid = sal_True; + bValidChartSel = sal_True; - USHORT nRowCells = USHRT_MAX; + sal_uInt16 nRowCells = USHRT_MAX; //Zuerst lassen wir uns die Tabellen und die Rechtecke heraussuchen. SwSelUnions aUnions; @@ -550,7 +550,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, if( !pTable->IsValid() && nLoopMax ) { - bTblIsValid = FALSE; + bTblIsValid = sal_False; break; } @@ -565,7 +565,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, { if( !pRow->IsValid() && nLoopMax ) { - bTblIsValid = FALSE; + bTblIsValid = sal_False; break; } @@ -578,7 +578,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, { if( !pCell->IsValid() && nLoopMax ) { - bTblIsValid = FALSE; + bTblIsValid = sal_False; break; } @@ -620,7 +620,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, _Sort_CellFrm( *(SwCellFrm*)pCell) ); else { - bValidChartSel = FALSE; + bValidChartSel = sal_False; break; } } @@ -659,7 +659,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, nRowCells = nCellCnt; else if( nRowCells != nCellCnt ) { - bValidChartSel = FALSE; + bValidChartSel = sal_False; break; } } @@ -682,7 +682,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, } else { - bValidChartSel = FALSE; + bValidChartSel = sal_False; break; } } @@ -691,7 +691,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, if( USHRT_MAX == nRowCells ) nRowCells = nCellCnt; else if( nRowCells != nCellCnt ) - bValidChartSel = FALSE; + bValidChartSel = sal_False; } if( bValidChartSel && pGetCLines ) @@ -704,7 +704,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, if( (rCF.pFrm->Frm().*fnRect->fnGetTop)() != nYPos ) { pBoxes = new SwChartBoxes( 255 < nRowCells - ? 255 : (BYTE)nRowCells); + ? 255 : (sal_uInt8)nRowCells); pGetCLines->C40_INSERT( SwChartBoxes, pBoxes, pGetCLines->Count() ); nYPos = (rCF.pFrm->Frm().*fnRect->fnGetTop)(); } @@ -733,7 +733,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, --nLoopMax; if( pGetCLines ) pGetCLines->DeleteAndDestroy( 0, pGetCLines->Count() ); - } while( TRUE ); + } while( sal_True ); ASSERT( nLoopMax, "das Layout der Tabelle wurde nicht valide!" ); @@ -744,7 +744,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, } -BOOL IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell ) +sal_Bool IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell ) { ASSERT( pCell->IsCellFrm(), "Frame ohne Gazelle" ); @@ -754,7 +754,7 @@ BOOL IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell ) (( rUnion.Top() <= pCell->Frm().Top()+20 && rUnion.Bottom() > pCell->Frm().Top() ) || ( rUnion.Top() >= pCell->Frm().Top() && - rUnion.Bottom() < pCell->Frm().Bottom() )) ? TRUE : FALSE ); + rUnion.Bottom() < pCell->Frm().Bottom() )) ? sal_True : sal_False ); return ( rUnion.Top() <= pCell->Frm().Top() && @@ -764,10 +764,10 @@ BOOL IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell ) rUnion.Right() > pCell->Frm().Left() ) || ( rUnion.Left() >= pCell->Frm().Left() && - rUnion.Right() < pCell->Frm().Right() )) ? TRUE : FALSE ); + rUnion.Right() < pCell->Frm().Right() )) ? sal_True : sal_False ); } -BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) +sal_Bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) { SwShellCrsr* pCrsr = rShell.pCurCrsr; if ( rShell.IsTableMode() ) @@ -775,7 +775,7 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) const SwLayoutFrm *pStart = pCrsr->GetCntntNode()->GetFrm( &pCrsr->GetPtPos() )->GetUpper(), - *pEnd = pCrsr->GetCntntNode(FALSE)->GetFrm( + *pEnd = pCrsr->GetCntntNode(sal_False)->GetFrm( &pCrsr->GetMkPos() )->GetUpper(); const SwLayoutFrm* pSttCell = pStart; @@ -788,8 +788,8 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) // default erstmal nach oben testen, dann nach links ::MakeSelUnions( aUnions, pStart, pEnd, nsSwTblSearchType::TBLSEARCH_COL ); - BOOL bTstRow = TRUE, bFound = FALSE; - USHORT i; + sal_Bool bTstRow = sal_True, bFound = sal_False; + sal_uInt16 i; // 1. teste ob die darueber liegende Box Value/Formel enhaelt: for( i = 0; i < aUnions.Count(); ++i ) @@ -813,8 +813,8 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) { if( pCell == pSttCell ) { - USHORT nWhichId = 0; - for( USHORT n = rBoxes.Count(); n; ) + sal_uInt16 nWhichId = 0; + for( sal_uInt16 n = rBoxes.Count(); n; ) if( USHRT_MAX != ( nWhichId = rBoxes[ --n ] ->GetTabBox()->IsFormulaOrValueBox() )) break; @@ -822,7 +822,7 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) // alle Boxen zusammen, nicht mehr die Zeile // pruefen, wenn eine Formel oder Value gefunden wurde bTstRow = 0 == nWhichId || USHRT_MAX == nWhichId; - bFound = TRUE; + bFound = sal_True; break; } @@ -856,7 +856,7 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) // 2. teste ob die links liegende Box Value/Formel enhaelt: if( bTstRow ) { - bFound = FALSE; + bFound = sal_False; rBoxes.Remove( 0, rBoxes.Count() ); aUnions.DeleteAndDestroy( 0, aUnions.Count() ); @@ -882,8 +882,8 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) { if( pCell == pSttCell ) { - USHORT nWhichId = 0; - for( USHORT n = rBoxes.Count(); n; ) + sal_uInt16 nWhichId = 0; + for( sal_uInt16 n = rBoxes.Count(); n; ) if( USHRT_MAX != ( nWhichId = rBoxes[ --n ] ->GetTabBox()->IsFormulaOrValueBox() )) break; @@ -891,7 +891,7 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) // alle Boxen zusammen, nicht mehr die Zeile // pruefen, wenn eine Formel oder Value gefunden wurde bFound = 0 != nWhichId && USHRT_MAX != nWhichId; - bTstRow = FALSE; + bTstRow = sal_False; break; } @@ -925,25 +925,25 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) return bFound; } -BOOL HasProtectedCells( const SwSelBoxes& rBoxes ) +sal_Bool HasProtectedCells( const SwSelBoxes& rBoxes ) { - BOOL bRet = FALSE; - for( USHORT n = 0, nCnt = rBoxes.Count(); n < nCnt; ++n ) + sal_Bool bRet = sal_False; + for( sal_uInt16 n = 0, nCnt = rBoxes.Count(); n < nCnt; ++n ) if( rBoxes[ n ]->GetFrmFmt()->GetProtect().IsCntntProtected() ) { - bRet = TRUE; + bRet = sal_True; break; } return bRet; } -_CmpLPt::_CmpLPt( const Point& rPt, const SwTableBox* pBox, BOOL bVertical ) +_CmpLPt::_CmpLPt( const Point& rPt, const SwTableBox* pBox, sal_Bool bVertical ) : aPos( rPt ), pSelBox( pBox ), bVert( bVertical ) {} void lcl_InsTblBox( SwTableNode* pTblNd, SwDoc* pDoc, SwTableBox* pBox, - USHORT nInsPos, USHORT nCnt = 1 ) + sal_uInt16 nInsPos, sal_uInt16 nCnt = 1 ) { ASSERT( pBox->GetSttNd(), "Box ohne Start-Node" ); SwCntntNode* pCNd = pDoc->GetNodes()[ pBox->GetSttIdx() + 1 ] @@ -961,25 +961,25 @@ void lcl_InsTblBox( SwTableNode* pTblNd, SwDoc* pDoc, SwTableBox* pBox, nInsPos, nCnt ); } -BOOL IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam ) +sal_Bool IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam ) { rPam.GetPoint()->nNode = *rBox.GetSttNd()->EndOfSectionNode(); rPam.Move( fnMoveBackward, fnGoCntnt ); rPam.SetMark(); rPam.GetPoint()->nNode = *rBox.GetSttNd(); rPam.Move( fnMoveForward, fnGoCntnt ); - BOOL bRet = *rPam.GetMark() == *rPam.GetPoint() + sal_Bool bRet = *rPam.GetMark() == *rPam.GetPoint() && ( rBox.GetSttNd()->GetIndex() + 1 == rPam.GetPoint()->nNode.GetIndex() ); if( bRet ) { // dann teste mal auf absatzgebundenen Flys const SwSpzFrmFmts& rFmts = *rPam.GetDoc()->GetSpzFrmFmts(); - ULONG nSttIdx = rPam.GetPoint()->nNode.GetIndex(), + sal_uLong nSttIdx = rPam.GetPoint()->nNode.GetIndex(), nEndIdx = rBox.GetSttNd()->EndOfSectionIndex(), nIdx; - for( USHORT n = 0; n < rFmts.Count(); ++n ) + for( sal_uInt16 n = 0; n < rFmts.Count(); ++n ) { const SwFmtAnchor& rAnchor = rFmts[n]->GetAnchor(); const SwPosition* pAPos = rAnchor.GetCntntAnchor(); @@ -989,7 +989,7 @@ BOOL IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam ) nSttIdx <= ( nIdx = pAPos->nNode.GetIndex() ) && nIdx < nEndIdx ) { - bRet = FALSE; + bRet = sal_False; break; } } @@ -1002,10 +1002,10 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, SwTableBox** ppMergeBox, SwUndoTblMerge* pUndo ) { if( rBoxes.Count() ) - rBoxes.Remove( USHORT(0), rBoxes.Count() ); + rBoxes.Remove( sal_uInt16(0), rBoxes.Count() ); //Zuerst lassen wir uns die Tabellen und die Rechtecke heraussuchen. - ASSERT( rPam.GetCntntNode() && rPam.GetCntntNode( FALSE ), + ASSERT( rPam.GetCntntNode() && rPam.GetCntntNode( sal_False ), "Tabselection nicht auf Cnt." ); //JP 24.09.96: Merge mit wiederholenden TabellenHeadline funktioniert nicht @@ -1015,7 +1015,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, Point aPt( 0, 0 ); const SwLayoutFrm *pStart = rPam.GetCntntNode()->GetFrm( &aPt )->GetUpper(), - *pEnd = rPam.GetCntntNode(FALSE)->GetFrm( + *pEnd = rPam.GetCntntNode(sal_False)->GetFrm( &aPt )->GetUpper(); SwSelUnions aUnions; @@ -1034,7 +1034,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, SWRECTFN( pStart->GetUpper() ) - for ( USHORT i = 0; i < aUnions.Count(); ++i ) + for ( sal_uInt16 i = 0; i < aUnions.Count(); ++i ) { const SwTabFrm *pTabFrm = aUnions[i]->GetTable(); @@ -1066,7 +1066,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, { if( ( rUnion.Right() + COLFUZZY ) < pCell->Frm().Right() ) { - USHORT nInsPos = pBox->GetUpper()-> + sal_uInt16 nInsPos = pBox->GetUpper()-> GetTabBoxes().C40_GETPOS( SwTableBox, pBox )+1; lcl_InsTblBox( pTblNd, pDoc, pBox, nInsPos ); pBox->ClaimFrmFmt(); @@ -1110,7 +1110,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, else if( ( rUnion.Left() - COLFUZZY ) >= pCell->Frm().Left() && ( rUnion.Right() + COLFUZZY ) < pCell->Frm().Right() ) { - USHORT nInsPos = pBox->GetUpper()->GetTabBoxes(). + sal_uInt16 nInsPos = pBox->GetUpper()->GetTabBoxes(). C40_GETPOS( SwTableBox, pBox )+1; lcl_InsTblBox( pTblNd, pDoc, pBox, nInsPos, 2 ); pBox->ClaimFrmFmt(); @@ -1130,7 +1130,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, { const SfxPoolItem* pItem; if( SFX_ITEM_SET == pBox->GetFrmFmt()->GetAttrSet() - .GetItemState( RES_BOX, FALSE, &pItem )) + .GetItemState( RES_BOX, sal_False, &pItem )) { SvxBoxItem aBox( *(SvxBoxItem*)pItem ); aBox.SetLine( 0, BOX_LINE_RIGHT ); @@ -1169,7 +1169,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, { // dann muss eine neue Box einfuegt und die // Breiten angepasst werden - USHORT nInsPos = pBox->GetUpper()->GetTabBoxes(). + sal_uInt16 nInsPos = pBox->GetUpper()->GetTabBoxes(). C40_GETPOS( SwTableBox, pBox )+1; lcl_InsTblBox( pTblNd, pDoc, pBox, nInsPos, 1 ); @@ -1226,7 +1226,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, // 1. Loesung: gehe ueber das Array und // alle auf der gleichen Y-Ebene werden mit Blanks getrennt // alle anderen werden als Absaetze getrennt. - BOOL bCalcWidth = TRUE; + sal_Bool bCalcWidth = sal_True; const SwTableBox* pFirstBox = aPosArr[ 0 ].pSelBox; // JP 27.03.98: Optimierung - falls die Boxen einer Line leer sind, @@ -1238,8 +1238,8 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, #if defined( DEL_ONLY_EMPTY_LINES ) nWidth = pFirstBox->GetFrmFmt()->GetFrmSize().GetWidth(); - BOOL bEmptyLine = TRUE; - USHORT n, nSttPos = 0; + sal_Bool bEmptyLine = sal_True; + sal_uInt16 n, nSttPos = 0; for( n = 0; n < aPosArr.Count(); ++n ) { @@ -1247,14 +1247,14 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, if( n && aPosArr[ n - 1 ].Y() == rPt.Y() ) // gleiche Ebene ? { if( bEmptyLine && !IsEmptyBox( *rPt.pSelBox, aPam )) - bEmptyLine = FALSE; + bEmptyLine = sal_False; if( bCalcWidth ) nWidth += rPt.pSelBox->GetFrmFmt()->GetFrmSize().GetWidth(); } else { if( bCalcWidth && n ) - bCalcWidth = FALSE; // eine Zeile fertig + bCalcWidth = sal_False; // eine Zeile fertig if( bEmptyLine && nSttPos < n ) { @@ -1262,7 +1262,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, // nicht mit Blanks aufgefuellt und als Absatz // eingefuegt werden. if( pUndo ) - for( USHORT i = nSttPos; i < n; ++i ) + for( sal_uInt16 i = nSttPos; i < n; ++i ) pUndo->SaveCollection( *aPosArr[ i ].pSelBox ); aPosArr.Remove( nSttPos, n - nSttPos ); @@ -1277,21 +1277,21 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, if( bEmptyLine && nSttPos < n ) { if( pUndo ) - for( USHORT i = nSttPos; i < n; ++i ) + for( sal_uInt16 i = nSttPos; i < n; ++i ) pUndo->SaveCollection( *aPosArr[ i ].pSelBox ); aPosArr.Remove( nSttPos, n - nSttPos ); } #elsif defined( DEL_EMPTY_BOXES_AT_START_AND_END ) nWidth = pFirstBox->GetFrmFmt()->GetFrmSize().GetWidth(); - USHORT n, nSttPos = 0, nSEndPos = 0, nESttPos = 0; + sal_uInt16 n, nSttPos = 0, nSEndPos = 0, nESttPos = 0; for( n = 0; n < aPosArr.Count(); ++n ) { const _CmpLPt& rPt = aPosArr[ n ]; if( n && aPosArr[ n - 1 ].Y() == rPt.Y() ) // gleiche Ebene ? { - BOOL bEmptyBox = IsEmptyBox( *rPt.pSelBox, aPam ); + sal_Bool bEmptyBox = IsEmptyBox( *rPt.pSelBox, aPam ); if( bEmptyBox ) { if( nSEndPos == n ) // der Anfang ist leer @@ -1306,7 +1306,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, else { if( bCalcWidth && n ) - bCalcWidth = FALSE; // eine Zeile fertig + bCalcWidth = sal_False; // eine Zeile fertig // zuerst die vom Anfang if( nSttPos < nSEndPos ) @@ -1314,10 +1314,10 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, // dann ist der vorder Teil der Line leer und braucht // nicht mit Blanks aufgefuellt werden. if( pUndo ) - for( USHORT i = nSttPos; i < nSEndPos; ++i ) + for( sal_uInt16 i = nSttPos; i < nSEndPos; ++i ) pUndo->SaveCollection( *aPosArr[ i ].pSelBox ); - USHORT nCnt = nSEndPos - nSttPos; + sal_uInt16 nCnt = nSEndPos - nSttPos; aPosArr.Remove( nSttPos, nCnt ); nESttPos -= nCnt; n -= nCnt; @@ -1328,10 +1328,10 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, // dann ist der vorder Teil der Line leer und braucht // nicht mit Blanks aufgefuellt werden. if( pUndo ) - for( USHORT i = nESttPos; i < n; ++i ) + for( sal_uInt16 i = nESttPos; i < n; ++i ) pUndo->SaveCollection( *aPosArr[ i ].pSelBox ); - USHORT nCnt = n - nESttPos; + sal_uInt16 nCnt = n - nESttPos; aPosArr.Remove( nESttPos, nCnt ); n -= nCnt; } @@ -1350,10 +1350,10 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, // dann ist der vorder Teil der Line leer und braucht // nicht mit Blanks aufgefuellt werden. if( pUndo ) - for( USHORT i = nSttPos; i < nSEndPos; ++i ) + for( sal_uInt16 i = nSttPos; i < nSEndPos; ++i ) pUndo->SaveCollection( *aPosArr[ i ].pSelBox ); - USHORT nCnt = nSEndPos - nSttPos; + sal_uInt16 nCnt = nSEndPos - nSttPos; aPosArr.Remove( nSttPos, nCnt ); nESttPos -= nCnt; n -= nCnt; @@ -1363,10 +1363,10 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, // dann ist der vorder Teil der Line leer und braucht // nicht mit Blanks aufgefuellt werden. if( pUndo ) - for( USHORT i = nESttPos; i < n; ++i ) + for( sal_uInt16 i = nESttPos; i < n; ++i ) pUndo->SaveCollection( *aPosArr[ i ].pSelBox ); - USHORT nCnt = n - nESttPos; + sal_uInt16 nCnt = n - nESttPos; aPosArr.Remove( nESttPos, nCnt ); } #else @@ -1379,7 +1379,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, aPosArr[ 0 ].Y() ) : 0; - for( USHORT n = 0; n < aPosArr.Count(); ++n ) + for( sal_uInt16 n = 0; n < aPosArr.Count(); ++n ) { const _CmpLPt& rPt = aPosArr[ n ]; if( bCalcWidth ) @@ -1387,7 +1387,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, if( nY == ( bVert ? rPt.X() : rPt.Y() ) ) // gleiche Ebene ? nWidth += rPt.pSelBox->GetFrmFmt()->GetFrmSize().GetWidth(); else - bCalcWidth = FALSE; // eine Zeile fertig + bCalcWidth = sal_False; // eine Zeile fertig } if( IsEmptyBox( *rPt.pSelBox, aPam ) ) @@ -1406,7 +1406,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, { SwTableBox* pTmpBox = rBoxes[0]; SwTableLine* pInsLine = pTmpBox->GetUpper(); - USHORT nInsPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, pTmpBox ); + sal_uInt16 nInsPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, pTmpBox ); lcl_InsTblBox( pTblNd, pDoc, pTmpBox, nInsPos ); (*ppMergeBox) = pInsLine->GetTabBoxes()[ nInsPos ]; @@ -1437,23 +1437,23 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, SwPaM aPam( aInsPos ); - for( USHORT n = 0; n < aPosArr.Count(); ++n ) + for( sal_uInt16 n = 0; n < aPosArr.Count(); ++n ) { const _CmpLPt& rPt = aPosArr[ n ]; aPam.GetPoint()->nNode.Assign( *rPt.pSelBox->GetSttNd()-> EndOfSectionNode(), -1 ); SwCntntNode* pCNd = aPam.GetCntntNode(); - USHORT nL = pCNd ? pCNd->Len() : 0; + sal_uInt16 nL = pCNd ? pCNd->Len() : 0; aPam.GetPoint()->nContent.Assign( pCNd, nL ); SwNodeIndex aSttNdIdx( *rPt.pSelBox->GetSttNd(), 1 ); // ein Node muss in der Box erhalten bleiben (sonst wird beim // Move die gesamte Section geloescht) if( pUndo ) - pDoc->DoUndo( FALSE ); + pDoc->DoUndo( sal_False ); pDoc->AppendTxtNode( *aPam.GetPoint() ); if( pUndo ) - pDoc->DoUndo( TRUE ); + pDoc->DoUndo( sal_True ); SwNodeRange aRg( aSttNdIdx, aPam.GetPoint()->nNode ); rInsPosNd++; if( pUndo ) @@ -1466,7 +1466,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, // wo steht jetzt aInsPos ?? if( bCalcWidth ) - bCalcWidth = FALSE; // eine Zeile fertig + bCalcWidth = sal_False; // eine Zeile fertig // den initialen TextNode ueberspringen rInsPosNd.Assign( pDoc->GetNodes(), @@ -1492,32 +1492,32 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, } -static BOOL lcl_CheckCol( const _FndBox*& rpFndBox, void* pPara ); +static sal_Bool lcl_CheckCol( const _FndBox*& rpFndBox, void* pPara ); -static BOOL lcl_CheckRow( const _FndLine*& rpFndLine, void* pPara ) +static sal_Bool lcl_CheckRow( const _FndLine*& rpFndLine, void* pPara ) { ((_FndLine*)rpFndLine)->GetBoxes().ForEach( &lcl_CheckCol, pPara ); - return *(BOOL*)pPara; + return *(sal_Bool*)pPara; } -static BOOL lcl_CheckCol( const _FndBox*& rpFndBox, void* pPara ) +static sal_Bool lcl_CheckCol( const _FndBox*& rpFndBox, void* pPara ) { if( !rpFndBox->GetBox()->GetSttNd() ) { if( rpFndBox->GetLines().Count() != rpFndBox->GetBox()->GetTabLines().Count() ) - *((BOOL*)pPara) = FALSE; + *((sal_Bool*)pPara) = sal_False; else ((_FndBox*)rpFndBox)->GetLines().ForEach( &lcl_CheckRow, pPara ); } // Box geschuetzt ?? else if( rpFndBox->GetBox()->GetFrmFmt()->GetProtect().IsCntntProtected() ) - *((BOOL*)pPara) = FALSE; - return *(BOOL*)pPara; + *((sal_Bool*)pPara) = sal_False; + return *(sal_Bool*)pPara; } -USHORT CheckMergeSel( const SwPaM& rPam ) +sal_uInt16 CheckMergeSel( const SwPaM& rPam ) { SwSelBoxes aBoxes; //JP 24.09.96: Merge mit wiederholenden TabellenHeadline funktioniert nicht @@ -1526,15 +1526,15 @@ USHORT CheckMergeSel( const SwPaM& rPam ) Point aPt; const SwLayoutFrm *pStart = rPam.GetCntntNode()->GetFrm( &aPt )->GetUpper(), - *pEnd = rPam.GetCntntNode(FALSE)->GetFrm( + *pEnd = rPam.GetCntntNode(sal_False)->GetFrm( &aPt )->GetUpper(); GetTblSel( pStart, pEnd, aBoxes, 0 ); return CheckMergeSel( aBoxes ); } -USHORT CheckMergeSel( const SwSelBoxes& rBoxes ) +sal_uInt16 CheckMergeSel( const SwSelBoxes& rBoxes ) { - USHORT eRet = TBLMERGE_NOSELECTION; + sal_uInt16 eRet = TBLMERGE_NOSELECTION; if( rBoxes.Count() ) { eRet = TBLMERGE_OK; @@ -1546,7 +1546,7 @@ USHORT CheckMergeSel( const SwSelBoxes& rBoxes ) &_FndLineCopyCol, &aPara ); if( aFndBox.GetLines().Count() ) { - BOOL bMergeSelOk = TRUE; + sal_Bool bMergeSelOk = sal_True; _FndBox* pFndBox = &aFndBox; _FndLine* pFndLine = 0; while( pFndBox && 1 == pFndBox->GetLines().Count() ) @@ -1651,7 +1651,7 @@ void lcl_FindStartEndRow( const SwLayoutFrm *&rpStart, aEndArr.Insert( p, 0 ); } - for( USHORT n = 0; n < aEndArr.Count() && n < aSttArr.Count(); ++n ) + for( sal_uInt16 n = 0; n < aEndArr.Count() && n < aSttArr.Count(); ++n ) if( aSttArr[ n ] != aEndArr[ n ] ) { // first unequal line or box - all odds are @@ -1876,14 +1876,14 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, const SwTabFrm *pEndTable = pEnd->FindTabFrm(); if( !pTable || !pEndTable ) return; - BOOL bExchange = FALSE; + sal_Bool bExchange = sal_False; if ( pTable != pEndTable ) { if ( !pTable->IsAnFollow( pEndTable ) ) { ASSERT( pEndTable->IsAnFollow( pTable ), "Tabkette verknotet." ); - bExchange = TRUE; + bExchange = sal_True; } } else @@ -1895,10 +1895,10 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, { if( (pStart->Frm().*fnRect->fnGetLeft)() > (pEnd->Frm().*fnRect->fnGetLeft)() ) - bExchange = TRUE; + bExchange = sal_True; } else if( bVert == ( nSttTop < nEndTop ) ) - bExchange = TRUE; + bExchange = sal_True; } if ( bExchange ) { @@ -2056,7 +2056,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, } } -BOOL CheckSplitCells( const SwCrsrShell& rShell, USHORT nDiv, +sal_Bool CheckSplitCells( const SwCrsrShell& rShell, sal_uInt16 nDiv, const SwTblSearchType eSearchType ) { if( !rShell.IsTableMode() ) @@ -2065,13 +2065,13 @@ BOOL CheckSplitCells( const SwCrsrShell& rShell, USHORT nDiv, return CheckSplitCells( *rShell.getShellCrsr(false), nDiv, eSearchType ); } -BOOL CheckSplitCells( const SwCursor& rCrsr, USHORT nDiv, +sal_Bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv, const SwTblSearchType eSearchType ) { if( 1 >= nDiv ) - return FALSE; + return sal_False; - USHORT nMinValue = nDiv * MINLAY; + sal_uInt16 nMinValue = nDiv * MINLAY; //Start- und Endzelle besorgen und den naechsten fragen. Point aPtPos, aMkPos; @@ -2083,7 +2083,7 @@ BOOL CheckSplitCells( const SwCursor& rCrsr, USHORT nDiv, } const SwLayoutFrm *pStart = rCrsr.GetCntntNode()->GetFrm( &aPtPos )->GetUpper(), - *pEnd = rCrsr.GetCntntNode(FALSE)->GetFrm( + *pEnd = rCrsr.GetCntntNode(sal_False)->GetFrm( &aMkPos )->GetUpper(); SWRECTFN( pStart->GetUpper() ) @@ -2094,7 +2094,7 @@ BOOL CheckSplitCells( const SwCursor& rCrsr, USHORT nDiv, ::MakeSelUnions( aUnions, pStart, pEnd, eSearchType ); //Jetzt zu jedem Eintrag die Boxen herausfischen und uebertragen. - for ( USHORT i = 0; i < aUnions.Count(); ++i ) + for ( sal_uInt16 i = 0; i < aUnions.Count(); ++i ) { SwSelUnion *pUnion = aUnions[i]; const SwTabFrm *pTable = pUnion->GetTable(); @@ -2116,7 +2116,7 @@ BOOL CheckSplitCells( const SwCursor& rCrsr, USHORT nDiv, if( ::IsFrmInTblSel( pUnion->GetUnion(), pCell ) ) { if( (pCell->Frm().*fnRect->fnGetWidth)() < nMinValue ) - return FALSE; + return sal_False; } if ( pCell->GetNext() ) @@ -2132,7 +2132,7 @@ BOOL CheckSplitCells( const SwCursor& rCrsr, USHORT nDiv, pRow = (const SwLayoutFrm*)pRow->GetNext(); } } - return TRUE; + return sal_True; } // ------------------------------------------------------------------- @@ -2159,7 +2159,7 @@ void lcl_InsertRow( SwTableLine &rLine, SwLayoutFrm *pUpper, SwFrm *pSibling ) } -BOOL _FndBoxCopyCol( const SwTableBox*& rpBox, void* pPara ) +sal_Bool _FndBoxCopyCol( const SwTableBox*& rpBox, void* pPara ) { _FndPara* pFndPara = (_FndPara*)pPara; _FndBox* pFndBox = new _FndBox( (SwTableBox*)rpBox, pFndPara->pFndLine ); @@ -2170,25 +2170,25 @@ BOOL _FndBoxCopyCol( const SwTableBox*& rpBox, void* pPara ) if( !pFndBox->GetLines().Count() ) { delete pFndBox; - return TRUE; + return sal_True; } } else { SwTableBoxPtr pSrch = (SwTableBoxPtr)rpBox; - USHORT nFndPos; + sal_uInt16 nFndPos; if( !pFndPara->rBoxes.Seek_Entry( pSrch, &nFndPos )) { delete pFndBox; - return TRUE; + return sal_True; } } pFndPara->pFndLine->GetBoxes().C40_INSERT( _FndBox, pFndBox, pFndPara->pFndLine->GetBoxes().Count() ); - return TRUE; + return sal_True; } -BOOL _FndLineCopyCol( const SwTableLine*& rpLine, void* pPara ) +sal_Bool _FndLineCopyCol( const SwTableLine*& rpLine, void* pPara ) { _FndPara* pFndPara = (_FndPara*)pPara; _FndLine* pFndLine = new _FndLine( (SwTableLine*)rpLine, pFndPara->pFndBox ); @@ -2201,7 +2201,7 @@ BOOL _FndLineCopyCol( const SwTableLine*& rpLine, void* pPara ) } else delete pFndLine; - return TRUE; + return sal_True; } void _FndBox::SetTableLines( const SwSelBoxes &rBoxes, const SwTable &rTable ) @@ -2213,15 +2213,15 @@ void _FndBox::SetTableLines( const SwSelBoxes &rBoxes, const SwTable &rTable ) //Line im Array der SwTable. Damit die 0 fuer 'keine Line' verwand werden //kann werden die Positionen um 1 nach oben versetzt! - USHORT nStPos = USHRT_MAX; - USHORT nEndPos= 0; + sal_uInt16 nStPos = USHRT_MAX; + sal_uInt16 nEndPos= 0; - for ( USHORT i = 0; i < rBoxes.Count(); ++i ) + for ( sal_uInt16 i = 0; i < rBoxes.Count(); ++i ) { SwTableLine *pLine = rBoxes[i]->GetUpper(); while ( pLine->GetUpper() ) pLine = pLine->GetUpper()->GetUpper(); - const USHORT nPos = rTable.GetTabLines().GetPos( + const sal_uInt16 nPos = rTable.GetTabLines().GetPos( (const SwTableLine*&)pLine ) + 1; ASSERT( nPos != USHRT_MAX, "TableLine not found." ); @@ -2251,7 +2251,7 @@ void _FndBox::SetTableLines( const SwTable &rTable ) return; SwTableLine* pTmpLine = GetLines()[0]->GetLine(); - USHORT nPos = rTable.GetTabLines().C40_GETPOS( SwTableLine, pTmpLine ); + sal_uInt16 nPos = rTable.GetTabLines().C40_GETPOS( SwTableLine, pTmpLine ); ASSERT( USHRT_MAX != nPos, "Line steht nicht in der Tabelle" ); if( nPos ) pLineBefore = rTable.GetTabLines()[ nPos - 1 ]; @@ -2265,7 +2265,7 @@ void _FndBox::SetTableLines( const SwTable &rTable ) inline void UnsetFollow( SwFlowFrm *pTab ) { - pTab->bIsFollow = FALSE; + pTab->bIsFollow = sal_False; } void _FndBox::DelFrms( SwTable &rTable ) @@ -2276,8 +2276,8 @@ void _FndBox::DelFrms( SwTable &rTable ) //Wird ein Master vernichtet, so muss der Follow Master werden. //Ein TabFrm muss immer uebrigbleiben. - USHORT nStPos = 0; - USHORT nEndPos= rTable.GetTabLines().Count() - 1; + sal_uInt16 nStPos = 0; + sal_uInt16 nEndPos= rTable.GetTabLines().Count() - 1; if( rTable.IsNewModel() && pLineBefore ) rTable.CheckRowSpan( pLineBefore, true ); if ( pLineBefore ) @@ -2297,7 +2297,7 @@ void _FndBox::DelFrms( SwTable &rTable ) --nEndPos; } - for ( USHORT i = nStPos; i <= nEndPos; ++i) + for ( sal_uInt16 i = nStPos; i <= nEndPos; ++i) { SwFrmFmt *pFmt = rTable.GetTabLines()[i]->GetFrmFmt(); SwClientIter aIter( *pFmt ); @@ -2309,12 +2309,12 @@ void _FndBox::DelFrms( SwTable &rTable ) if ( pFrm && ((SwRowFrm*)pFrm)->GetTabLine() == rTable.GetTabLines()[i] ) { - BOOL bDel = TRUE; + sal_Bool bDel = sal_True; SwTabFrm *pUp = !pFrm->GetPrev() && !pFrm->GetNext() ? (SwTabFrm*)pFrm->GetUpper() : 0; if ( !pUp ) { - const USHORT nRepeat = + const sal_uInt16 nRepeat = ((SwTabFrm*)pFrm->GetUpper())->GetTable()->GetRowsToRepeat(); if ( nRepeat > 0 && ((SwTabFrm*)pFrm->GetUpper())->IsFollow() ) @@ -2348,7 +2348,7 @@ void _FndBox::DelFrms( SwTable &rTable ) // flag from pUp to pPrev. pUp may still have the // flag set although there is not more follow flow // line associated with pUp. - pPrev->SetFollowFlowLine( FALSE ); + pPrev->SetFollowFlowLine( sal_False ); // <-- } else if ( pFollow ) @@ -2374,7 +2374,7 @@ void _FndBox::DelFrms( SwTable &rTable ) } } delete pUp; - bDel = FALSE;//Die Row wird mit in den Abgrund + bDel = sal_False;//Die Row wird mit in den Abgrund //gerissen. } } @@ -2388,7 +2388,7 @@ void _FndBox::DelFrms( SwTable &rTable ) // We do not delete the follow flow line, // this will be done automatically in the // next turn. - ((SwTabFrm*)pTabFrm)->SetFollowFlowLine( FALSE ); + ((SwTabFrm*)pTabFrm)->SetFollowFlowLine( sal_False ); } pFrm->Cut(); @@ -2400,7 +2400,7 @@ void _FndBox::DelFrms( SwTable &rTable ) } } -BOOL lcl_IsLineOfTblFrm( const SwTabFrm& rTable, const SwFrm& rChk ) +sal_Bool lcl_IsLineOfTblFrm( const SwTabFrm& rTable, const SwFrm& rChk ) { const SwTabFrm* pTblFrm = rChk.FindTabFrm(); if( pTblFrm->IsFollow() ) @@ -2426,8 +2426,8 @@ void lcl_UpdateRepeatedHeadlines( SwTabFrm& rTabFrm, bool bCalcLowers ) // Insert fresh set of headlines: pLower = (SwRowFrm*)rTabFrm.Lower(); SwTable& rTable = *rTabFrm.GetTable(); - const USHORT nRepeat = rTable.GetRowsToRepeat(); - for ( USHORT nIdx = 0; nIdx < nRepeat; ++nIdx ) + const sal_uInt16 nRepeat = rTable.GetRowsToRepeat(); + for ( sal_uInt16 nIdx = 0; nIdx < nRepeat; ++nIdx ) { SwRowFrm* pHeadline = new SwRowFrm( *rTable.GetTabLines()[ nIdx ] ); @@ -2446,8 +2446,8 @@ void _FndBox::MakeFrms( SwTable &rTable ) //wieder neu erzeugt werden. //Und Zwar fuer alle Auspraegungen der Tabelle (mehrere z.B. im Kopf/Fuss). - USHORT nStPos = 0; - USHORT nEndPos= rTable.GetTabLines().Count() - 1; + sal_uInt16 nStPos = 0; + sal_uInt16 nEndPos= rTable.GetTabLines().Count() - 1; if ( pLineBefore ) { nStPos = rTable.GetTabLines().GetPos( @@ -2477,7 +2477,7 @@ void _FndBox::MakeFrms( SwTable &rTable ) i >= 0 && !pSibling; --i ) { SwTableLine *pLine = pLineBehind ? pLineBehind : - rTable.GetTabLines()[static_cast<USHORT>(i)]; + rTable.GetTabLines()[static_cast<sal_uInt16>(i)]; SwClientIter aIter( *pLine->GetFrmFmt() ); pSibling = (SwFrm*)aIter.First( TYPE(SwFrm) ); while ( pSibling && ( @@ -2503,8 +2503,8 @@ void _FndBox::MakeFrms( SwTable &rTable ) // ???? oder das der Letzte Follow der Tabelle ???? pUpperFrm = pTable; - for ( i = nStPos; (USHORT)i <= nEndPos; ++i ) - ::lcl_InsertRow( *rTable.GetTabLines()[static_cast<USHORT>(i)], + for ( i = nStPos; (sal_uInt16)i <= nEndPos; ++i ) + ::lcl_InsertRow( *rTable.GetTabLines()[static_cast<sal_uInt16>(i)], (SwLayoutFrm*)pUpperFrm, pSibling ); if ( pUpperFrm->IsTabFrm() ) ((SwTabFrm*)pUpperFrm)->SetCalcLowers(); @@ -2517,23 +2517,23 @@ void _FndBox::MakeFrms( SwTable &rTable ) } } -void _FndBox::MakeNewFrms( SwTable &rTable, const USHORT nNumber, - const BOOL bBehind ) +void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, + const sal_Bool bBehind ) { //Frms fuer neu eingefuege Zeilen erzeugen. - //bBehind == TRUE: vor pLineBehind - // == FALSE: hinter pLineBefore - const USHORT nBfPos = pLineBefore ? + //bBehind == sal_True: vor pLineBehind + // == sal_False: hinter pLineBefore + const sal_uInt16 nBfPos = pLineBefore ? rTable.GetTabLines().GetPos( (const SwTableLine*&)pLineBefore ) : USHRT_MAX; - const USHORT nBhPos = pLineBehind ? + const sal_uInt16 nBhPos = pLineBehind ? rTable.GetTabLines().GetPos( (const SwTableLine*&)pLineBehind ) : USHRT_MAX; //nNumber: wie oft ist eingefuegt worden. //nCnt: wieviele sind nNumber mal eingefuegt worden. - const USHORT nCnt = + const sal_uInt16 nCnt = ((nBhPos != USHRT_MAX ? nBhPos : rTable.GetTabLines().Count()) - (nBfPos != USHRT_MAX ? nBfPos + 1 : 0)) / (nNumber + 1); @@ -2574,10 +2574,10 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const USHORT nNumber, pTable = pTable->GetFollow(); pUpperFrm = pTable; } - const USHORT nMax = nBhPos != USHRT_MAX ? + const sal_uInt16 nMax = nBhPos != USHRT_MAX ? nBhPos : rTable.GetTabLines().Count(); - USHORT i = nBfPos != USHRT_MAX ? nBfPos + 1 + nCnt : nCnt; + sal_uInt16 i = nBfPos != USHRT_MAX ? nBfPos + 1 + nCnt : nCnt; for ( ; i < nMax; ++i ) ::lcl_InsertRow( *rTable.GetTabLines()[i], pUpperFrm, pSibling ); @@ -2586,7 +2586,7 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const USHORT nNumber, } else //davor einfuegen { - USHORT i; + sal_uInt16 i; // We are looking for the frame that is behind the row frame // that should be inserted. @@ -2622,7 +2622,7 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const USHORT nNumber, if ( pLineBefore ) pSibling = pSibling->GetNext(); - USHORT nMax = nBhPos != USHRT_MAX ? + sal_uInt16 nMax = nBhPos != USHRT_MAX ? nBhPos - nCnt : rTable.GetTabLines().Count() - nCnt; @@ -2638,7 +2638,7 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const USHORT nNumber, //Die Headlines mussen ggf. auch verarbeitet werden. Um gut arbeitenden //Code nicht zu zerfasern wird hier nochmals iteriert. - const USHORT nRowsToRepeat = rTable.GetRowsToRepeat(); + const sal_uInt16 nRowsToRepeat = rTable.GetRowsToRepeat(); if ( nRowsToRepeat > 0 && ( ( !bBehind && ( nBfPos == USHRT_MAX || nBfPos + 1 < nRowsToRepeat ) ) || ( bBehind && ( ( nBfPos == USHRT_MAX && nRowsToRepeat > 1 ) || nBfPos + 2 < nRowsToRepeat ) ) ) ) @@ -2660,14 +2660,14 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const USHORT nNumber, } } -BOOL _FndBox::AreLinesToRestore( const SwTable &rTable ) const +sal_Bool _FndBox::AreLinesToRestore( const SwTable &rTable ) const { //Lohnt es sich MakeFrms zu rufen? if ( !pLineBefore && !pLineBehind && rTable.GetTabLines().Count() ) - return TRUE; + return sal_True; - USHORT nBfPos; + sal_uInt16 nBfPos; if(pLineBefore) { const SwTableLine* rLBefore = (const SwTableLine*)pLineBefore; @@ -2676,7 +2676,7 @@ BOOL _FndBox::AreLinesToRestore( const SwTable &rTable ) const else nBfPos = USHRT_MAX; - USHORT nBhPos; + sal_uInt16 nBhPos; if(pLineBehind) { const SwTableLine* rLBehind = (const SwTableLine*)pLineBehind; @@ -2687,8 +2687,8 @@ BOOL _FndBox::AreLinesToRestore( const SwTable &rTable ) const if ( nBfPos == nBhPos ) //Duerfte eigentlich nie vorkommen. { - ASSERT( FALSE, "Table, Loeschen auf keinem Bereich !?!" ); - return FALSE; + ASSERT( sal_False, "Table, Loeschen auf keinem Bereich !?!" ); + return sal_False; } if ( rTable.GetRowsToRepeat() > 0 ) @@ -2709,19 +2709,19 @@ BOOL _FndBox::AreLinesToRestore( const SwTable &rTable ) const // Some adjacent lines at the beginning of the table have been deleted: if ( nBfPos == USHRT_MAX && nBhPos == 0 ) - return FALSE; + return sal_False; // Some adjacent lines at the end of the table have been deleted: if ( nBhPos == USHRT_MAX && nBfPos == (rTable.GetTabLines().Count() - 1) ) - return FALSE; + return sal_False; // Some adjacent lines in the middle of the table have been deleted: if ( nBfPos != USHRT_MAX && nBhPos != USHRT_MAX && (nBfPos + 1) == nBhPos ) - return FALSE; + return sal_False; // The structure of the deleted lines is more complex due to split lines. // A call of MakeFrms() is necessary. - return TRUE; + return sal_True; } |