diff options
Diffstat (limited to 'sw/source/core/frmedt')
-rw-r--r-- | sw/source/core/frmedt/fecopy.cxx | 98 | ||||
-rw-r--r-- | sw/source/core/frmedt/fedesc.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/frmedt/fefly1.cxx | 88 | ||||
-rw-r--r-- | sw/source/core/frmedt/feflyole.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/frmedt/feshview.cxx | 166 | ||||
-rw-r--r-- | sw/source/core/frmedt/fetab.cxx | 154 | ||||
-rw-r--r-- | sw/source/core/frmedt/fews.cxx | 62 | ||||
-rw-r--r-- | sw/source/core/frmedt/tblsel.cxx | 66 |
8 files changed, 322 insertions, 322 deletions
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index d1ca9d1b2ddb..9bf9f4fb0520 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -77,7 +77,7 @@ using namespace ::com::sun::star; // Copy for the internal clipboard. Copies all selections to the clipboard. -sal_Bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpTxt ) +bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpTxt ) { OSL_ENSURE( pClpDoc, "kein Clipboard-Dokument" ); @@ -110,12 +110,12 @@ sal_Bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpTxt ) if( pNewClpTxt ) { pTxtNd->InsertText( *pNewClpTxt, SwIndex( pTxtNd ) ); - return sal_True; // das wars. + return true; // das wars. } pClpDoc->LockExpFlds(); pClpDoc->SetRedlineMode_intern( nsRedlineMode_t::REDLINE_DELETE_REDLINES ); - sal_Bool bRet; + bool bRet; // do we want to copy a FlyFrame? if( IsFrmSelected() ) @@ -167,7 +167,7 @@ sal_Bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpTxt ) pTxtNd->EraseText( rIdx, 1 ); } } - bRet = sal_True; + bRet = true; } else if ( IsObjSelected() ) { @@ -208,7 +208,7 @@ sal_Bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpTxt ) pClpDoc->CopyLayoutFmt( *pFmt, aAnchor, true, true ); } } - bRet = sal_True; + bRet = true; } else bRet = _CopySelToDoc( pClpDoc, 0 ); // copy the selections @@ -237,17 +237,17 @@ static const Point &lcl_FindBasePos( const SwFrm *pFrm, const Point &rPt ) return pFrm->Frm().Pos(); } -static sal_Bool lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrm* pFly, +static bool lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrm* pFly, const Point& rInsPt, SwFEShell& rDestShell, SwFmtAnchor& rAnchor, Point& rNewPos, bool bCheckFlyRecur ) { - sal_Bool bRet = sal_True; + bool bRet = true; rAnchor.SetAnchor( &rPos ); SwCntntFrm* pTmpFrm = rNd.GetCntntNode()->getLayoutFrm( rDestShell.GetLayout(), &rInsPt, 0, false ); SwFlyFrm *pTmpFly = pTmpFrm->FindFlyFrm(); if( pTmpFly && bCheckFlyRecur && pFly->IsUpperOf( *pTmpFly ) ) { - bRet = sal_False; + bRet = false; } else if ( FLY_AT_FLY == rAnchor.GetAnchorId() ) { @@ -271,10 +271,10 @@ static sal_Bool lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyF return bRet; } -sal_Bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, - const Point& rInsPt, sal_Bool bIsMove, sal_Bool bSelectInsert ) +bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, + const Point& rInsPt, bool bIsMove, bool bSelectInsert ) { - sal_Bool bRet = sal_True; + bool bRet = true; // The list should be copied, because below new objects will be selected const SdrMarkList aMrkList( Imp()->GetDrawView()->GetMarkedObjectList() ); @@ -339,7 +339,7 @@ sal_Bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, GetLayout()->GetCrsrOfst( &aPos, aPt, &aState ); const SwNode *pNd; if( (pNd = &aPos.nNode.GetNode())->IsNoTxtNode() ) - bRet = sal_False; + bRet = false; else bRet = ::lcl_SetAnchor( aPos, *pNd, 0, rInsPt, *pDestShell, aAnchor, aNewAnch, false ); @@ -348,7 +348,7 @@ sal_Bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, { SwPaM *pCrsr = pDestShell->GetCrsr(); if( pCrsr->GetNode()->IsNoTxtNode() ) - bRet = sal_False; + bRet = false; else bRet = ::lcl_SetAnchor( *pCrsr->GetPoint(), *pCrsr->GetNode(), 0, rInsPt, @@ -435,10 +435,10 @@ sal_Bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, return bRet; } -sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, - const Point& rInsPt, sal_Bool bIsMove, sal_Bool bSelectInsert ) +bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, + const Point& rInsPt, bool bIsMove, bool bSelectInsert ) { - sal_Bool bRet = sal_False; + bool bRet = false; OSL_ENSURE( pDestShell, "Copy without DestShell." ); OSL_ENSURE( this == pDestShell || !pDestShell->IsObjSelected(), @@ -450,7 +450,7 @@ sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, pDestShell->GetDoc()->LockExpFlds(); // Shift references - sal_Bool bCopyIsMove = mpDoc->IsCopyIsMove(); + bool bCopyIsMove = mpDoc->IsCopyIsMove(); if( bIsMove ) // set a flag in Doc, handled in TextNodes mpDoc->SetCopyIsMove( true ); @@ -468,7 +468,7 @@ sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, SwFlyFrm* pFly = FindFlyFrm(); SwFrmFmt* pFlyFmt = pFly->GetFmt(); SwFmtAnchor aAnchor( pFlyFmt->GetAnchor() ); - bRet = sal_True; + bRet = true; Point aNewAnch; if ((FLY_AT_PARA == aAnchor.GetAnchorId()) || @@ -487,7 +487,7 @@ sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, GetLayout()->GetCrsrOfst( &aPos, aPt, &aState ); const SwNode *pNd; if( (pNd = &aPos.nNode.GetNode())->IsNoTxtNode() ) - bRet = sal_False; + bRet = false; else { // do not copy in itself @@ -495,7 +495,7 @@ sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, if ( aPos.nNode > *pTmp && aPos.nNode < pTmp->GetNode().EndOfSectionIndex() ) { - bRet = sal_False; + bRet = false; } else bRet = ::lcl_SetAnchor( aPos, *pNd, pFly, rInsPt, @@ -506,7 +506,7 @@ sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, { const SwPaM *pCrsr = pDestShell->GetCrsr(); if( pCrsr->GetNode()->IsNoTxtNode() ) - bRet = sal_False; + bRet = false; else bRet = ::lcl_SetAnchor( *pCrsr->GetPoint(), *pCrsr->GetNode(), pFly, rInsPt, *pDestShell, aAnchor, @@ -547,12 +547,12 @@ sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, // only select if it can be shifted/copied in the same shell if( bSelectInsert ) { - SwFlyFrm* pFlyFrm = ((SwFlyFrmFmt*)pFlyFmt)->GetFrm( &aPt, sal_False ); + SwFlyFrm* pFlyFrm = ((SwFlyFrmFmt*)pFlyFmt)->GetFrm( &aPt, false ); if( pFlyFrm ) { //JP 12.05.98: should this be in SelectFlyFrm??? pDestShell->Imp()->GetDrawView()->UnmarkAll(); - pDestShell->SelectFlyFrm( *pFlyFrm, sal_True ); + pDestShell->SelectFlyFrm( *pFlyFrm, true ); } } @@ -584,12 +584,12 @@ sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, Point aPt( rInsPt ); GetLayout()->GetCrsrOfst( pDstPos, aPt ); if( !pDstPos->nNode.GetNode().IsNoTxtNode() ) - bRet = sal_True; + bRet = true; } else if( !pDestShell->GetCrsr()->GetNode()->IsNoTxtNode() ) { pDstPos = new SwPosition( *pDestShell->GetCrsr()->GetPoint() ); - bRet = sal_True; + bRet = true; } if( bRet ) @@ -620,7 +620,7 @@ sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, } else { - bRet = sal_True; + bRet = true; if( this == pDestShell ) { // same shell? then request the position @@ -631,7 +631,7 @@ sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, bRet = !aPos.nNode.GetNode().IsNoTxtNode(); } else if( pDestShell->GetCrsr()->GetNode()->IsNoTxtNode() ) - bRet = sal_False; + bRet = false; if( bRet ) bRet = 0 != SwEditShell::Copy( pDestShell ); @@ -667,7 +667,7 @@ namespace { typedef std::pair< PaMPtr, PositionPtr > Insertion; } -sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames ) +bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) { SET_CURR_SHELL( this ); OSL_ENSURE( pClpDoc, "no clipboard document" ); @@ -694,7 +694,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames ) aCpyPam.SetMark(); aCpyPam.Move( fnMoveForward, fnGoDoc ); - sal_Bool bRet = sal_True, bDelTbl = sal_True; + bool bRet = true, bDelTbl = true; StartAllAction(); GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_INSGLOSSARY, NULL ); GetDoc()->LockExpFlds(); @@ -853,7 +853,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames ) } bRet = GetDoc()->InsCopyOfTbl( aDestPos, aBoxes, &pSrcNd->GetTable(), - sal_False, sal_False ); + false, false ); if( bParkTblCrsr ) GetCrsr(); @@ -967,9 +967,9 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames ) { const Point aPt( GetCrsrDocPos() ); SwFlyFrm* pFlyFrm = ((SwFlyFrmFmt*)pNew)-> - GetFrm( &aPt, sal_False ); + GetFrm( &aPt, false ); if( pFlyFrm ) - SelectFlyFrm( *pFlyFrm, sal_True ); + SelectFlyFrm( *pFlyFrm, true ); // always pick the first FlyFrame only; the others // were copied to the clipboard via Fly in Fly break; @@ -1003,7 +1003,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames ) if( bDelTbl && IsTableMode() ) { SwEditShell::Delete(); - bDelTbl = sal_False; + bDelTbl = false; } SwPosition& rInsPos = *PCURCRSR->GetPoint(); @@ -1108,25 +1108,25 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames ) return bRet; } -sal_Bool SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt16 nEndPage) +bool SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt16 nEndPage) { Push(); if(!GotoPage(nStartPage)) { - Pop(sal_False); - return sal_False; + Pop(false); + return false; } MovePage( fnPageCurr, fnPageStart ); SwPaM aCpyPam( *GetCrsr()->GetPoint() ); OUString sStartingPageDesc = GetPageDesc( GetCurPageDesc()).GetName(); - SwPageDesc* pDesc = rToFill.FindPageDescByName( sStartingPageDesc, sal_True ); + SwPageDesc* pDesc = rToFill.FindPageDescByName( sStartingPageDesc, true ); if( pDesc ) rToFill.ChgCurPageDesc( *pDesc ); if(!GotoPage(nEndPage)) { - Pop(sal_False); - return sal_False; + Pop(false); + return false; } //if the page starts with a table a paragraph has to be inserted before SwNode* pTableNode = aCpyPam.GetNode()->FindTableNode(); @@ -1189,17 +1189,17 @@ sal_Bool SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_u } GetDoc()->UnlockExpFlds(); GetDoc()->UpdateFlds(NULL, false); - Pop(sal_False); + Pop(false); EndAllAction(); - return sal_True; + return true; } -sal_Bool SwFEShell::GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const +bool SwFEShell::GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const { OSL_ENSURE( Imp()->HasDrawView(), "GetDrawObjGraphic without DrawView?" ); const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - sal_Bool bConvert = sal_True; + bool bConvert = true; if( rMrkList.GetMarkCount() ) { if( rMrkList.GetMarkCount() == 1 && @@ -1217,7 +1217,7 @@ sal_Bool SwFEShell::GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const if( GRAPHIC_BITMAP != aGrf.GetType() ) { rGrf = aGrf; - bConvert = sal_False; + bConvert = false; } else if( GetWin() ) { @@ -1244,7 +1244,7 @@ sal_Bool SwFEShell::GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const else if( GRAPHIC_BITMAP == aGrf.GetType() ) { rGrf = aGrf; - bConvert = sal_False; + bConvert = false; } else { @@ -1264,7 +1264,7 @@ sal_Bool SwFEShell::GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const else { rGrf = aGrf; - bConvert = sal_False; + bConvert = false; } } } @@ -1496,7 +1496,7 @@ void SwFEShell::Paste( SvStream& rStrm, sal_uInt16 nAction, const Point* pPt ) { ::sw::DrawUndoGuard drawUndoGuard(GetDoc()->GetIDocumentUndoRedo()); - sal_Bool bDesignMode = pView->IsDesignMode(); + bool bDesignMode = pView->IsDesignMode(); if( !bDesignMode ) pView->SetDesignMode( true ); @@ -1522,7 +1522,7 @@ void SwFEShell::Paste( SvStream& rStrm, sal_uInt16 nAction, const Point* pPt ) if( pObj->ISA( SdrUnoObj ) ) { pObj->SetLayer( GetDoc()->GetControlsId() ); - bDesignMode = sal_True; + bDesignMode = true; } else pObj->SetLayer( GetDoc()->GetHeavenId() ); @@ -1545,7 +1545,7 @@ bool SwFEShell::Paste(const Graphic &rGrf, const OUString& rURL) SdrObject* pObj = 0; SdrView *pView = Imp()->GetDrawView(); - sal_Bool bRet = 1 == pView->GetMarkedObjectList().GetMarkCount() && + bool bRet = 1 == pView->GetMarkedObjectList().GetMarkCount() && (pObj = pView->GetMarkedObjectList().GetMark( 0 )->GetMarkedSdrObj())->IsClosedObj() && !pObj->ISA( SdrOle2Obj ); diff --git a/sw/source/core/frmedt/fedesc.cxx b/sw/source/core/frmedt/fedesc.cxx index d374699e5c08..50c757141d77 100644 --- a/sw/source/core/frmedt/fedesc.cxx +++ b/sw/source/core/frmedt/fedesc.cxx @@ -121,7 +121,7 @@ const SwPageDesc& SwFEShell::GetPageDesc( sal_uInt16 i ) const } SwPageDesc* SwFEShell::FindPageDescByName( const OUString& rName, - sal_Bool bGetFromPool, + bool bGetFromPool, sal_uInt16* pPos ) { SwPageDesc* pDesc = GetDoc()->FindPageDescByName( rName, pPos ); @@ -158,7 +158,7 @@ sal_uInt16 SwFEShell::GetMousePageDesc( const Point &rPt ) const return 0; } -sal_uInt16 SwFEShell::GetCurPageDesc( const sal_Bool bCalcFrm ) const +sal_uInt16 SwFEShell::GetCurPageDesc( const bool bCalcFrm ) const { const SwFrm *pFrm = GetCurrFrm( bCalcFrm ); if ( pFrm ) diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index d46ba5a71c88..d7300e0f0310 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -95,14 +95,14 @@ static bool lcl_SetNewFlyPos( const SwNode& rNode, SwFmtAnchor& rAnchor, return bRet; } -static sal_Bool lcl_FindAnchorPos( +static bool lcl_FindAnchorPos( SwEditShell& rEditShell, SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm, SfxItemSet& rSet ) { - sal_Bool bRet = sal_True; + bool bRet = true; SwFmtAnchor aNewAnch( (SwFmtAnchor&)rSet.Get( RES_ANCHOR ) ); RndStdIds nNew = aNewAnch.GetAnchorId(); const SwFrm *pNewAnch; @@ -122,7 +122,7 @@ static sal_Bool lcl_FindAnchorPos( pNewAnch = ::FindAnchor( pFrm, aTmpPnt ); if( pNewAnch->IsProtected() ) { - bRet = sal_False; + bRet = false; break; } @@ -192,7 +192,7 @@ static sal_Bool lcl_FindAnchorPos( //! also used in unoframe.cxx -sal_Bool sw_ChkAndSetNewAnchor( +bool sw_ChkAndSetNewAnchor( SwEditShell& rEditShell, const SwFlyFrm& rFly, SfxItemSet& rSet ) @@ -204,7 +204,7 @@ sal_Bool sw_ChkAndSetNewAnchor( RndStdIds nNew = ((SwFmtAnchor&)rSet.Get( RES_ANCHOR )).GetAnchorId(); if( nOld == nNew ) - return sal_False; + return false; SwDoc* pDoc = (SwDoc*)rFmt.GetDoc(); @@ -218,7 +218,7 @@ sal_Bool sw_ChkAndSetNewAnchor( return ::lcl_FindAnchorPos( rEditShell, *pDoc, rFly.Frm().Pos(), rFly, rSet ); } -void SwFEShell::SelectFlyFrm( SwFlyFrm& rFrm, sal_Bool bNew ) +void SwFEShell::SelectFlyFrm( SwFlyFrm& rFrm, bool bNew ) { SET_CURR_SHELL( this ); @@ -280,7 +280,7 @@ const SwFrmFmt* SwFEShell::IsFlyInFly() const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); if ( !rMrkList.GetMarkCount() ) { - SwCntntFrm *pCntnt = GetCurrFrm( sal_False ); + SwCntntFrm *pCntnt = GetCurrFrm( false ); if( !pCntnt ) return NULL; SwFlyFrm *pFly = pCntnt->FindFlyFrm(); @@ -331,7 +331,7 @@ void SwFEShell::SetFlyPos( const Point& rAbsPos ) SET_CURR_SHELL( this ); // Determine reference point in document coordinates - SwCntntFrm *pCntnt = GetCurrFrm( sal_False ); + SwCntntFrm *pCntnt = GetCurrFrm( false ); if( !pCntnt ) return; SwFlyFrm *pFly = pCntnt->FindFlyFrm(); @@ -360,7 +360,7 @@ void SwFEShell::SetFlyPos( const Point& rAbsPos ) CallChgLnk(); // call the AttrChangeNotify on the UI-side. } -Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt ) +Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt ) { Point aRet; @@ -383,7 +383,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt ) if ( FLY_AS_CHAR == nAnchorId ) return aRet; - sal_Bool bFlyFrame = pObj->ISA(SwVirtFlyDrawObj); + bool bFlyFrame = pObj->ISA(SwVirtFlyDrawObj); SwFlyFrm* pFly = 0L; const SwFrm* pOldAnch; @@ -392,7 +392,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt ) if( bFlyFrame ) { // Calculate reference point in document coordinates - SwCntntFrm *pCntnt = GetCurrFrm( sal_False ); + SwCntntFrm *pCntnt = GetCurrFrm( false ); if( !pCntnt ) return aRet; pFly = pCntnt->FindFlyFrm(); @@ -411,7 +411,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt ) // Necessary for moving 'anchor symbol' at the user interface inside header/footer. else if ( !::CheckControlLayer( pObj ) ) { - SwCntntFrm *pCntnt = GetCurrFrm( sal_False ); + SwCntntFrm *pCntnt = GetCurrFrm( false ); if( !pCntnt ) return aRet; pFooterOrHeader = pCntnt->FindFooterOrHeader(); @@ -564,7 +564,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt ) return aRet; } -const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchValid, +const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, bool bAnchValid, SwFrmFmt *pParent ) { SET_CURR_SHELL( this ); @@ -574,7 +574,7 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali const Point aPt( GetCrsrDocPos() ); SwSelBoxes aBoxes; - sal_Bool bMoveCntnt = sal_True; + bool bMoveCntnt = true; if( IsTableMode() ) { GetTblSel( *this, aBoxes ); @@ -592,10 +592,10 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali pCrsr = GetCrsr(); } else - bMoveCntnt = sal_False; + bMoveCntnt = false; } else if( !pCrsr->HasMark() && pCrsr->GetNext() == pCrsr ) - bMoveCntnt = sal_False; + bMoveCntnt = false; const SwPosition& rPos = *pCrsr->Start(); @@ -678,7 +678,7 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali // chaos::anchor should not lie in the shifted area pRet->DelFrms(); - const SwFrm* pAnch = ::FindAnchor( GetLayout(), aPt, sal_False ); + const SwFrm* pAnch = ::FindAnchor( GetLayout(), aPt, false ); SwPosition aPos( *((SwCntntFrm*)pAnch)->GetNode() ); if ( FLY_AS_CHAR == eRndId ) { @@ -725,7 +725,7 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali { SwFlyFrm* pFrm = pRet->GetFrm( &aPt ); if( pFrm ) - SelectFlyFrm( *pFrm, sal_True ); + SelectFlyFrm( *pFrm, true ); else { GetLayout()->SetAssertFlyPages(); @@ -814,7 +814,7 @@ void SwFEShell::Insert( const OUString& rGrfName, const OUString& rFltName, pPageFrm->InvalidateFlyLayout(); pPageFrm->InvalidateCntnt(); - SelectFlyFrm( *pFrm, sal_True ); + SelectFlyFrm( *pFrm, true ); } else GetLayout()->SetAssertFlyPages(); @@ -843,7 +843,7 @@ SwFlyFrmFmt* SwFEShell::InsertObject( const svt::EmbeddedObjectRef& xObj, SwFlyFrm* pFrm = pFmt->GetFrm( &aPt ); if( pFrm ) - SelectFlyFrm( *pFrm, sal_True ); + SelectFlyFrm( *pFrm, true ); else GetLayout()->SetAssertFlyPages(); } @@ -963,7 +963,7 @@ void SwFEShell::SetPageObjsNewPage( std::vector<SwFrmFmt*>& rFillArr, int nOffse // All attributes in the "baskets" will be filled with the attributes of the // current FlyFrms. Attributes which cannot be filled due to being at the // wrong place or which are ambiguous (multiple selections) will be removed. -sal_Bool SwFEShell::GetFlyFrmAttr( SfxItemSet &rSet ) const +bool SwFEShell::GetFlyFrmAttr( SfxItemSet &rSet ) const { SwFlyFrm *pFly = FindFlyFrm(); if ( !pFly ) @@ -972,20 +972,20 @@ sal_Bool SwFEShell::GetFlyFrmAttr( SfxItemSet &rSet ) const if ( !pCurrFrm ) { OSL_FAIL( "<SwFEShell::GetFlyFrmAttr(..)> - missing current frame. This is a serious defect, please inform OD." ); - return sal_False; + return false; } pFly = GetCurrFrm()->FindFlyFrm(); if ( !pFly ) { OSL_ENSURE( !this, "GetFlyFrmAttr, no Fly selected." ); - return sal_False; + return false; } } SET_CURR_SHELL( (SwViewShell*)this ); if( !rSet.Set( pFly->GetFmt()->GetAttrSet(), true ) ) - return sal_False; + return false; // now examine all attributes. Remove forbidden attributes, then // get all remaining attributes and enter them @@ -1012,7 +1012,7 @@ sal_Bool SwFEShell::GetFlyFrmAttr( SfxItemSet &rSet ) const rSet.ClearItem( RES_CNTNT ); //MA: remove first (Template by example etc.) rSet.ClearItem( RES_CHAIN ); - return sal_True; + return true; } // Attributes of the current fly will change. @@ -1044,7 +1044,7 @@ bool SwFEShell::SetFlyFrmAttr( SfxItemSet& rSet ) bRet = true; SwFlyFrm* pFrm = pFlyFmt->GetFrm( &aPt ); if( pFrm ) - SelectFlyFrm( *pFrm, sal_True ); + SelectFlyFrm( *pFrm, true ); else GetLayout()->SetAssertFlyPages(); } @@ -1055,9 +1055,9 @@ bool SwFEShell::SetFlyFrmAttr( SfxItemSet& rSet ) return bRet; } -sal_Bool SwFEShell::SetDrawingAttr( SfxItemSet& rSet ) +bool SwFEShell::SetDrawingAttr( SfxItemSet& rSet ) { - sal_Bool bRet = sal_False; + bool bRet = false; SET_CURR_SHELL( this ); if ( !rSet.Count() || !Imp()->HasDrawView() ) @@ -1085,7 +1085,7 @@ sal_Bool SwFEShell::SetDrawingAttr( SfxItemSet& rSet ) if( GetDoc()->SetFlyFrmAttr( *pFmt, rSet )) { - bRet = sal_True; + bRet = true; Point aTmp; SelectObj( aTmp, 0, pObj ); } @@ -1095,9 +1095,9 @@ sal_Bool SwFEShell::SetDrawingAttr( SfxItemSet& rSet ) } // Reset requested attributes or the ones contained in the set. -sal_Bool SwFEShell::ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet ) +bool SwFEShell::ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( RES_ANCHOR != nWhich && RES_CHAIN != nWhich && RES_CNTNT != nWhich ) { @@ -1131,7 +1131,7 @@ sal_Bool SwFEShell::ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet ) else pFly->GetFmt()->ResetFmtAttr( nWhich ); - bRet = sal_True; + bRet = true; EndAllActionAndCall(); GetDoc()->SetModified(); } @@ -1173,7 +1173,7 @@ void SwFEShell::SetFrmFmt( SwFrmFmt *pNewFmt, bool bKeepOrient, Point* pDocPos ) SfxItemSet* pSet = 0; const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pNewFmt->GetItemState( RES_ANCHOR, sal_False, &pItem )) + if( SFX_ITEM_SET == pNewFmt->GetItemState( RES_ANCHOR, false, &pItem )) { pSet = new SfxItemSet( GetDoc()->GetAttrPool(), aFrmFmtSetRange ); pSet->Put( *pItem ); @@ -1185,7 +1185,7 @@ void SwFEShell::SetFrmFmt( SwFrmFmt *pNewFmt, bool bKeepOrient, Point* pDocPos ) { SwFlyFrm* pFrm = pFlyFmt->GetFrm( &aPt ); if( pFrm ) - SelectFlyFrm( *pFrm, sal_True ); + SelectFlyFrm( *pFrm, true ); else GetLayout()->SetAssertFlyPages(); } @@ -1223,7 +1223,7 @@ SwFrmFmt* SwFEShell::GetFlyFrmFmt() SwRect SwFEShell::GetFlyRect() const { - SwCntntFrm *pCntnt = GetCurrFrm( sal_False ); + SwCntntFrm *pCntnt = GetCurrFrm( false ); SwFlyFrm *pFly = pCntnt ? pCntnt->FindFlyFrm() : 0; if ( !pFly ) { @@ -1267,8 +1267,8 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < aResult = pFly->Prt().SSize(); - sal_Bool bPosProt = pFly->GetFmt()->GetProtect().IsPosProtected(); - sal_Bool bSizeProt = pFly->GetFmt()->GetProtect().IsSizeProtected(); + bool bPosProt = pFly->GetFmt()->GetProtect().IsPosProtected(); + bool bSizeProt = pFly->GetFmt()->GetProtect().IsSizeProtected(); StartAllAction(); @@ -1395,7 +1395,7 @@ SwFrmFmt* SwFEShell::WizzardGetFly() for( sal_uInt16 n = 0; n < nCnt; ++n ) { SwFrmFmt* pFmt = rSpzArr[ n ]; - const SwNodeIndex* pIdx = pFmt->GetCntnt( sal_False ).GetCntntIdx(); + const SwNodeIndex* pIdx = pFmt->GetCntnt( false ).GetCntntIdx(); SwStartNode* pSttNd; if( pIdx && 0 != ( pSttNd = pIdx->GetNode().GetStartNode() ) && @@ -1522,7 +1522,7 @@ const SwFrmFmt* SwFEShell::IsURLGrfAtPos( const Point& rPt, OUString* pURL, } const Graphic *SwFEShell::GetGrfAtPos( const Point &rPt, - OUString &rName, sal_Bool &rbLink ) const + OUString &rName, bool &rbLink ) const { if( !Imp()->HasDrawView() ) return 0; @@ -1545,7 +1545,7 @@ const Graphic *SwFEShell::GetGrfAtPos( const Point &rPt, ::sfx2::SvLinkSource* pLnkObj = pNd->GetLink()->GetObj(); if( pLnkObj && pLnkObj->IsPending() ) return 0; - rbLink = sal_True; + rbLink = true; } pNd->GetFileFilterNms( &rName, 0 ); @@ -1735,12 +1735,12 @@ ObjCntType SwFEShell::GetObjCntTypeOfSelection( SdrObject** ppObj ) const return eType; } -sal_Bool SwFEShell::ReplaceSdrObj( const OUString& rGrfName, const OUString& rFltName, +bool SwFEShell::ReplaceSdrObj( const OUString& rGrfName, const OUString& rFltName, const Graphic* pGrf ) { SET_CURR_SHELL( this ); - sal_Bool bRet = sal_False; + bool bRet = false; const SdrMarkList *pMrkList; if( Imp()->HasDrawView() && 1 == ( pMrkList = &Imp()->GetDrawView()->GetMarkedObjectList())->GetMarkCount() ) @@ -1786,7 +1786,7 @@ sal_Bool SwFEShell::ReplaceSdrObj( const OUString& rGrfName, const OUString& rFl EndUndo(); EndAllAction(); - bRet = sal_True; + bRet = true; } return bRet; } @@ -1811,7 +1811,7 @@ static sal_uInt16 SwFmtGetPageNum(const SwFlyFrmFmt * pFmt) void SwFEShell::GetConnectableFrmFmts(SwFrmFmt & rFmt, const OUString & rReference, - sal_Bool bSuccessors, + bool bSuccessors, ::std::vector< OUString > & aPrevPageVec, ::std::vector< OUString > & aThisPageVec, ::std::vector< OUString > & aNextPageVec, diff --git a/sw/source/core/frmedt/feflyole.cxx b/sw/source/core/frmedt/feflyole.cxx index d551c8e210ad..e7f34c580e67 100644 --- a/sw/source/core/frmedt/feflyole.cxx +++ b/sw/source/core/frmedt/feflyole.cxx @@ -108,13 +108,13 @@ void SwFEShell::MakeObjVisible( const uno::Reference < embed::XEmbeddedObject >& } } -sal_Bool SwFEShell::FinishOLEObj() // Server is terminated +bool SwFEShell::FinishOLEObj() // Server is terminated { SfxInPlaceClient* pIPClient = GetSfxViewShell()->GetIPClient(); if ( !pIPClient ) - return sal_False; + return false; - sal_Bool bRet = pIPClient->IsObjectInPlaceActive(); + 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 60bfeb07630c..367b64c95d3e 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -123,23 +123,23 @@ extern bool bNoInterrupt; // in swapp.cxx // --> assure consistent cursor pSh->KillPams(); pSh->ClearMark(); - pSh->SetCrsr( pSh->Imp()->GetDrawView()->GetAllMarkedRect().TopLeft(), sal_True); + pSh->SetCrsr( pSh->Imp()->GetDrawView()->GetAllMarkedRect().TopLeft(), true); } } -sal_Bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj ) +bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj ) { SwDrawView *pDView = Imp()->GetDrawView(); if(!pDView) - return sal_False; + return false; SET_CURR_SHELL( this ); StartAction(); // action is necessary to assure only one AttrChgdNotify // (e.g. due to Unmark->MarkListHasChgd) arrives const SdrMarkList &rMrkList = pDView->GetMarkedObjectList(); const bool bHadSelection = rMrkList.GetMarkCount(); - const sal_Bool bAddSelect = 0 != (SW_ADD_SELECT & nFlag); - const sal_Bool bEnterGroup = 0 != (SW_ENTER_GROUP & nFlag); + const bool bAddSelect = 0 != (SW_ADD_SELECT & nFlag); + const bool bEnterGroup = 0 != (SW_ENTER_GROUP & nFlag); SwFlyFrm* pOldSelFly = 0; const Point aOldPos( pDView->GetAllMarkedRect().TopLeft() ); @@ -167,10 +167,10 @@ sal_Bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pOb Point aPt( pOldSelFly->Frm().Pos() ); aPt.setX(aPt.getX() - 1); bool bUnLockView = !IsViewLocked(); - LockView( sal_True ); - SetCrsr( aPt, sal_True ); + LockView( true ); + SetCrsr( aPt, true ); if( bUnLockView ) - LockView( sal_False ); + LockView( false ); } if ( nType & CNT_GRF && ((SwNoTxtFrm*)pOldSelFly->Lower())->HasAnimation() ) @@ -199,7 +199,7 @@ sal_Bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pOb pDView->MarkObj( rPt, MINMOVE, bAddSelect, bEnterGroup ); } - const sal_Bool bRet = 0 != rMrkList.GetMarkCount(); + const bool bRet = 0 != rMrkList.GetMarkCount(); if ( rMrkList.GetMarkCount() > 1 ) { @@ -208,7 +208,7 @@ sal_Bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pOb for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) { SdrObject *pTmpObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); - sal_Bool bForget = pTmpObj->ISA(SwVirtFlyDrawObj); + bool bForget = pTmpObj->ISA(SwVirtFlyDrawObj); if( bForget ) { pDView->UnmarkAll(); @@ -230,7 +230,7 @@ sal_Bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pOb } } else if ( !pOldSelFly && bHadSelection ) - SetCrsr( aOldPos, sal_True); + SetCrsr( aOldPos, true); if( bRet || !bHadSelection ) CallChgLnk(); @@ -264,13 +264,13 @@ sal_Bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pOb ( aPt1.getY() == aPt2.getY() && ( aPt1.getX() < aPt2.getX() || \ ( aPt1.getX() == aPt2.getX() && bOld ) ) ) ) -sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir ) +bool SwFEShell::MoveAnchor( sal_uInt16 nDir ) { const SdrMarkList* pMrkList; if( !Imp()->GetDrawView() || 0 == (pMrkList = &Imp()->GetDrawView()->GetMarkedObjectList()) || 1 != pMrkList->GetMarkCount()) - return sal_False; + return false; SwFrm* pOld; SwFlyFrm* pFly = NULL; SdrObject *pObj = pMrkList->GetMark( 0 )->GetMarkedSdrObj(); @@ -281,7 +281,7 @@ sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir ) } else pOld = ((SwDrawContact*)GetUserCall(pObj))->GetAnchorFrm( pObj ); - sal_Bool bRet = sal_False; + bool bRet = false; if( pOld ) { SwFrm* pNew = pOld; @@ -291,7 +291,7 @@ sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir ) SwFmtAnchor aAnch( rFmt.GetAnchor() ); RndStdIds nAnchorId = aAnch.GetAnchorId(); if ( FLY_AS_CHAR == nAnchorId ) - return sal_False; + return false; if( pOld->IsVertical() ) { if( pOld->IsTxtFrm() ) @@ -322,7 +322,7 @@ sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir ) if( pNew && pNew != pOld ) { aAnch.SetPageNum( ((SwPageFrm*)pNew)->GetPhyPageNum() ); - bRet = sal_True; + bRet = true; } break; } @@ -336,7 +336,7 @@ sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir ) const sal_Int32 nAct = pPos->nContent.GetIndex(); if( SW_MOVE_LEFT == nDir ) { - bRet = sal_True; + bRet = true; if( nAct ) { pPos->nContent.Assign( pTxtNd, nAct-1 ); @@ -350,7 +350,7 @@ sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir ) static_cast<SwTxtFrm*>(pOld)->GetTxtNode()->GetTxt().getLength(); if( nAct < nMax ) { - bRet = sal_True; + bRet = true; pPos->nContent.Assign( pTxtNd, nAct+1 ); } else @@ -378,10 +378,10 @@ sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir ) --nTmp; } pPos->nContent.Assign( pTxtNd, nTmp ); - bRet = sal_True; + bRet = true; } else if( SW_MOVE_UP == nDir || SW_MOVE_DOWN == nDir ) - bRet = sal_False; + bRet = false; break; } case FLY_AT_FLY: @@ -468,7 +468,7 @@ sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir ) SwPosition aPos( *pNewFly->GetFmt()-> GetCntnt().GetCntntIdx()); aAnch.SetAnchor( &aPos ); - bRet = sal_True; + bRet = true; } break; } @@ -580,7 +580,7 @@ void SwFEShell::SetDragMode( sal_uInt16 eDragMode ) Imp()->GetDrawView()->SetDragMode( (SdrDragMode)eDragMode ); } -long SwFEShell::BeginDrag( const Point* pPt, sal_Bool ) +long SwFEShell::BeginDrag( const Point* pPt, bool ) { SdrView *pView = Imp()->GetDrawView(); if ( pView && pView->AreObjectsMarked() ) @@ -594,7 +594,7 @@ long SwFEShell::BeginDrag( const Point* pPt, sal_Bool ) return 0; } -long SwFEShell::Drag( const Point *pPt, sal_Bool ) +long SwFEShell::Drag( const Point *pPt, bool ) { OSL_ENSURE( Imp()->HasDrawView(), "Drag without DrawView?" ); if ( Imp()->GetDrawView()->IsDragObj() ) @@ -608,7 +608,7 @@ long SwFEShell::Drag( const Point *pPt, sal_Bool ) return 0; } -long SwFEShell::EndDrag( const Point *, sal_Bool ) +long SwFEShell::EndDrag( const Point *, bool ) { OSL_ENSURE( Imp()->HasDrawView(), "EndDrag without DrawView?" ); SdrView *pView = Imp()->GetDrawView(); @@ -772,7 +772,7 @@ static void lcl_NotifyNeighbours( const SdrMarkList *pLst ) } } -void SwFEShell::SelectionToTop( sal_Bool bTop ) +void SwFEShell::SelectionToTop( bool bTop ) { OSL_ENSURE( Imp()->HasDrawView(), "SelectionToTop without DrawView?" ); const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); @@ -792,7 +792,7 @@ void SwFEShell::SelectionToTop( sal_Bool bTop ) EndAllAction(); } -void SwFEShell::SelectionToBottom( sal_Bool bBottom ) +void SwFEShell::SelectionToBottom( bool bBottom ) { OSL_ENSURE( Imp()->HasDrawView(), "SelectionToBottom without DrawView?" ); const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); @@ -898,42 +898,42 @@ sal_uInt16 SwFEShell::IsObjSelected() const return sal_uInt16( Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() ); } -sal_Bool SwFEShell::IsFrmSelected() const +bool SwFEShell::IsFrmSelected() const { if ( !Imp()->HasDrawView() ) - return sal_False; + return false; else return 0 != ::GetFlyFromMarked( &Imp()->GetDrawView()->GetMarkedObjectList(), (SwViewShell*)this ); } -sal_Bool SwFEShell::IsObjSelected( const SdrObject& rObj ) const +bool SwFEShell::IsObjSelected( const SdrObject& rObj ) const { if ( IsFrmSelected() || !Imp()->HasDrawView() ) - return sal_False; + return false; else return Imp()->GetDrawView() ->IsObjMarked( const_cast< SdrObject * >( &rObj ) ); } -sal_Bool SwFEShell::IsObjSameLevelWithMarked(const SdrObject* pObj) const +bool SwFEShell::IsObjSameLevelWithMarked(const SdrObject* pObj) const { if (pObj) { const SdrMarkList& aMarkList = Imp()->GetDrawView()->GetMarkedObjectList(); if (aMarkList.GetMarkCount() == 0) { - return sal_True; + return true; } SdrMark* pM=aMarkList.GetMark(0); if (pM) { SdrObject* pMarkObj = pM->GetMarkedSdrObj(); if (pMarkObj && pMarkObj->GetUpGroup() == pObj->GetUpGroup()) - return sal_True; + return true; } } - return sal_False; + return false; } void SwFEShell::EndTextEdit() @@ -1039,11 +1039,11 @@ SdrObject* SwFEShell::GetObjAt( const Point& rPt ) } // Test if there is a object at that position and if it should be selected. -sal_Bool SwFEShell::ShouldObjectBeSelected(const Point& rPt) +bool SwFEShell::ShouldObjectBeSelected(const Point& rPt) { SET_CURR_SHELL(this); SwDrawView *pDrawView = Imp()->GetDrawView(); - sal_Bool bRet(sal_False); + bool bRet(false); if(pDrawView) { @@ -1098,14 +1098,14 @@ sal_Bool SwFEShell::ShouldObjectBeSelected(const Point& rPt) { if ( aCursorCharRect.IsOver( SwRect( pObj->GetLastBoundRect() ) ) ) { - bRet = sal_False; + bRet = false; } } } } else { - bRet = sal_False; + bRet = false; } break; } @@ -1124,7 +1124,7 @@ sal_Bool SwFEShell::ShouldObjectBeSelected(const Point& rPt) if ( ( IsHeaderFooterEdit() && !bInHdrFtr ) || ( !IsHeaderFooterEdit() && bInHdrFtr ) ) { - bRet = sal_False; + bRet = false; } } @@ -1138,7 +1138,7 @@ sal_Bool SwFEShell::ShouldObjectBeSelected(const Point& rPt) if (pCandidate->ISA(SwVirtFlyDrawObj) && ( (SwVirtFlyDrawObj*)pCandidate)->GetCurrentBoundRect().IsInside(rPt) ) { - bRet = sal_False; + bRet = false; } } } @@ -1190,7 +1190,7 @@ namespace }; } -const SdrObject* SwFEShell::GetBestObject( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_...*/ eType, sal_Bool bFlat, const ::svx::ISdrObjectFilter* pFilter ) +const SdrObject* SwFEShell::GetBestObject( bool bNext, sal_uInt16 /*GOTOOBJ_...*/ eType, bool bFlat, const ::svx::ISdrObjectFilter* pFilter ) { if( !Imp()->HasDrawView() ) return NULL; @@ -1208,7 +1208,7 @@ const SdrObject* SwFEShell::GetBestObject( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_ if( !bNoFly && bNoDraw ) { - SwFlyFrm *pFly = GetCurrFrm( sal_False )->FindFlyFrm(); + SwFlyFrm *pFly = GetCurrFrm( false )->FindFlyFrm(); if( pFly ) pBest = pFly->GetVirtDrawObj(); } @@ -1260,7 +1260,7 @@ const SdrObject* SwFEShell::GetBestObject( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_ while ( aObjIter.IsMore() ) { SdrObject* pObj = aObjIter.Next(); - sal_Bool bFlyFrm = pObj->ISA(SwVirtFlyDrawObj); + bool bFlyFrm = pObj->ISA(SwVirtFlyDrawObj); if( ( bNoFly && bFlyFrm ) || ( bNoDraw && !bFlyFrm ) || ( eType == GOTOOBJ_DRAW_SIMPLE && lcl_IsControlGroup( pObj ) ) || @@ -1366,14 +1366,14 @@ const SdrObject* SwFEShell::GetBestObject( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_ return pBest; } -sal_Bool SwFEShell::GotoObj( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_...*/ eType ) +bool SwFEShell::GotoObj( bool bNext, sal_uInt16 /*GOTOOBJ_...*/ eType ) { const SdrObject* pBest = GetBestObject( bNext, eType ); if ( !pBest ) - return sal_False; + return false; - sal_Bool bFlyFrm = pBest->ISA(SwVirtFlyDrawObj); + bool bFlyFrm = pBest->ISA(SwVirtFlyDrawObj); if( bFlyFrm ) { SwVirtFlyDrawObj *pO = (SwVirtFlyDrawObj*)pBest; @@ -1389,12 +1389,12 @@ sal_Bool SwFEShell::GotoObj( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_...*/ eType ) MakeVisible( pBest->GetCurrentBoundRect() ); } CallChgLnk(); - return sal_True; + return true; } -sal_Bool SwFEShell::BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos ) +bool SwFEShell::BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos ) { - sal_Bool bRet = sal_False; + bool bRet = false; if ( !Imp()->HasDrawView() ) Imp()->MakeDrawView(); @@ -1416,10 +1416,10 @@ sal_Bool SwFEShell::BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, co return bRet; } -sal_Bool SwFEShell::BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, sal_uInt32 eObjInventor, +bool SwFEShell::BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, sal_uInt32 eObjInventor, const Point &rPos ) { - sal_Bool bRet = sal_False; + bool bRet = false; if ( !Imp()->HasDrawView() ) Imp()->MakeDrawView(); @@ -1445,7 +1445,7 @@ void SwFEShell::MoveCreate( const Point &rPos ) } } -sal_Bool SwFEShell::EndCreate( sal_uInt16 eSdrCreateCmd ) +bool SwFEShell::EndCreate( sal_uInt16 eSdrCreateCmd ) { // To assure undo-object from the DrawEngine is not stored, // (we create our own undo-object!), temporarily switch-off Undo @@ -1454,25 +1454,25 @@ sal_Bool SwFEShell::EndCreate( sal_uInt16 eSdrCreateCmd ) { GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(false); } - sal_Bool bCreate = Imp()->GetDrawView()->EndCreateObj( + bool bCreate = Imp()->GetDrawView()->EndCreateObj( SdrCreateCmd( eSdrCreateCmd ) ); GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(true); if ( !bCreate ) { ::FrameNotify( this, FLY_DRAG_END ); - return sal_False; + return false; } if ( (SdrCreateCmd)eSdrCreateCmd == SDRCREATE_NEXTPOINT ) { ::FrameNotify( this, FLY_DRAG ); - return sal_True; + return true; } return ImpEndCreate(); } -sal_Bool SwFEShell::ImpEndCreate() +bool SwFEShell::ImpEndCreate() { OSL_ENSURE( Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() == 1, "New object not selected." ); @@ -1485,7 +1485,7 @@ sal_Bool SwFEShell::ImpEndCreate() Imp()->GetDrawView()->DeleteMarked(); Imp()->GetDrawView()->UnmarkAll(); ::FrameNotify( this, FLY_DRAG_END ); - return sal_False; + return false; } if( rSdrObj.GetUpGroup() ) @@ -1496,7 +1496,7 @@ sal_Bool SwFEShell::ImpEndCreate() rSdrObj.NbcSetRelativePos( aTmpPos - aNewAnchor ); rSdrObj.NbcSetAnchorPos( aNewAnchor ); ::FrameNotify( this, FLY_DRAG ); - return sal_True; + return true; } LockPaint(); @@ -1694,7 +1694,7 @@ sal_Bool SwFEShell::ImpEndCreate() GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(true); SwFlyFrm* pFlyFrm; - if( NewFlyFrm( aSet, sal_True ) && + if( NewFlyFrm( aSet, true ) && ::GetHtmlMode( GetDoc()->GetDocShell() ) && 0 != ( pFlyFrm = FindFlyFrm() )) { @@ -1804,7 +1804,7 @@ sal_Bool SwFEShell::ImpEndCreate() KillPams(); EndAllActionAndCall(); UnlockPaint(); - return sal_True; + return true; } void SwFEShell::BreakCreate() @@ -1819,7 +1819,7 @@ bool SwFEShell::IsDrawCreate() const return Imp()->HasDrawView() ? Imp()->GetDrawView()->IsCreateObj() : false; } -sal_Bool SwFEShell::BeginMark( const Point &rPos ) +bool SwFEShell::BeginMark( const Point &rPos ) { if ( !Imp()->HasDrawView() ) Imp()->MakeDrawView(); @@ -1834,7 +1834,7 @@ sal_Bool SwFEShell::BeginMark( const Point &rPos ) return pDView->BegMarkObj( rPos ); } else - return sal_False; + return false; } void SwFEShell::MoveMark( const Point &rPos ) @@ -1855,9 +1855,9 @@ void SwFEShell::MoveMark( const Point &rPos ) } } -sal_Bool SwFEShell::EndMark() +bool SwFEShell::EndMark() { - sal_Bool bRet = sal_False; + bool bRet = false; OSL_ENSURE( Imp()->HasDrawView(), "EndMark without DrawView?" ); if (Imp()->GetDrawView()->IsMarkObj()) @@ -1897,7 +1897,7 @@ sal_Bool SwFEShell::EndMark() if ( rMrkList.GetMarkCount() ) ::lcl_GrabCursor(this, pOldSelFly); else - bRet = sal_False; + bRet = false; } if ( bRet ) ::FrameNotify( this, FLY_DRAG_START ); @@ -2027,7 +2027,7 @@ Point SwFEShell::GetObjAbsPos() const return Imp()->GetDrawView()->GetDragStat().GetActionRect().TopLeft(); } -sal_Bool SwFEShell::IsGroupSelected() +bool SwFEShell::IsGroupSelected() { if ( IsObjSelected() ) { @@ -2043,11 +2043,11 @@ sal_Bool SwFEShell::IsGroupSelected() FLY_AS_CHAR != ((SwDrawContact*)GetUserCall(pObj))-> GetFmt()->GetAnchor().GetAnchorId() ) { - return sal_True; + return true; } } } - return sal_False; + return false; } // Change return type. @@ -2171,9 +2171,9 @@ void SwFEShell::MirrorSelection( bool bHorizontal ) // jump to named frame (Graphic/OLE) -sal_Bool SwFEShell::GotoFly( const OUString& rName, FlyCntType eType, sal_Bool bSelFrm ) +bool SwFEShell::GotoFly( const OUString& rName, FlyCntType eType, bool bSelFrm ) { - sal_Bool bRet = sal_False; + bool bRet = false; static sal_uInt8 const aChkArr[ 4 ] = { /* FLYCNTTYPE_ALL */ 0, /* FLYCNTTYPE_FRM */ ND_TEXTNODE, @@ -2213,7 +2213,7 @@ sal_Bool SwFEShell::GotoFly( const OUString& rName, FlyCntType eType, sal_Bool b GetCrsrDocPos() = rChrRect.Pos(); } } - bRet = sal_True; + bRet = true; } } return bRet; @@ -2305,10 +2305,10 @@ sal_uInt8 SwFEShell::IsSelObjProtected( sal_uInt16 eType ) const return static_cast<sal_uInt8>(nChk); } -sal_Bool SwFEShell::GetObjAttr( SfxItemSet &rSet ) const +bool SwFEShell::GetObjAttr( SfxItemSet &rSet ) const { if ( !IsObjSelected() ) - return sal_False; + return false; const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i ) @@ -2325,16 +2325,16 @@ sal_Bool SwFEShell::GetObjAttr( SfxItemSet &rSet ) const rSet.Put( pContact->GetFmt()->GetAttrSet() ); } } - return sal_True; + return true; } -sal_Bool SwFEShell::SetObjAttr( const SfxItemSet& rSet ) +bool SwFEShell::SetObjAttr( const SfxItemSet& rSet ) { SET_CURR_SHELL( this ); if ( !rSet.Count() ) { OSL_ENSURE( !this, "SetObjAttr, empty set." ); - return sal_False; + return false; } StartAllAction(); @@ -2351,15 +2351,15 @@ sal_Bool SwFEShell::SetObjAttr( const SfxItemSet& rSet ) EndUndo( UNDO_INSATTR ); EndAllActionAndCall(); GetDoc()->SetModified(); - return sal_True; + return true; } -sal_Bool SwFEShell::IsAlignPossible() const +bool SwFEShell::IsAlignPossible() const { sal_uInt16 nCnt; if ( 0 < (nCnt = IsObjSelected()) ) { - sal_Bool bRet = sal_True; + bool bRet = true; if ( nCnt == 1 ) { SdrObject *pO = Imp()->GetDrawView()->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj(); @@ -2371,7 +2371,7 @@ sal_Bool SwFEShell::IsAlignPossible() const if ( bRet ) return Imp()->GetDrawView()->IsAlignPossible(); } - return sal_False; + return false; } // temporary fix till SS of JOE is available @@ -2407,7 +2407,7 @@ void SwFEShell::CheckUnboundObjects() SwFmtAnchor aAnch; { - const SwFrm *pAnch = ::FindAnchor( pPage, aPt, sal_True ); + const SwFrm *pAnch = ::FindAnchor( pPage, aPt, true ); SwPosition aPos( *((SwCntntFrm*)pAnch)->GetNode() ); aAnch.SetType( FLY_AT_PARA ); aAnch.SetAnchor( &aPos ); @@ -2737,7 +2737,7 @@ long SwFEShell::GetSectionWidth( SwFmt& rFmt ) const } else if(pObj->ISA(SdrCaptionObj)) { - sal_Bool bVerticalText = ( SID_DRAW_TEXT_VERTICAL == nSlotId || + bool bVerticalText = ( SID_DRAW_TEXT_VERTICAL == nSlotId || SID_DRAW_CAPTION_VERTICAL == nSlotId ); ((SdrTextObj*)pObj)->SetVerticalWriting(bVerticalText); if(bVerticalText) @@ -2757,7 +2757,7 @@ long SwFEShell::GetSectionWidth( SwFmt& rFmt ) const SdrTextObj* pText = (SdrTextObj*)pObj; pText->SetLogicRect(aRect); - sal_Bool bVertical = (SID_DRAW_TEXT_VERTICAL == nSlotId); + bool bVertical = (SID_DRAW_TEXT_VERTICAL == nSlotId); bool bMarquee = (SID_DRAW_TEXT_MARQUEE == nSlotId); pText->SetVerticalWriting(bVertical); diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index 7abc15200ad0..b12762b31d12 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -260,11 +260,11 @@ bool SwFEShell::InsertCol( sal_uInt16 nCnt, bool bBehind ) } // Determines if the current cursor is in the last row of the table. -sal_Bool SwFEShell::IsLastCellInRow() const +bool SwFEShell::IsLastCellInRow() const { SwTabCols aTabCols; GetTabCols( aTabCols ); - sal_Bool bResult = sal_False; + bool bResult = false; if (IsTableRightToLeft()) /* If the table is right-to-left the last row is the most left one. */ @@ -276,25 +276,25 @@ sal_Bool SwFEShell::IsLastCellInRow() const return bResult; } -sal_Bool SwFEShell::DeleteCol() +bool SwFEShell::DeleteCol() { // check if Point/Mark of current cursor are in a table SwFrm *pFrm = GetCurrFrm(); if( !pFrm || !pFrm->IsInTab() ) - return sal_False; + return false; if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable )) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); - return sal_False; + return false; } SET_CURR_SHELL( this ); StartAllAction(); // search boxes via the layout - sal_Bool bRet; + bool bRet; SwSelBoxes aBoxes; GetTblSel( *this, aBoxes, nsSwTblSearchType::TBLSEARCH_COL ); if ( !aBoxes.empty() ) @@ -316,36 +316,36 @@ sal_Bool SwFEShell::DeleteCol() } else - bRet = sal_False; + bRet = false; EndAllActionAndCall(); return bRet; } -sal_Bool SwFEShell::DeleteTable() +bool SwFEShell::DeleteTable() { return DeleteRow(true); } -sal_Bool SwFEShell::DeleteRow(bool bCompleteTable) +bool SwFEShell::DeleteRow(bool bCompleteTable) { // check if Point/Mark of current cursor are in a table SwFrm *pFrm = GetCurrFrm(); if( !pFrm || !pFrm->IsInTab() ) - return sal_False; + return false; if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable )) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); - return sal_False; + return false; } SET_CURR_SHELL( this ); StartAllAction(); // search for boxes via the layout - sal_Bool bRet; + bool bRet; SwSelBoxes aBoxes; GetTblSel( *this, aBoxes, nsSwTblSearchType::TBLSEARCH_ROW ); @@ -371,7 +371,7 @@ sal_Bool SwFEShell::DeleteRow(bool bCompleteTable) if( aFndBox.GetLines().empty() ) { EndAllActionAndCall(); - return sal_False; + return false; } KillPams(); @@ -439,7 +439,7 @@ sal_Bool SwFEShell::DeleteRow(bool bCompleteTable) EndUndo(bCompleteTable ? UNDO_UI_TABLE_DELETE : UNDO_ROW_DELETE); } else - bRet = sal_False; + bRet = false; EndAllActionAndCall(); return bRet; @@ -477,18 +477,18 @@ sal_uInt16 SwFEShell::MergeTab() return nRet; } -sal_Bool SwFEShell::SplitTab( sal_Bool bVert, sal_uInt16 nCnt, sal_Bool bSameHeight ) +bool SwFEShell::SplitTab( bool bVert, sal_uInt16 nCnt, bool bSameHeight ) { // check if Point/Mark of current cursor are in a table SwFrm *pFrm = GetCurrFrm(); if( !pFrm || !pFrm->IsInTab() ) - return sal_False; + return false; if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable )) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); - return sal_False; + return false; } SET_CURR_SHELL( this ); @@ -497,11 +497,11 @@ sal_Bool SwFEShell::SplitTab( sal_Bool bVert, sal_uInt16 nCnt, sal_Bool bSameHei { ErrorHandler::HandleError( ERR_TBLSPLIT_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); - return sal_False; + return false; } StartAllAction(); // search boxes via the layout - sal_Bool bRet; + bool bRet; SwSelBoxes aBoxes; GetTblSel( *this, aBoxes ); if( !aBoxes.empty() ) @@ -515,7 +515,7 @@ sal_Bool SwFEShell::SplitTab( sal_Bool bVert, sal_uInt16 nCnt, sal_Bool bSameHei DELETEZ( pLastRows ); } else - bRet = sal_False; + bRet = false; EndAllActionAndCall(); return bRet; } @@ -562,7 +562,7 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const if ( pColumnCacheLastCellFrm != pBox ) { pTab->GetTable()->GetTabCols( *pLastCols, - ((SwCellFrm*)pBox)->GetTabBox(), sal_True); + ((SwCellFrm*)pBox)->GetTabBox(), true); pColumnCacheLastCellFrm = pBox; } rToFill = *pLastCols; @@ -640,7 +640,7 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const } } -void SwFEShell::SetTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly ) +void SwFEShell::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly ) { SwFrm *pBox = GetCurrFrm(); if( !pBox || !pBox->IsInTab() ) @@ -681,7 +681,7 @@ void SwFEShell::GetTabRows( SwTabCols &rToFill ) const _GetTabRows( rToFill, pFrm ); } -void SwFEShell::SetTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly ) +void SwFEShell::SetTabRows( const SwTabCols &rNew, bool bCurColOnly ) { SwFrm *pBox = GetCurrFrm(); if( !pBox || !pBox->IsInTab() ) @@ -705,7 +705,7 @@ void SwFEShell::GetMouseTabRows( SwTabCols &rToFill, const Point &rPt ) const _GetTabRows( rToFill, pBox ); } -void SwFEShell::SetMouseTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly, const Point &rPt ) +void SwFEShell::SetMouseTabRows( const SwTabCols &rNew, bool bCurColOnly, const Point &rPt ) { const SwFrm *pBox = GetBox( rPt ); if( pBox ) @@ -743,12 +743,12 @@ void SwFEShell::GetRowHeight( SwFmtFrmSize *& rpSz ) const GetDoc()->GetRowHeight( *getShellCrsr( false ), rpSz ); } -sal_Bool SwFEShell::BalanceRowHeight( sal_Bool bTstOnly ) +bool SwFEShell::BalanceRowHeight( bool bTstOnly ) { SET_CURR_SHELL( this ); if( !bTstOnly ) StartAllAction(); - sal_Bool bRet = GetDoc()->BalanceRowHeight( *getShellCrsr( false ), bTstOnly ); + bool bRet = GetDoc()->BalanceRowHeight( *getShellCrsr( false ), bTstOnly ); if( !bTstOnly ) EndAllActionAndCall(); return bRet; @@ -762,7 +762,7 @@ void SwFEShell::SetRowBackground( const SvxBrushItem &rNew ) EndAllActionAndCall(); } -sal_Bool SwFEShell::GetRowBackground( SvxBrushItem &rToFill ) const +bool SwFEShell::GetRowBackground( SvxBrushItem &rToFill ) const { return GetDoc()->GetRowBackground( *getShellCrsr( false ), rToFill ); } @@ -775,7 +775,7 @@ void SwFEShell::SetTabBorders( const SfxItemSet& rSet ) EndAllActionAndCall(); } -void SwFEShell::SetTabLineStyle( const Color* pColor, sal_Bool bSetLine, +void SwFEShell::SetTabLineStyle( const Color* pColor, bool bSetLine, const editeng::SvxBorderLine* pBorderLine ) { SET_CURR_SHELL( this ); @@ -798,7 +798,7 @@ void SwFEShell::SetBoxBackground( const SvxBrushItem &rNew ) EndAllActionAndCall(); } -sal_Bool SwFEShell::GetBoxBackground( SvxBrushItem &rToFill ) const +bool SwFEShell::GetBoxBackground( SvxBrushItem &rToFill ) const { return GetDoc()->GetBoxAttr( *getShellCrsr( false ), rToFill ); } @@ -811,7 +811,7 @@ void SwFEShell::SetBoxDirection( const SvxFrameDirectionItem& rNew ) EndAllActionAndCall(); } -sal_Bool SwFEShell::GetBoxDirection( SvxFrameDirectionItem& rToFill ) const +bool SwFEShell::GetBoxDirection( SvxFrameDirectionItem& rToFill ) const { return GetDoc()->GetBoxAttr( *getShellCrsr( false ), rToFill ); } @@ -849,7 +849,7 @@ void SwFEShell::GetTabBackground( SvxBrushItem &rToFill ) const rToFill = pFrm->ImplFindTabFrm()->GetFmt()->GetBackground(); } -sal_Bool SwFEShell::HasWholeTabSelection() const +bool SwFEShell::HasWholeTabSelection() const { // whole table selected? if ( IsTableMode() ) @@ -864,16 +864,16 @@ sal_Bool SwFEShell::HasWholeTabSelection() const aBoxes.back()->GetSttNd()->EndOfSectionIndex() + 1 == pTblNd->EndOfSectionIndex(); } } - return sal_False; + return false; } -sal_Bool SwFEShell::HasBoxSelection() const +bool SwFEShell::HasBoxSelection() const { if(!IsCrsrInTbl()) - return sal_False; + return false; // whole table selected? if( IsTableMode() ) - return sal_True; + return true; SwPaM* pPam = GetCrsr(); // empty boxes are also selected as the absence of selection bool bChg = false; @@ -900,12 +900,12 @@ sal_Bool SwFEShell::HasBoxSelection() const { if( bChg ) pPam->Exchange(); - return sal_True; + return true; } } if( bChg ) pPam->Exchange(); - return sal_False; + return false; } void SwFEShell::ProtectCells() @@ -963,16 +963,16 @@ void SwFEShell::UnProtectTbls() EndAllActionAndCall(); } -sal_Bool SwFEShell::HasTblAnyProtection( const OUString* pTblName, - sal_Bool* pFullTblProtection ) +bool SwFEShell::HasTblAnyProtection( const OUString* pTblName, + bool* pFullTblProtection ) { return GetDoc()->HasTblAnyProtection( GetCrsr()->GetPoint(), pTblName, pFullTblProtection ); } -sal_Bool SwFEShell::CanUnProtectCells() const +bool SwFEShell::CanUnProtectCells() const { - sal_Bool bUnProtectAvailable = sal_False; + bool bUnProtectAvailable = false; const SwTableNode *pTblNd = IsCrsrInTbl(); if( pTblNd && !pTblNd->IsProtect() ) { @@ -1090,9 +1090,9 @@ sal_uInt16 SwFEShell::GetRowSelectionFromTop() const * returns true if the current frame is localed inside a table headline OR * inside the first line of a table!!! */ -sal_Bool SwFEShell::CheckHeadline( bool bRepeat ) const +bool SwFEShell::CheckHeadline( bool bRepeat ) const { - sal_Bool bRet = sal_False; + bool bRet = false; if ( !IsTableMode() ) { SwFrm *pFrm = GetCurrFrm(); // DONE MULTIIHEADER @@ -1113,7 +1113,7 @@ sal_Bool SwFEShell::CheckHeadline( bool bRepeat ) const return bRet; } -void SwFEShell::AdjustCellWidth( sal_Bool bBalance ) +void SwFEShell::AdjustCellWidth( bool bBalance ) { SET_CURR_SHELL( this ); StartAllAction(); @@ -1127,13 +1127,13 @@ void SwFEShell::AdjustCellWidth( sal_Bool bBalance ) EndAllActionAndCall(); } -sal_Bool SwFEShell::IsAdjustCellWidthAllowed( sal_Bool bBalance ) const +bool SwFEShell::IsAdjustCellWidthAllowed( bool bBalance ) const { // at least one row with content should be contained in the selection SwFrm *pFrm = GetCurrFrm(); if( !pFrm || !pFrm->IsInTab() ) - return sal_False; + return false; SwSelBoxes aBoxes; ::GetTblSelCrs( *this, aBoxes ); @@ -1163,21 +1163,21 @@ sal_Bool SwFEShell::IsAdjustCellWidthAllowed( sal_Bool bBalance ) const while ( pCNd ) { if (!pCNd->GetTxt().isEmpty()) - return sal_True; + return true; ++aIdx; pCNd = aIdx.GetNode().GetTxtNode(); } } } - return sal_False; + return false; } // AutoFormat for the table/table selection -sal_Bool SwFEShell::SetTableAutoFmt( const SwTableAutoFmt& rNew ) +bool SwFEShell::SetTableAutoFmt( const SwTableAutoFmt& rNew ) { SwTableNode *pTblNd = (SwTableNode*)IsCrsrInTbl(); if( !pTblNd || pTblNd->GetTable().IsTblComplex() ) - return sal_False; + return false; SwSelBoxes aBoxes; @@ -1197,7 +1197,7 @@ sal_Bool SwFEShell::SetTableAutoFmt( const SwTableAutoFmt& rNew ) } } - sal_Bool bRet; + bool bRet; if( !aBoxes.empty() ) { SET_CURR_SHELL( this ); @@ -1208,15 +1208,15 @@ sal_Bool SwFEShell::SetTableAutoFmt( const SwTableAutoFmt& rNew ) EndAllActionAndCall(); } else - bRet = sal_False; + bRet = false; return bRet; } -sal_Bool SwFEShell::GetTableAutoFmt( SwTableAutoFmt& rGet ) +bool SwFEShell::GetTableAutoFmt( SwTableAutoFmt& rGet ) { const SwTableNode *pTblNd = IsCrsrInTbl(); if( !pTblNd || pTblNd->GetTable().IsTblComplex() ) - return sal_False; + return false; SwSelBoxes aBoxes; @@ -1239,25 +1239,25 @@ sal_Bool SwFEShell::GetTableAutoFmt( SwTableAutoFmt& rGet ) return GetDoc()->GetTableAutoFmt( aBoxes, rGet ); } -sal_Bool SwFEShell::DeleteTblSel() +bool SwFEShell::DeleteTblSel() { // check if SPoint/Mark of current cursor are in a table SwFrm *pFrm = GetCurrFrm(); if( !pFrm || !pFrm->IsInTab() ) - return sal_False; + return false; if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable )) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); - return sal_False; + return false; } SET_CURR_SHELL( this ); StartAllAction(); // search boxes via the layout - sal_Bool bRet; + bool bRet; SwSelBoxes aBoxes; GetTblSelCrs( *this, aBoxes ); if( !aBoxes.empty() ) @@ -1277,7 +1277,7 @@ sal_Bool SwFEShell::DeleteTblSel() DELETEZ( pLastRows ); } else - bRet = sal_False; + bRet = false; EndAllActionAndCall(); return bRet; } @@ -1797,7 +1797,7 @@ bool SwFEShell::SelTblRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag *pCrsr->GetPoint() = *ppPos[0]; pCrsr->GetPtPos() = paPt[0]; - if ( !pCrsr->IsInProtectTable( sal_False, sal_True ) ) + if ( !pCrsr->IsInProtectTable( false, true ) ) { bool bNewSelection = true; @@ -1811,7 +1811,7 @@ bool SwFEShell::SelTblRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag *pCrsr->GetPoint() = *ppPos[1]; pCrsr->GetPtPos() = paPt[1]; - if ( pCrsr->IsInProtectTable( sal_False, sal_False ) ) + if ( pCrsr->IsInProtectTable( false, false ) ) { pCrsr->RestoreSavePos(); bNewSelection = false; @@ -1941,9 +1941,9 @@ SwTxtNode * SwFEShell::GetNumRuleNodeAtPos( const Point &rPt) return pResult; } -sal_Bool SwFEShell::IsNumLabel( const Point &rPt, int nMaxOffset ) +bool SwFEShell::IsNumLabel( const Point &rPt, int nMaxOffset ) { - sal_Bool bResult = sal_False; + bool bResult = false; SwContentAtPos aCntntAtPos (SwContentAtPos::SW_NUMLABEL); @@ -1952,7 +1952,7 @@ sal_Bool SwFEShell::IsNumLabel( const Point &rPt, int nMaxOffset ) { if ((nMaxOffset >= 0 && aCntntAtPos.nDist <= nMaxOffset) || (nMaxOffset < 0)) - bResult = sal_True; + bResult = true; } return bResult; @@ -1994,7 +1994,7 @@ void SwFEShell::GetMouseTabCols( SwTabCols &rToFill, const Point &rPt ) const _GetTabCols( rToFill, pBox ); } -void SwFEShell::SetMouseTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly, +void SwFEShell::SetMouseTabCols( const SwTabCols &rNew, bool bCurRowOnly, const Point &rPt ) { const SwFrm *pBox = GetBox( rPt ); @@ -2098,18 +2098,18 @@ static bool lcl_GoTableRow( SwCrsrShell* pShell, bool bUp ) } // aender eine Zellenbreite/-Hoehe/Spaltenbreite/Zeilenhoehe -sal_Bool SwFEShell::SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff ) +bool SwFEShell::SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff ) { SwFrm *pFrm = GetCurrFrm(); if( !pFrm || !pFrm->IsInTab() ) - return sal_False; + return 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 sal_False; + return false; } SET_CURR_SHELL( this ); @@ -2169,7 +2169,7 @@ sal_Bool SwFEShell::SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff ) nLogDiff /= nPrtWidth; /** The cells are destroyed in here */ - sal_Bool bRet = GetDoc()->SetColRowWidthHeight( + bool bRet = GetDoc()->SetColRowWidthHeight( *(SwTableBox*)((SwCellFrm*)pFrm)->GetTabBox(), eType, nDiff, nLogDiff ); @@ -2227,12 +2227,12 @@ static bool lcl_IsFormulaSelBoxes( const SwTable& rTbl, const SwTblBoxFormula& r } // ask formula for auto-sum -sal_Bool SwFEShell::GetAutoSum( OUString& rFml ) const +bool SwFEShell::GetAutoSum( OUString& rFml ) const { SwFrm *pFrm = GetCurrFrm(); SwTabFrm *pTab = pFrm ? pFrm->ImplFindTabFrm() : 0; if( !pTab ) - return sal_False; + return false; SwCellFrms aCells; OUString sFields; @@ -2322,19 +2322,19 @@ sal_Bool SwFEShell::GetAutoSum( OUString& rFml ) const rFml += "(" + sFields + ")"; } - return sal_True; + return true; } -sal_Bool SwFEShell::IsTableRightToLeft() const +bool SwFEShell::IsTableRightToLeft() const { SwFrm *pFrm = GetCurrFrm(); if( !pFrm || !pFrm->IsInTab() ) - return sal_False; + return false; return pFrm->ImplFindTabFrm()->IsRightToLeft(); } -sal_Bool SwFEShell::IsMouseTableRightToLeft(const Point &rPt) const +bool SwFEShell::IsMouseTableRightToLeft(const Point &rPt) const { SwFrm *pFrm = (SwFrm *)GetBox( rPt ); const SwTabFrm* pTabFrm = pFrm ? pFrm->ImplFindTabFrm() : 0; @@ -2342,11 +2342,11 @@ sal_Bool SwFEShell::IsMouseTableRightToLeft(const Point &rPt) const return pTabFrm ? pTabFrm->IsRightToLeft() : sal_False; } -sal_Bool SwFEShell::IsTableVertical() const +bool SwFEShell::IsTableVertical() const { SwFrm *pFrm = GetCurrFrm(); if( !pFrm || !pFrm->IsInTab() ) - return sal_False; + return false; return pFrm->ImplFindTabFrm()->IsVertical(); } diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 5f2cc60af410..7231e01d1756 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -68,7 +68,7 @@ void SwFEShell::EndAllActionAndCall() } // Determine the Cntnt's nearest to the point -Point SwFEShell::GetCntntPos( const Point& rPoint, sal_Bool bNext ) const +Point SwFEShell::GetCntntPos( const Point& rPoint, bool bNext ) const { SET_CURR_SHELL( (SwViewShell*)this ); return GetLayout()->GetNextPrevCntntPos( rPoint, bNext ); @@ -96,10 +96,10 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt, { const bool bOldCallbackActionEnabled = GetLayout()->IsCallbackActionEnabled(); if( bOldCallbackActionEnabled ) - GetLayout()->SetCallbackActionEnabled( sal_False ); + GetLayout()->SetCallbackActionEnabled( false ); pFrm = GetCurrFrm(); if( bOldCallbackActionEnabled ) - GetLayout()->SetCallbackActionEnabled( sal_True ); + GetLayout()->SetCallbackActionEnabled( true ); } } @@ -167,13 +167,13 @@ sal_uInt16 SwFEShell::GetPageNumber( const Point &rPoint ) const return 0; } -sal_Bool SwFEShell::GetPageNumber( long nYPos, sal_Bool bAtCrsrPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, OUString &rDisplay) const +bool SwFEShell::GetPageNumber( long nYPos, bool bAtCrsrPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, OUString &rDisplay) const { const SwFrm *pPage; if ( bAtCrsrPos ) // get page of Crsr { - pPage = GetCurrFrm( sal_False ); + pPage = GetCurrFrm( false ); if ( pPage ) pPage = pPage->FindPageFrm(); } @@ -204,11 +204,11 @@ sal_Bool SwFEShell::GetPageNumber( long nYPos, sal_Bool bAtCrsrPos, sal_uInt16& bool SwFEShell::IsDirectlyInSection() const { - SwFrm* pFrm = GetCurrFrm( sal_False ); + SwFrm* pFrm = GetCurrFrm( false ); return pFrm && pFrm->GetUpper() && pFrm->GetUpper()->IsSctFrm(); } -sal_uInt16 SwFEShell::GetFrmType( const Point *pPt, sal_Bool bStopAtFly ) const +sal_uInt16 SwFEShell::GetFrmType( const Point *pPt, bool bStopAtFly ) const { sal_uInt16 nReturn = FRMTYPE_NONE; const SwFrm *pFrm; @@ -221,7 +221,7 @@ sal_uInt16 SwFEShell::GetFrmType( const Point *pPt, sal_Bool bStopAtFly ) const pFrm = pNd->getLayoutFrm( GetLayout(), pPt ); } else - pFrm = GetCurrFrm( sal_False ); + pFrm = GetCurrFrm( false ); while ( pFrm ) { switch ( pFrm->GetType() ) @@ -275,7 +275,7 @@ sal_uInt16 SwFEShell::GetFrmType( const Point *pPt, sal_Bool bStopAtFly ) const return nReturn; } -void SwFEShell::ShGetFcs( sal_Bool bUpdate ) +void SwFEShell::ShGetFcs( bool bUpdate ) { ::SetShell( this ); SwCrsrShell::ShGetFcs( bUpdate ); @@ -307,7 +307,7 @@ sal_uInt16 SwFEShell::GetPhyPageNum() return 0; } -sal_uInt16 SwFEShell::GetVirtPageNum( const sal_Bool bCalcFrm ) +sal_uInt16 SwFEShell::GetVirtPageNum( const bool bCalcFrm ) { SwFrm *pFrm = GetCurrFrm( bCalcFrm ); if ( pFrm ) @@ -324,7 +324,7 @@ static void lcl_SetAPageOffset( sal_uInt16 nOffset, SwPageFrm* pPage, SwFEShell* SwFmtPageDesc aDesc( pPage->GetPageDesc() ); aDesc.SetNumOffset( nOffset ); - SwFrm *pFrm = pThis->GetCurrFrm( sal_False ); + SwFrm *pFrm = pThis->GetCurrFrm( false ); if ( pFrm->IsInTab() ) pThis->GetDoc()->SetAttr( aDesc, *pFrm->FindTabFrm()->GetFmt() ); else @@ -337,14 +337,14 @@ static void lcl_SetAPageOffset( sal_uInt16 nOffset, SwPageFrm* pPage, SwFEShell* void SwFEShell::SetNewPageOffset( sal_uInt16 nOffset ) { - GetLayout()->SetVirtPageNum( sal_True ); - const SwPageFrm *pPage = GetCurrFrm( sal_False )->FindPageFrm(); + GetLayout()->SetVirtPageNum( true ); + const SwPageFrm *pPage = GetCurrFrm( false )->FindPageFrm(); lcl_SetAPageOffset( nOffset, (SwPageFrm*)pPage, this ); } void SwFEShell::SetPageOffset( sal_uInt16 nOffset ) { - const SwPageFrm *pPage = GetCurrFrm( sal_False )->FindPageFrm(); + const SwPageFrm *pPage = GetCurrFrm( false )->FindPageFrm(); const SwRootFrm* pDocLayout = GetLayout(); while ( pPage ) { @@ -356,7 +356,7 @@ void SwFEShell::SetPageOffset( sal_uInt16 nOffset ) const SwFmtPageDesc& rPgDesc = pFlow->GetAttrSet()->GetPageDesc(); if ( rPgDesc.GetNumOffset() ) { - pDocLayout->SetVirtPageNum( sal_True ); + pDocLayout->SetVirtPageNum( true ); lcl_SetAPageOffset( nOffset, (SwPageFrm*)pPage, this ); break; } @@ -386,12 +386,12 @@ sal_uInt16 SwFEShell::GetPageOffset() const void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rTxt, const OUString& rSeparator, const OUString& rNumberSeparator, - const sal_Bool bBefore, const sal_uInt16 nId, + const bool bBefore, const sal_uInt16 nId, const OUString& rCharacterStyle, - const sal_Bool bCpyBrd ) + const bool bCpyBrd ) { // get node index of cursor position, SwDoc can do everything else itself - SwCntntFrm *pCnt = LTYPE_DRAW==eType ? 0 : GetCurrFrm( sal_False ); + SwCntntFrm *pCnt = LTYPE_DRAW==eType ? 0 : GetCurrFrm( false ); if( LTYPE_DRAW==eType || pCnt ) { StartAllAction(); @@ -466,25 +466,25 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rTxt, cons SwFlyFrm* pFrm; const Point aPt( GetCrsrDocPos() ); if( pFlyFmt && 0 != ( pFrm = pFlyFmt->GetFrm( &aPt ))) - SelectFlyFrm( *pFrm, sal_True ); + SelectFlyFrm( *pFrm, true ); EndAllActionAndCall(); } } -sal_Bool SwFEShell::Sort(const SwSortOptions& rOpt) +bool SwFEShell::Sort(const SwSortOptions& rOpt) { if( !HasSelection() ) - return sal_False; + return false; SET_CURR_SHELL( this ); - sal_Bool bRet; + bool bRet; StartAllAction(); if(IsTableMode()) { // Sort table // check if Point/Mark of current Crsr are in one table - SwFrm *pFrm = GetCurrFrm( sal_False ); + SwFrm *pFrm = GetCurrFrm( false ); OSL_ENSURE( pFrm->FindTabFrm(), "Crsr not in table." ); // search boxes via the layout @@ -609,13 +609,13 @@ sal_uInt16 SwFEShell::GetCurOutColNum( SwGetCurColNumPara* pPara ) const SwFEShell::SwFEShell( SwDoc& rDoc, Window *pWindow, const SwViewOption *pOptions ) : SwEditShell( rDoc, pWindow, pOptions ), - pChainFrom( 0 ), pChainTo( 0 ), bCheckForOLEInCaption( sal_False ) + pChainFrom( 0 ), pChainTo( 0 ), bCheckForOLEInCaption( false ) { } SwFEShell::SwFEShell( SwEditShell& rShell, Window *pWindow ) : SwEditShell( rShell, pWindow ), - pChainFrom( 0 ), pChainTo( 0 ), bCheckForOLEInCaption( sal_False ) + pChainFrom( 0 ), pChainTo( 0 ), bCheckForOLEInCaption( false ) { } @@ -656,7 +656,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, pFrm = pFly ? pFly->GetAnchorFrm() : GetCurrFrm(); } - sal_Bool bWrapThrough = sal_False; + bool bWrapThrough = false; if ( pFly ) { SwFlyFrmFmt* pFmt = (SwFlyFrmFmt*)pFly->GetFmt(); @@ -669,7 +669,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, Point aPos; bool bVertic = false; - sal_Bool bRTL = sal_False; + bool bRTL = false; bool bVerticalL2R = false; if ((FLY_AT_PAGE == _nAnchorId) || (FLY_AT_FLY == _nAnchorId)) // LAYER_IMPL @@ -1197,11 +1197,11 @@ Size SwFEShell::GetGraphicDefaultSize() const return aRet; } -sal_Bool SwFEShell::IsFrmVertical(const sal_Bool bEnvironment, sal_Bool& bRTL, sal_Bool& bVertL2R) const +bool SwFEShell::IsFrmVertical(const bool bEnvironment, bool& bRTL, bool& bVertL2R) const { - sal_Bool bVert = sal_False; - bRTL = sal_False; - bVertL2R = sal_False; + bool bVert = false; + bRTL = false; + bVertL2R = false; if ( Imp()->HasDrawView() ) { diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 8448a13f19b7..ce5ad303dd9a 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -413,11 +413,11 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, OSL_ENSURE( nLoopMax, "Table layout is still invalid!" ); } -sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) +bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) { const SwTableNode* pTNd = rSttNd.FindTableNode(); if( !pTNd ) - return sal_False; + return false; Point aNullPos; SwNodeIndex aIdx( rSttNd ); @@ -432,7 +432,7 @@ sal_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->getLayoutFrm( pCNd->GetDoc()->GetCurrentLayout() ) == NULL ) - return sal_False; + return false; const SwLayoutFrm *pStart = pCNd->getLayoutFrm( pCNd->GetDoc()->GetCurrentLayout(), &aNullPos )->GetUpper(); OSL_ENSURE( pStart, "without frame nothing works" ); @@ -445,7 +445,7 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) // #i22135# - Robust: check, if content was found and if it's visible if ( !pCNd || pCNd->getLayoutFrm( pCNd->GetDoc()->GetCurrentLayout() ) == NULL ) { - return sal_False; + return false; } const SwLayoutFrm *pEnd = pCNd->getLayoutFrm( pCNd->GetDoc()->GetCurrentLayout(), &aNullPos )->GetUpper(); @@ -474,7 +474,7 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) const SwTabFrm *pTable = pUnion->GetTable(); SWRECTFN( pTable ) - sal_Bool bRTL = pTable->IsRightToLeft(); + bool bRTL = pTable->IsRightToLeft(); if( !pTable->IsValid() && nLoopMax ) { @@ -645,7 +645,7 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) return bValidChartSel ? sal_True : sal_False; } -sal_Bool IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell ) +bool IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell ) { OSL_ENSURE( pCell->IsCellFrm(), "Frame without Gazelle" ); @@ -668,7 +668,7 @@ sal_Bool IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell ) rUnion.Right() < pCell->Frm().Right() )) ? sal_True : sal_False ); } -sal_Bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) +bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) { SwShellCrsr* pCrsr = rShell.m_pCurCrsr; if ( rShell.IsTableMode() ) @@ -825,14 +825,14 @@ sal_Bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) return bFound ? sal_True : sal_False; } -sal_Bool HasProtectedCells( const SwSelBoxes& rBoxes ) +bool HasProtectedCells( const SwSelBoxes& rBoxes ) { - sal_Bool bRet = sal_False; + bool bRet = false; for (size_t n = 0; n < rBoxes.size(); ++n) { if( rBoxes[ n ]->GetFrmFmt()->GetProtect().IsCntntProtected() ) { - bRet = sal_True; + bRet = true; break; } } @@ -862,14 +862,14 @@ static void lcl_InsTblBox( SwTableNode* pTblNd, SwDoc* pDoc, SwTableBox* pBox, nInsPos, nCnt ); } -sal_Bool IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam ) +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 ); - sal_Bool bRet = *rPam.GetMark() == *rPam.GetPoint() + bool bRet = *rPam.GetMark() == *rPam.GetPoint() && ( rBox.GetSttNd()->GetIndex() + 1 == rPam.GetPoint()->nNode.GetIndex() ); if( bRet ) @@ -890,7 +890,7 @@ sal_Bool IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam ) nSttIdx <= ( nIdx = pAPos->nNode.GetIndex() ) && nIdx < nEndIdx ) { - bRet = sal_False; + bRet = false; break; } } @@ -1136,7 +1136,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, #if defined( DEL_ONLY_EMPTY_LINES ) nWidth = pFirstBox->GetFrmFmt()->GetFrmSize().GetWidth(); - sal_Bool bEmptyLine = sal_True; + bool bEmptyLine = sal_True; sal_uInt16 n, nSttPos = 0; for( n = 0; n < aPosArr.Count(); ++n ) @@ -1188,7 +1188,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, const _CmpLPt& rPt = aPosArr[ n ]; if( n && aPosArr[ n - 1 ].Y() == rPt.Y() ) // same Y level? { - sal_Bool bEmptyBox = IsEmptyBox( *rPt.pSelBox, aPam ); + bool bEmptyBox = IsEmptyBox( *rPt.pSelBox, aPam ); if( bEmptyBox ) { if( nSEndPos == n ) // beginning is empty @@ -1499,7 +1499,7 @@ static SwTwips lcl_CalcWish( const SwLayoutFrm *pCell, long nWish, if ( !nWish ) nWish = 1; - const sal_Bool bRTL = pCell->IsRightToLeft(); + const bool bRTL = pCell->IsRightToLeft(); SwTwips nRet = bRTL ? nAct - pCell->Frm().Width() : 0; @@ -1602,7 +1602,7 @@ static void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, SWRECTFN( pTab ) - sal_Bool bRTL = pTab->IsRightToLeft(); + bool bRTL = pTab->IsRightToLeft(); const long nTmpWish = pOrg->GetFmt()->GetFrmSize().GetWidth(); const long nWish = ( nTmpWish > 0 ) ? nTmpWish : 1; @@ -1936,7 +1936,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, } } -sal_Bool CheckSplitCells( const SwCrsrShell& rShell, sal_uInt16 nDiv, +bool CheckSplitCells( const SwCrsrShell& rShell, sal_uInt16 nDiv, const SwTblSearchType eSearchType ) { if( !rShell.IsTableMode() ) @@ -1945,11 +1945,11 @@ sal_Bool CheckSplitCells( const SwCrsrShell& rShell, sal_uInt16 nDiv, return CheckSplitCells( *rShell.getShellCrsr(false), nDiv, eSearchType ); } -sal_Bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv, +bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv, const SwTblSearchType eSearchType ) { if( 1 >= nDiv ) - return sal_False; + return false; sal_uInt16 nMinValue = nDiv * MINLAY; @@ -1999,7 +1999,7 @@ sal_Bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv, if( ::IsFrmInTblSel( pUnion->GetUnion(), pCell ) ) { if( (pCell->Frm().*fnRect->fnGetWidth)() < nMinValue ) - return sal_False; + return false; } if ( pCell->GetNext() ) @@ -2015,7 +2015,7 @@ sal_Bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv, pRow = (const SwLayoutFrm*)pRow->GetNext(); } } - return sal_True; + return true; } // These Classes copy the current table selections (rBoxes), @@ -2149,7 +2149,7 @@ inline void UnsetFollow( SwFlowFrm *pTab ) //When bAccTableDispose is FALSE,the acc table should not be disposed. //void _FndBox::DelFrms( SwTable &rTable ) -void _FndBox::DelFrms( SwTable &rTable,sal_Bool bAccTableDispose ) +void _FndBox::DelFrms( SwTable &rTable, bool bAccTableDispose ) { // All lines between pLineBefore and pLineBehind should be cut // from the layout and erased. @@ -2225,7 +2225,7 @@ void _FndBox::DelFrms( SwTable &rTable,sal_Bool bAccTableDispose ) // 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( sal_False ); + pPrev->SetFollowFlowLine( false ); } else if ( pFollow ) ::UnsetFollow( pFollow ); @@ -2263,7 +2263,7 @@ void _FndBox::DelFrms( SwTable &rTable,sal_Bool bAccTableDispose ) // We do not delete the follow flow line, // this will be done automatically in the // next turn. - ((SwTabFrm*)pTabFrm)->SetFollowFlowLine( sal_False ); + ((SwTabFrm*)pTabFrm)->SetFollowFlowLine( false ); } //Set acc table dispose state pFrm->SetAccTableDispose( bAccTableDispose ); @@ -2390,7 +2390,7 @@ void _FndBox::MakeFrms( SwTable &rTable ) } void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, - const sal_Bool bBehind ) + const bool bBehind ) { // Create Frms for newly inserted lines // bBehind == sal_True: before pLineBehind @@ -2529,12 +2529,12 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, } } -sal_Bool _FndBox::AreLinesToRestore( const SwTable &rTable ) const +bool _FndBox::AreLinesToRestore( const SwTable &rTable ) const { // Should we call MakeFrms here? if ( !pLineBefore && !pLineBehind && rTable.GetTabLines().size() ) - return sal_True; + return true; sal_uInt16 nBfPos; if(pLineBefore) @@ -2557,7 +2557,7 @@ sal_Bool _FndBox::AreLinesToRestore( const SwTable &rTable ) const if ( nBfPos == nBhPos ) // Should never occur. { OSL_FAIL( "Table, erase but not on any area !?!" ); - return sal_False; + return false; } if ( rTable.GetRowsToRepeat() > 0 ) @@ -2576,19 +2576,19 @@ sal_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 sal_False; + return false; // Some adjacent lines at the end of the table have been deleted: if ( nBhPos == USHRT_MAX && nBfPos == (rTable.GetTabLines().size() - 1) ) - return sal_False; + return false; // Some adjacent lines in the middle of the table have been deleted: if ( nBfPos != USHRT_MAX && nBhPos != USHRT_MAX && (nBfPos + 1) == nBhPos ) - return sal_False; + return false; // The structure of the deleted lines is more complex due to split lines. // A call of MakeFrms() is necessary. - return sal_True; + return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |