diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2012-11-24 09:06:58 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2012-11-24 16:55:45 +0900 |
commit | 233369b1e7990c6a3d03810b81eae0ee9175771d (patch) | |
tree | 28323522c0917e39af65c3d79bcbe8d21faea405 /sw | |
parent | 05bb624ca75f9960c7b5a5f8c02b4e7b011585e8 (diff) |
sal_Bool to bool
Change-Id: I1bd921c55223671d3474c882b059b46fb87fd694
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/fields/authfld.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/fields/dbfld.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/fields/flddat.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/fields/reffld.cxx | 18 | ||||
-rw-r--r-- | sw/source/core/frmedt/fecopy.cxx | 24 | ||||
-rw-r--r-- | sw/source/core/frmedt/fedesc.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/frmedt/fefly1.cxx | 24 | ||||
-rw-r--r-- | sw/source/core/frmedt/feflyole.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/frmedt/feshview.cxx | 56 | ||||
-rw-r--r-- | sw/source/core/frmedt/fetab.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/frmedt/fews.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/frmedt/tblsel.cxx | 96 |
12 files changed, 126 insertions, 128 deletions
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx index bb488fa25221..ff618c819bc1 100644 --- a/sw/source/core/fields/authfld.cxx +++ b/sw/source/core/fields/authfld.cxx @@ -95,7 +95,7 @@ SwFieldType* SwAuthorityFieldType::Copy() const void SwAuthorityFieldType::RemoveField(long nHandle) { #if OSL_DEBUG_LEVEL > 0 - sal_Bool bRemoved = sal_False; + bool bRemoved = false; #endif for(sal_uInt16 j = 0; j < m_DataArr.size(); j++) { @@ -104,7 +104,7 @@ void SwAuthorityFieldType::RemoveField(long nHandle) if(nRet == nHandle) { #if OSL_DEBUG_LEVEL > 0 - bRemoved = sal_True; + bRemoved = true; #endif pTemp->RemoveRef(); if(!pTemp->GetRefCount()) @@ -271,7 +271,7 @@ sal_uInt16 SwAuthorityFieldType::GetSequencePos(long nHandle) { //find the field in a sorted array of handles, #if OSL_DEBUG_LEVEL > 0 - sal_Bool bCurrentFieldWithoutTextNode = sal_False; + bool bCurrentFieldWithoutTextNode = false; #endif if(!m_SequArr.empty() && m_SequArr.size() != m_DataArr.size()) DelSequenceArray(); @@ -289,7 +289,7 @@ sal_uInt16 SwAuthorityFieldType::GetSequencePos(long nHandle) { #if OSL_DEBUG_LEVEL > 0 if(nHandle == ((SwAuthorityField*)pFmtFld->GetFld())->GetHandle()) - bCurrentFieldWithoutTextNode = sal_True; + bCurrentFieldWithoutTextNode = true; #endif continue; } diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx index 4b4d0ba9c42c..9c46f41e2450 100644 --- a/sw/source/core/fields/dbfld.cxx +++ b/sw/source/core/fields/dbfld.cxx @@ -435,7 +435,7 @@ bool SwDBField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) sal_uInt16 nSubTyp = GetSubType(); sal_Bool bVisible = sal_False; if(!(rAny >>= bVisible)) - return sal_False; + return false; if(bVisible) nSubTyp &= ~nsSwExtendedSubType::SUB_INVISIBLE; else diff --git a/sw/source/core/fields/flddat.cxx b/sw/source/core/fields/flddat.cxx index a990f094b619..2ca0244e4483 100644 --- a/sw/source/core/fields/flddat.cxx +++ b/sw/source/core/fields/flddat.cxx @@ -246,7 +246,7 @@ bool SwDateTimeField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId ) { util::DateTime aDateTimeValue; if(!(rVal >>= aDateTimeValue)) - return sal_False; + return false; DateTime aDateTime( DateTime::EMPTY ); aDateTime.Set100Sec(aDateTimeValue.HundredthSeconds); aDateTime.SetSec(aDateTimeValue.Seconds); diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index bec55fb60430..4d68397ba7d0 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -942,18 +942,18 @@ private: std::set<sal_uInt16> aIds; std::set<sal_uInt16> aDstIds; std::map<sal_uInt16, sal_uInt16> sequencedIds; /// ID numbers sorted by sequence number. - sal_Bool bInit; + bool bInit; - void Init(SwDoc& rDoc, SwDoc& rDestDoc, sal_Bool bField ); + void Init(SwDoc& rDoc, SwDoc& rDestDoc, bool bField ); void GetNoteIdsFromDoc( SwDoc& rDoc, std::set<sal_uInt16> &rIds ); void GetFieldIdsFromDoc( SwDoc& rDoc, std::set<sal_uInt16> &rIds ); void AddId( sal_uInt16 id, sal_uInt16 seqNum ); sal_uInt16 GetFirstUnusedId( std::set<sal_uInt16> &rIds ); public: - _RefIdsMap( const String& rName ) : aName( rName ), bInit( sal_False ) {} + _RefIdsMap( const String& rName ) : aName( rName ), bInit( false ) {} - void Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rFld, sal_Bool bField ); + void Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rFld, bool bField ); String GetName() { return aName; } }; @@ -992,7 +992,7 @@ void _RefIdsMap::GetNoteIdsFromDoc( SwDoc& rDoc, std::set<sal_uInt16> &rIds) /// @param[in] rDoc The source document. /// @param[in] rDestDoc The destination document. /// @param[in] bField True if we're interested in all fields, false for footnotes. -void _RefIdsMap::Init( SwDoc& rDoc, SwDoc& rDestDoc, sal_Bool bField ) +void _RefIdsMap::Init( SwDoc& rDoc, SwDoc& rDestDoc, bool bField ) { if( bInit ) return; @@ -1029,7 +1029,7 @@ void _RefIdsMap::Init( SwDoc& rDoc, SwDoc& rDestDoc, sal_Bool bField ) GetNoteIdsFromDoc( rDestDoc, aIds ); GetNoteIdsFromDoc( rDoc, aDstIds ); } - bInit = sal_True; + bInit = true; } /// Get the lowest unused ID in the passed set. @@ -1061,7 +1061,7 @@ void _RefIdsMap::AddId( sal_uInt16 id, sal_uInt16 seqNum ) } void _RefIdsMap::Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rFld, - sal_Bool bField ) + bool bField ) { Init( rDoc, rDestDoc, bField); @@ -1134,13 +1134,13 @@ void SwGetRefFieldType::MergeWithOtherDoc( SwDoc& rDestDoc ) aFldMap.push_back( pMap ); } - pMap->Check( *pDoc, rDestDoc, rRefFld, sal_True ); + pMap->Check( *pDoc, rDestDoc, rRefFld, true ); } break; case REF_FOOTNOTE: case REF_ENDNOTE: - aFntMap.Check( *pDoc, rDestDoc, rRefFld, sal_False ); + aFntMap.Check( *pDoc, rDestDoc, rRefFld, false ); break; } } diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index 5a7ea52e1915..e30b18f9cba9 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -244,7 +244,7 @@ static const Point &lcl_FindBasePos( const SwFrm *pFrm, const Point &rPt ) static sal_Bool lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrm* pFly, const Point& rInsPt, SwFEShell& rDestShell, SwFmtAnchor& rAnchor, - Point& rNewPos, sal_Bool bCheckFlyRecur ) + Point& rNewPos, bool bCheckFlyRecur ) { sal_Bool bRet = sal_True; rAnchor.SetAnchor( &rPos ); @@ -305,7 +305,7 @@ sal_Bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, SwFrmFmt *pFmt = pContact->GetFmt(); const SwFmtAnchor& rAnchor = pFmt->GetAnchor(); - sal_Bool bInsWithFmt = sal_True; + bool bInsWithFmt = true; if( pDestDrwView->IsGroupEntered() ) { @@ -319,7 +319,7 @@ sal_Bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, GetDoc() == pDestDoc, false ); pNew->NbcMove( aSiz ); pDestDrwView->InsertObjectAtView( pNew, *pDestPgView ); - bInsWithFmt = sal_False; + bInsWithFmt = false; } } @@ -347,7 +347,7 @@ sal_Bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, bRet = sal_False; else bRet = ::lcl_SetAnchor( aPos, *pNd, 0, rInsPt, - *pDestShell, aAnchor, aNewAnch, sal_False ); + *pDestShell, aAnchor, aNewAnch, false ); } else { @@ -358,7 +358,7 @@ sal_Bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, bRet = ::lcl_SetAnchor( *pCrsr->GetPoint(), *pCrsr->GetNode(), 0, rInsPt, *pDestShell, aAnchor, - aNewAnch, sal_False ); + aNewAnch, false ); } } else if ( FLY_AT_PAGE == aAnchor.GetAnchorId() ) @@ -505,7 +505,7 @@ sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, } else bRet = ::lcl_SetAnchor( aPos, *pNd, pFly, rInsPt, - *pDestShell, aAnchor, aNewAnch, sal_True ); + *pDestShell, aAnchor, aNewAnch, true ); } } else @@ -828,7 +828,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames ) { SwPosition aDestPos( *PCURCRSR->GetPoint() ); - sal_Bool bParkTblCrsr = sal_False; + bool bParkTblCrsr = false; const SwStartNode* pSttNd = PCURCRSR->GetNode()->FindTableBoxStartNode(); // TABLE IN TABLE: copy table in table @@ -838,7 +838,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames ) { GetTblSel( *this, aBoxes ); ParkTblCrsr(); - bParkTblCrsr = sal_True; + bParkTblCrsr = true; } else if( !PCURCRSR->HasMark() && PCURCRSR->GetNext() == PCURCRSR && ( !pSrcNd->GetTable().IsTblComplex() || @@ -893,7 +893,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames ) for ( sal_uInt16 i = 0; i < pClpDoc->GetSpzFrmFmts()->size(); ++i ) { - sal_Bool bInsWithFmt = sal_True; + bool bInsWithFmt = true; const SwFrmFmt& rCpyFmt = *(*pClpDoc->GetSpzFrmFmts())[i]; if( Imp()->GetDrawView()->IsGroupEntered() && @@ -939,7 +939,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames ) pNew->NbcSetAnchorPos( aGrpAnchor ); pNew->SetSnapRect( aSnapRect ); - bInsWithFmt = sal_False; + bInsWithFmt = false; } } @@ -967,7 +967,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames ) { Point aPt; lcl_SetAnchor( *PCURCRSR->GetPoint(), *PCURCRSR->GetNode(), - 0, aPt, *this, aAnchor, aPt, sal_False ); + 0, aPt, *this, aAnchor, aPt, false ); } SwFrmFmt * pNew = GetDoc()->CopyLayoutFmt( rCpyFmt, aAnchor, true, true ); @@ -1081,7 +1081,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames ) for ( sal_uInt16 i = 0; i < pClpDoc->GetSpzFrmFmts()->size(); ++i ) { - sal_Bool bInsWithFmt = sal_True; + bool bInsWithFmt = true; const SwFrmFmt& rCpyFmt = *(*pClpDoc->GetSpzFrmFmts())[i]; if( bInsWithFmt ) { diff --git a/sw/source/core/frmedt/fedesc.cxx b/sw/source/core/frmedt/fedesc.cxx index 7715960e8126..00b3568cdbc3 100644 --- a/sw/source/core/frmedt/fedesc.cxx +++ b/sw/source/core/frmedt/fedesc.cxx @@ -63,10 +63,10 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc ) #if OSL_DEBUG_LEVEL > 0 // SS does not change PageDesc, but only sets the attibute. // The Pagedesc should be available in the document - sal_Bool bFound = sal_False; + bool bFound = false; for ( sal_uInt16 nTst = 0; nTst < GetPageDescCnt(); ++nTst ) if ( &rDesc == &GetPageDesc( nTst ) ) - bFound = sal_True; + bFound = true; OSL_ENSURE( bFound, "ChgCurPageDesc with invalid descriptor." ); #endif diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index c57ddf0348a2..2673b314815e 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -92,16 +92,16 @@ void RegistFlys( SwPageFrm*, const SwLayoutFrm* ); #* will be made, to fit to the format #***********************************************************************/ -static sal_Bool lcl_SetNewFlyPos( const SwNode& rNode, SwFmtAnchor& rAnchor, +static bool lcl_SetNewFlyPos( const SwNode& rNode, SwFmtAnchor& rAnchor, const Point& rPt ) { - sal_Bool bRet = sal_False; + bool bRet = false; const SwStartNode* pStNode = rNode.FindFlyStartNode(); if( pStNode ) { SwPosition aPos( *pStNode ); rAnchor.SetAnchor( &aPos ); - bRet = sal_True; + bRet = true; } else { @@ -668,7 +668,7 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali { GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_INSLAYFMT, NULL ); SwFmtAnchor* pOldAnchor = 0; - sal_Bool bHOriChgd = sal_False, bVOriChgd = sal_False; + bool bHOriChgd = false, bVOriChgd = false; SwFmtVertOrient aOldV; SwFmtHoriOrient aOldH; @@ -685,14 +685,14 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali if( SFX_ITEM_SET == rSet.GetItemState( RES_HORI_ORIENT, sal_False, &pItem ) && text::HoriOrientation::NONE == ((SwFmtHoriOrient*)pItem)->GetHoriOrient() ) { - bHOriChgd = sal_True; + bHOriChgd = true; aOldH = *((SwFmtHoriOrient*)pItem); ((SfxItemSet&)rSet).Put( SwFmtHoriOrient( 0, text::HoriOrientation::LEFT ) ); } if( SFX_ITEM_SET == rSet.GetItemState( RES_VERT_ORIENT, sal_False, &pItem ) && text::VertOrientation::NONE == ((SwFmtVertOrient*)pItem)->GetVertOrient() ) { - bVOriChgd = sal_True; + bVOriChgd = true; aOldV = *((SwFmtVertOrient*)pItem); ((SfxItemSet&)rSet).Put( SwFmtVertOrient( 0, text::VertOrientation::TOP ) ); } @@ -965,7 +965,7 @@ void SwFEShell::SetPageObjsNewPage( std::vector<SwFrmFmt*>& rFillArr, int nOffse long nNewPage; SwRootFrm* pTmpRootFrm = GetLayout();//swmod 080317 sal_uInt16 nMaxPage = pTmpRootFrm->GetPageNum(); - sal_Bool bTmpAssert = sal_False; + bool bTmpAssert = false; for( sal_uInt16 n = 0; n < rFillArr.size(); ++n ) { SwFrmFmt* pFmt = rFillArr[n]; @@ -990,7 +990,7 @@ void SwFEShell::SetPageObjsNewPage( std::vector<SwFrmFmt*>& rFillArr, int nOffse } else pFmt->DelFrms(); - bTmpAssert = sal_True; + bTmpAssert = true; } aNewAnchor.SetPageNum( sal_uInt16(nNewPage) ); pDoc->SetAttr( aNewAnchor, *pFmt ); @@ -1574,8 +1574,8 @@ const SwFrmFmt* SwFEShell::IsURLGrfAtPos( const Point& rPt, String* pURL, const SwFmtURL &rURL = pFly->GetFmt()->GetURL(); if( rURL.GetURL().Len() || rURL.GetMap() ) { - sal_Bool bSetTargetFrameName = pTargetFrameName != 0; - sal_Bool bSetDescription = pDescription != 0; + bool bSetTargetFrameName = pTargetFrameName != 0; + bool bSetDescription = pDescription != 0; if ( rURL.GetMap() ) { IMapObject *pObject = pFly->GetFmt()->GetIMapObject( rPt, pFly ); @@ -1585,12 +1585,12 @@ const SwFrmFmt* SwFEShell::IsURLGrfAtPos( const Point& rPt, String* pURL, *pURL = pObject->GetURL(); if ( bSetTargetFrameName && pObject->GetTarget().Len() ) { - bSetTargetFrameName = sal_False; + bSetTargetFrameName = false; *pTargetFrameName = pObject->GetTarget(); } if ( bSetDescription ) { - bSetDescription = sal_False; + bSetDescription = false; *pDescription = pObject->GetAltText(); } pRet = pFly->GetFmt(); diff --git a/sw/source/core/frmedt/feflyole.cxx b/sw/source/core/frmedt/feflyole.cxx index 19f8f4849171..7cbcdca89ff8 100644 --- a/sw/source/core/frmedt/feflyole.cxx +++ b/sw/source/core/frmedt/feflyole.cxx @@ -65,7 +65,7 @@ SwFlyFrm *SwFEShell::FindFlyFrm( const uno::Reference < embed::XEmbeddedObject > if ( !pFly ) { // No or wrong fly selected: we have to search. - sal_Bool bExist = sal_False; + bool bExist = false; SwStartNode *pStNd; sal_uLong nSttIdx = GetNodes().GetEndOfAutotext().StartOfSectionIndex() + 1, nEndIdx = GetNodes().GetEndOfAutotext().GetIndex(); @@ -76,7 +76,7 @@ SwFlyFrm *SwFEShell::FindFlyFrm( const uno::Reference < embed::XEmbeddedObject > if ( pNd->IsOLENode() && ((SwOLENode*)pNd)->GetOLEObj().GetOleRef() == xObj ) { - bExist = sal_True; + bExist = true; SwFrm *pFrm = ((SwOLENode*)pNd)->getLayoutFrm( GetLayout() ); if ( pFrm ) pFly = pFrm->FindFlyFrm(); diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 84f8d9a2a64c..3506747ac7b0 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -151,7 +151,7 @@ sal_Bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pOb // (e.g. due to Unmark->MarkListHasChgd) arrives const SdrMarkList &rMrkList = pDView->GetMarkedObjectList(); - const sal_Bool bHadSelection = rMrkList.GetMarkCount() ? sal_True : sal_False; + const bool bHadSelection = rMrkList.GetMarkCount(); const sal_Bool bAddSelect = 0 != (SW_ADD_SELECT & nFlag); const sal_Bool bEnterGroup = 0 != (SW_ENTER_GROUP & nFlag); SwFlyFrm* pOldSelFly = 0; @@ -160,7 +160,7 @@ sal_Bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pOb if( bHadSelection ) { // call Unmark when !bAddSelect or if fly was selected - sal_Bool bUnmark = !bAddSelect; + bool bUnmark = !bAddSelect; if ( rMrkList.GetMarkCount() == 1 ) { @@ -180,7 +180,7 @@ sal_Bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pOb // corner. Point aPt( pOldSelFly->Frm().Pos() ); aPt.X() -= 1; - sal_Bool bUnLockView = !IsViewLocked(); + bool bUnLockView = !IsViewLocked(); LockView( sal_True ); SetCrsr( aPt, sal_True ); if( bUnLockView ) @@ -191,7 +191,7 @@ sal_Bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pOb { GetWin()->Invalidate( pOldSelFly->Frm().SVRect() ); } - bUnmark = sal_True; + bUnmark = true; } } if ( bUnmark ) @@ -413,7 +413,7 @@ sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir ) if( pPage->GetSortedObjs() ) { int i; - sal_Bool bOld = sal_False; + bool bOld = false; Point aCenter( pOld->Frm().Left() + pOld->Frm().Width()/2, pOld->Frm().Top() + pOld->Frm().Height()/2 ); Point aBest; @@ -425,7 +425,7 @@ sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir ) { SwFlyFrm* pTmp = static_cast<SwFlyFrm*>(pAnchObj); if( pTmp == pOld ) - bOld = sal_True; + bOld = true; else { const SwFlyFrm* pCheck = pFly ? pTmp : 0; @@ -442,34 +442,34 @@ sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir ) pTmp->Frm().Width()/2, pTmp->Frm().Top() + pTmp->Frm().Height()/2 ); - sal_Bool bAccept = sal_False; + bool bAccept = false; switch( nDir ) { case SW_MOVE_RIGHT: { bAccept = LESS_X( aCenter, aNew, bOld ) && ( !pNewFly || - LESS_X( aNew, aBest, sal_False ) ); + LESS_X( aNew, aBest, false ) ); break; } case SW_MOVE_LEFT: { bAccept = LESS_X( aNew, aCenter, !bOld ) && ( !pNewFly || - LESS_X( aBest, aNew, sal_True ) ); + LESS_X( aBest, aNew, true ) ); break; } case SW_MOVE_UP: { bAccept = LESS_Y( aNew, aCenter, !bOld ) && ( !pNewFly || - LESS_Y( aBest, aNew, sal_True ) ); + LESS_Y( aBest, aNew, true ) ); break; } case SW_MOVE_DOWN: { bAccept = LESS_Y( aCenter, aNew, bOld ) && ( !pNewFly || - LESS_Y( aNew, aBest, sal_False ) ); + LESS_Y( aNew, aBest, false ) ); break; } } @@ -780,7 +780,7 @@ static void lcl_NotifyNeighbours( const SdrMarkList *pLst ) for( sal_uInt16 j = 0; j < pLst->GetMarkCount(); ++j ) { SwPageFrm *pPage; - sal_Bool bCheckNeighbours = sal_False; + bool bCheckNeighbours = false; sal_Int16 aHori = text::HoriOrientation::NONE; SwRect aRect; SdrObject *pO = pLst->GetMark( 0 )->GetMarkedSdrObj(); @@ -793,7 +793,7 @@ static void lcl_NotifyNeighbours( const SdrMarkList *pLst ) if( text::HoriOrientation::NONE != aHori && text::HoriOrientation::CENTER != aHori && pFly->IsFlyAtCntFrm() ) { - bCheckNeighbours = sal_True; + bCheckNeighbours = true; pFly->InvalidatePos(); pFly->Frm().Pos().Y() += 1; } @@ -1252,18 +1252,18 @@ sal_Bool SwFEShell::ShouldObjectBeSelected(const Point& rPt) * Does the object include a control or groups, * which comprise only controls * --------------------------------------------------*/ -static sal_Bool lcl_IsControlGroup( const SdrObject *pObj ) +static bool lcl_IsControlGroup( const SdrObject *pObj ) { - sal_Bool bRet = sal_False; + bool bRet = false; if(pObj->ISA(SdrUnoObj)) bRet = sal_True; else if( pObj->ISA( SdrObjGroup ) ) { - bRet = sal_True; + bRet = true; const SdrObjList *pLst = ((SdrObjGroup*)pObj)->GetSubList(); for ( sal_uInt16 i = 0; i < pLst->GetObjCount(); ++i ) if( !::lcl_IsControlGroup( pLst->GetObj( i ) ) ) - return sal_False; + return false; } return bRet; } @@ -1301,8 +1301,8 @@ const SdrObject* SwFEShell::GetBestObject( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_ Point aTopPos( nTmp, nTmp ); Point aCurPos; Point aPos; - sal_Bool bNoDraw = 0 == (GOTOOBJ_DRAW_ANY & eType); - sal_Bool bNoFly = 0 == (GOTOOBJ_FLY_ANY & eType); + bool bNoDraw = 0 == (GOTOOBJ_DRAW_ANY & eType); + bool bNoFly = 0 == (GOTOOBJ_FLY_ANY & eType); if( !bNoFly && bNoDraw ) { @@ -1818,7 +1818,7 @@ sal_Bool SwFEShell::ImpEndCreate() { SfxItemSet aHtmlSet( GetDoc()->GetAttrPool(), RES_VERT_ORIENT, RES_HORI_ORIENT ); // horizontal orientation: - const sal_Bool bLeftFrm = aFlyRect.Left() < + const bool bLeftFrm = aFlyRect.Left() < pAnch->Frm().Left() + pAnch->Prt().Left(), bLeftPrt = aFlyRect.Left() + aFlyRect.Width() < pAnch->Frm().Left() + pAnch->Prt().Width()/2; @@ -1829,7 +1829,7 @@ sal_Bool SwFEShell::ImpEndCreate() } else { - const sal_Bool bRightFrm = aFlyRect.Left() > + const 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 ); @@ -2015,7 +2015,7 @@ sal_Bool SwFEShell::EndMark() if ( bRet ) { - sal_Bool bShowHdl = sal_False; + bool bShowHdl = false; SwDrawView* pDView = Imp()->GetDrawView(); // frames are not selected this way, except when // it is only one frame @@ -2030,7 +2030,7 @@ sal_Bool SwFEShell::EndMark() { if ( !bShowHdl ) { - bShowHdl = sal_True; + bShowHdl = true; } rMrkList.DeleteMark( i ); --i; // no exceptions @@ -2752,15 +2752,15 @@ void SwFEShell::HideChainMarker() void SwFEShell::SetChainMarker() { - sal_Bool bDelFrom = sal_True, - bDelTo = sal_True; + bool bDelFrom = true, + bDelTo = true; if ( IsFrmSelected() ) { SwFlyFrm *pFly = FindFlyFrm(); if ( pFly->GetPrevLink() ) { - bDelFrom = sal_False; + bDelFrom = false; const SwFrm *pPre = pFly->GetPrevLink(); Point aStart( pPre->Frm().Right(), pPre->Frm().Bottom()); @@ -2773,7 +2773,7 @@ void SwFEShell::SetChainMarker() } if ( pFly->GetNextLink() ) { - bDelTo = sal_False; + bDelTo = false; const SwFlyFrm *pNxt = pFly->GetNextLink(); Point aStart( pFly->Frm().Right(), pFly->Frm().Bottom()); @@ -2975,7 +2975,7 @@ long SwFEShell::GetSectionWidth( SwFmt& rFmt ) const pText->SetLogicRect(aRect); sal_Bool bVertical = (SID_DRAW_TEXT_VERTICAL == nSlotId); - sal_Bool bMarquee = (SID_DRAW_TEXT_MARQUEE == 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 04773d6123da..9f4d2b83c2b1 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -2333,7 +2333,7 @@ sal_Bool SwFEShell::SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff ) return bRet; } -static sal_Bool lcl_IsFormulaSelBoxes( const SwTable& rTbl, const SwTblBoxFormula& rFml, +static bool lcl_IsFormulaSelBoxes( const SwTable& rTbl, const SwTblBoxFormula& rFml, SwCellFrms& rCells ) { SwTblBoxFormula aTmp( rFml ); @@ -2348,10 +2348,10 @@ static sal_Bool lcl_IsFormulaSelBoxes( const SwTable& rTbl, const SwTblBoxFormul break; // found if( iC == rCells.end() ) - return sal_False; + return false; } - return sal_True; + return true; } // ask formula for auto-sum diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 256543669cb3..0e802b935969 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -129,10 +129,10 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt, if( !pFrm ) return GetLayout()->Frm(); - sal_Bool bFrm = sal_True; + bool bFrm = true; switch ( eType ) { - case RECT_PAGE_PRT: bFrm = sal_False; /* no break */ + case RECT_PAGE_PRT: bFrm = false; /* no break */ case RECT_PAGE : pFrm = pFrm->FindPageFrm(); break; @@ -141,7 +141,7 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt, pFrm->Calc(); break; - case RECT_FLY_PRT_EMBEDDED: bFrm = sal_False; /* no break */ + case RECT_FLY_PRT_EMBEDDED: bFrm = false; /* no break */ case RECT_FLY_EMBEDDED: pFrm = xObj.is() ? FindFlyFrm( xObj ) : pFrm->IsFlyFrm() ? pFrm @@ -164,10 +164,10 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt, if( RECT_OUTTABSECTION_PRT == eType || RECT_SECTION_PRT == eType ) - bFrm = sal_False; + bFrm = false; break; - case RECT_HEADERFOOTER_PRT: bFrm = sal_False; /* no break */ + case RECT_HEADERFOOTER_PRT: bFrm = false; /* no break */ case RECT_HEADERFOOTER: if( 0 == (pFrm = pFrm->FindFooterOrHeader()) ) return GetLayout()->Frm(); break; diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 43e38e02a15e..145ca64a467e 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -79,21 +79,19 @@ struct _CmpLPt { Point aPos; const SwTableBox* pSelBox; - sal_Bool bVert; + bool bVert; - _CmpLPt( const Point& rPt, const SwTableBox* pBox, sal_Bool bVertical ); + _CmpLPt( const Point& rPt, const SwTableBox* pBox, bool bVertical ); bool operator==( const _CmpLPt& rCmp ) const - { return X() == rCmp.X() && Y() == rCmp.Y() ? sal_True : sal_False; } + { return X() == rCmp.X() && Y() == rCmp.Y(); } bool operator<( const _CmpLPt& rCmp ) const { if ( bVert ) - return X() > rCmp.X() || ( X() == rCmp.X() && Y() < rCmp.Y() ) - ? sal_True : sal_False; + return X() > rCmp.X() || ( X() == rCmp.X() && Y() < rCmp.Y() ); else - return Y() < rCmp.Y() || ( Y() == rCmp.Y() && X() < rCmp.X() ) - ? sal_True : sal_False; + return Y() < rCmp.Y() || ( Y() == rCmp.Y() && X() < rCmp.X() ); } long X() const { return aPos.X(); } @@ -268,12 +266,12 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, int bChkProtected = nsSwTblSearchType::TBLSEARCH_PROTECT & eSearchType; - sal_Bool bTblIsValid; + bool bTblIsValid; // #i55421# Reduced value 10 int nLoopMax = 10; do { - bTblIsValid = sal_True; + bTblIsValid = true; // First, compute tables and rectangles SwSelUnions aUnions; @@ -295,7 +293,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, const SwTabFrm *pTable = pUnion->GetTable(); if( !pTable->IsValid() && nLoopMax ) { - bTblIsValid = sal_False; + bTblIsValid = false; break; } @@ -308,7 +306,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, { if( !pRow->IsValid() && nLoopMax ) { - bTblIsValid = sal_False; + bTblIsValid = false; break; } @@ -320,7 +318,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, { if( !pCell->IsValid() && nLoopMax ) { - bTblIsValid = sal_False; + bTblIsValid = false; break; } @@ -427,7 +425,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, rBoxes.clear(); --nLoopMax; - } while( sal_True ); + } while( true ); OSL_ENSURE( nLoopMax, "Table layout is still invalid!" ); } @@ -472,14 +470,14 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) OSL_ENSURE( pEnd, "without frame nothing works" ); - sal_Bool bTblIsValid, bValidChartSel; + bool bTblIsValid, bValidChartSel; // #i55421# Reduced value 10 int nLoopMax = 10; //JP 28.06.99: max 100 loops - Bug 67292 sal_uInt16 i = 0; do { - bTblIsValid = sal_True; - bValidChartSel = sal_True; + bTblIsValid = true; + bValidChartSel = true; sal_uInt16 nRowCells = USHRT_MAX; @@ -499,7 +497,7 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) if( !pTable->IsValid() && nLoopMax ) { - bTblIsValid = sal_False; + bTblIsValid = false; break; } @@ -514,7 +512,7 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) { if( !pRow->IsValid() && nLoopMax ) { - bTblIsValid = sal_False; + bTblIsValid = false; break; } @@ -527,7 +525,7 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) { if( !pCell->IsValid() && nLoopMax ) { - bTblIsValid = sal_False; + bTblIsValid = false; break; } @@ -567,7 +565,7 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) _Sort_CellFrm( *(SwCellFrm*)pCell) ); else { - bValidChartSel = sal_False; + bValidChartSel = false; break; } } @@ -606,7 +604,7 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) nRowCells = nCellCnt; else if( nRowCells != nCellCnt ) { - bValidChartSel = sal_False; + bValidChartSel = false; break; } } @@ -629,7 +627,7 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) } else { - bValidChartSel = sal_False; + bValidChartSel = false; break; } } @@ -638,7 +636,7 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) if( USHRT_MAX == nRowCells ) nRowCells = nCellCnt; else if( nRowCells != nCellCnt ) - bValidChartSel = sal_False; + bValidChartSel = false; } } @@ -658,11 +656,11 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) break; } --nLoopMax; - } while( sal_True ); + } while( true ); OSL_ENSURE( nLoopMax, "table layout is still invalid!" ); - return bValidChartSel; + return bValidChartSel ? sal_True : sal_False; } @@ -710,7 +708,7 @@ sal_Bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) // by default, first test above and then to the left ::MakeSelUnions( aUnions, pStart, pEnd, nsSwTblSearchType::TBLSEARCH_COL ); - sal_Bool bTstRow = sal_True, bFound = sal_False; + bool bTstRow = true, bFound = false; sal_uInt16 i; // 1. check if box above contains value/formula @@ -744,7 +742,7 @@ sal_Bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) // all boxes together, do not check the // row, if a formula or value was found bTstRow = 0 == nWhichId || USHRT_MAX == nWhichId; - bFound = sal_True; + bFound = true; break; } @@ -778,7 +776,7 @@ sal_Bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) // 2. check if box on left contains value/formula if( bTstRow ) { - bFound = sal_False; + bFound = false; rBoxes.clear(); aUnions.clear(); @@ -813,7 +811,7 @@ sal_Bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) // all boxes together, do not check the // row if a formula or value was found bFound = 0 != nWhichId && USHRT_MAX != nWhichId; - bTstRow = sal_False; + bTstRow = false; break; } @@ -844,7 +842,7 @@ sal_Bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) } } - return bFound; + return bFound ? sal_True : sal_False; } sal_Bool HasProtectedCells( const SwSelBoxes& rBoxes ) @@ -862,7 +860,7 @@ sal_Bool HasProtectedCells( const SwSelBoxes& rBoxes ) } -_CmpLPt::_CmpLPt( const Point& rPt, const SwTableBox* pBox, sal_Bool bVertical ) +_CmpLPt::_CmpLPt( const Point& rPt, const SwTableBox* pBox, bool bVertical ) : aPos( rPt ), pSelBox( pBox ), bVert( bVertical ) {} @@ -1148,7 +1146,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, // 1. Solution: map array and all on same Y-level // are separated with blanks // all others are separated with paragraphs - sal_Bool bCalcWidth = sal_True; + bool bCalcWidth = true; const SwTableBox* pFirstBox = aPosArr[ 0 ].pSelBox; // JP 27.03.98: Optimise - if boxes on one row are empty, @@ -1175,7 +1173,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, else { if( bCalcWidth && n ) - bCalcWidth = sal_False; // one line is ready + bCalcWidth = false; // one line is ready if( bEmptyLine && nSttPos < n ) { @@ -1226,7 +1224,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, else { if( bCalcWidth && n ) - bCalcWidth = sal_False; // one line ready + bCalcWidth = false; // one line ready // first those at the beginning if( nSttPos < nSEndPos ) @@ -1307,7 +1305,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, if( nY == ( bVert ? rPt.X() : rPt.Y() ) ) // same Y level? nWidth += rPt.pSelBox->GetFrmFmt()->GetFrmSize().GetWidth(); else - bCalcWidth = sal_False; // one line ready + bCalcWidth = false; // one line ready } if( IsEmptyBox( *rPt.pSelBox, aPam ) ) @@ -1391,7 +1389,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, // where is now aInsPos ?? if( bCalcWidth ) - bCalcWidth = sal_False; // one line is ready + bCalcWidth = false; // one line is ready // skip the first TextNode rInsPosNd.Assign( pDoc->GetNodes(), @@ -1417,9 +1415,9 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, } -static sal_Bool lcl_CheckCol(_FndBox const&, sal_Bool* pPara); +static bool lcl_CheckCol(_FndBox const&, bool* pPara); -static sal_Bool lcl_CheckRow( const _FndLine& rFndLine, sal_Bool* pPara ) +static bool lcl_CheckRow( const _FndLine& rFndLine, bool* pPara ) { for (_FndBoxes::const_iterator it = rFndLine.GetBoxes().begin(); it != rFndLine.GetBoxes().end(); ++it) @@ -1429,14 +1427,14 @@ static sal_Bool lcl_CheckRow( const _FndLine& rFndLine, sal_Bool* pPara ) return *pPara; } -static sal_Bool lcl_CheckCol( _FndBox const& rFndBox, sal_Bool* pPara ) +static bool lcl_CheckCol( _FndBox const& rFndBox, bool* pPara ) { if (!rFndBox.GetBox()->GetSttNd()) { if (rFndBox.GetLines().size() != rFndBox.GetBox()->GetTabLines().size()) { - *pPara = sal_False; + *pPara = false; } else BOOST_FOREACH( _FndLine const& rFndLine, rFndBox.GetLines() ) @@ -1444,7 +1442,7 @@ static sal_Bool lcl_CheckCol( _FndBox const& rFndBox, sal_Bool* pPara ) } // is box protected ?? else if (rFndBox.GetBox()->GetFrmFmt()->GetProtect().IsCntntProtected()) - *pPara = sal_False; + *pPara = false; return *pPara; } @@ -1480,7 +1478,7 @@ sal_uInt16 CheckMergeSel( const SwSelBoxes& rBoxes ) ForEach_FndLineCopyCol( (SwTableLines&)pTblNd->GetTable().GetTabLines(), &aPara ); if( !aFndBox.GetLines().empty() ) { - sal_Bool bMergeSelOk = sal_True; + bool bMergeSelOk = true; _FndBox* pFndBox = &aFndBox; _FndLine* pFndLine = 0; while( pFndBox && 1 == pFndBox->GetLines().size() ) @@ -1779,14 +1777,14 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, const SwTabFrm *pEndTable = pEnd->FindTabFrm(); if( !pTable || !pEndTable ) return; - sal_Bool bExchange = sal_False; + bool bExchange = false; if ( pTable != pEndTable ) { if ( !pTable->IsAnFollow( pEndTable ) ) { OSL_ENSURE( pEndTable->IsAnFollow( pTable ), "Tabchain in knots." ); - bExchange = sal_True; + bExchange = true; } } else @@ -1798,10 +1796,10 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, { if( (pStart->Frm().*fnRect->fnGetLeft)() > (pEnd->Frm().*fnRect->fnGetLeft)() ) - bExchange = sal_True; + bExchange = true; } else if( bVert == ( nSttTop < nEndTop ) ) - bExchange = sal_True; + bExchange = true; } if ( bExchange ) { @@ -2204,7 +2202,7 @@ void _FndBox::DelFrms( SwTable &rTable ) { if ( pFrm->GetTabLine() == rTable.GetTabLines()[i] ) { - sal_Bool bDel = sal_True; + bool bDel = true; SwTabFrm *pUp = !pFrm->GetPrev() && !pFrm->GetNext() ? (SwTabFrm*)pFrm->GetUpper() : 0; if ( !pUp ) @@ -2268,7 +2266,7 @@ void _FndBox::DelFrms( SwTable &rTable ) } } delete pUp; - bDel = sal_False; // Row goes to /dev/null. + bDel = false; // Row goes to /dev/null. } } if ( bDel ) @@ -2292,7 +2290,7 @@ void _FndBox::DelFrms( SwTable &rTable ) } } -static sal_Bool lcl_IsLineOfTblFrm( const SwTabFrm& rTable, const SwFrm& rChk ) +static bool lcl_IsLineOfTblFrm( const SwTabFrm& rTable, const SwFrm& rChk ) { const SwTabFrm* pTblFrm = rChk.FindTabFrm(); if( pTblFrm->IsFollow() ) |