diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2012-11-27 20:49:30 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2012-11-27 21:13:32 +0900 |
commit | fc61f0dbb9aabdfd2345c36e3a6fb70b3d72a323 (patch) | |
tree | fdf1649ba752e7439562a5d15c565b7cf4ab276f /sw | |
parent | 8b30ab19eb6093b9742f957c53823dc346dcda2b (diff) |
sal_Bool to bool
Change-Id: If000e5980fc7982a21f62b1c90b362abc52019a0
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/inc/frmtool.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/layouter.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/rootfrm.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/layout/frmtool.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/ftnfrm.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/layout/layact.cxx | 38 | ||||
-rw-r--r-- | sw/source/core/layout/laycache.cxx | 80 | ||||
-rw-r--r-- | sw/source/core/layout/layhelp.hxx | 28 | ||||
-rw-r--r-- | sw/source/core/layout/layouter.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/layout/newfrm.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 6 |
11 files changed, 89 insertions, 89 deletions
diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx index 2006675b6b90..1a689211334b 100644 --- a/sw/source/core/inc/frmtool.hxx +++ b/sw/source/core/inc/frmtool.hxx @@ -100,7 +100,7 @@ long CalcRowRstHeight( SwLayoutFrm *pRow ); long CalcHeightWidthFlys( const SwFrm *pFrm ); SwPageFrm *InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper, - sal_Bool bOdd, bool bFirst, sal_Bool bInsertEmpty, sal_Bool bFtn, + bool bOdd, bool bFirst, bool bInsertEmpty, sal_Bool bFtn, SwFrm *pSibling ); // connect Flys with page diff --git a/sw/source/core/inc/layouter.hxx b/sw/source/core/inc/layouter.hxx index 2bf1ef02aa26..977cbface2ca 100644 --- a/sw/source/core/inc/layouter.hxx +++ b/sw/source/core/inc/layouter.hxx @@ -110,7 +110,7 @@ public: ~SwLayouter(); void InsertEndnotes( SwSectionFrm* pSect ); void CollectEndnote( SwFtnFrm* pFtn ); - sal_Bool HasEndnotes() const; + bool HasEndnotes() const; void LoopControl( SwPageFrm* pPage, sal_uInt8 nLoop ); void EndLoopControl(); diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx index 02014dcd5cde..8c467c41b61b 100644 --- a/sw/source/core/inc/rootfrm.hxx +++ b/sw/source/core/inc/rootfrm.hxx @@ -82,7 +82,7 @@ class SwRootFrm: public SwLayoutFrm bool mbNeedGrammarCheck; // true when sth needs to be checked (not necessarily started yet!) static SwLayVout *pVout; - static sal_Bool bInPaint; //Schutz gegen doppelte Paints. + static bool bInPaint; //Schutz gegen doppelte Paints. static sal_Bool bNoVirDev; //Bei SystemPaints kein virt. Device sal_Bool bCheckSuperfluous :1; //Leere Seiten suchen? @@ -291,7 +291,7 @@ public: const SwPageFrm *GetLastPage() const { return pLastPage; } SwPageFrm *GetLastPage() { return pLastPage; } - static sal_Bool IsInPaint() { return bInPaint; } + static bool IsInPaint() { return bInPaint; } static void SetNoVirDev( const sal_Bool bNew ) { bNoVirDev = bNew; } diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index cb7500eebf02..16634a5b4633 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -2736,7 +2736,7 @@ sal_uLong SqRt( BigInt nX ) /*************************************************************************/ SwPageFrm * InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper, - sal_Bool bOdd, bool bFirst, sal_Bool bInsertEmpty, sal_Bool bFtn, + bool bOdd, bool bFirst, bool bInsertEmpty, sal_Bool bFtn, SwFrm *pSibling ) { SwPageFrm *pRet; diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index bbd4608f4ee2..2b11b04e1f45 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -1646,7 +1646,7 @@ void SwFtnBossFrm::AppendFtn( SwCntntFrm *pRef, SwTxtFtn *pAttr ) { SwPageDesc *pDesc = pDoc->GetEndNoteInfo().GetPageDesc( *pDoc ); pPage = ::InsertNewPage( *pDesc, pPage->GetUpper(), - !pPage->OnRightPage(), false, sal_False, sal_True, 0 ); + !pPage->OnRightPage(), false, false, sal_True, 0 ); pPage->SetEndNotePage( sal_True ); bChgPage = true; } @@ -1690,7 +1690,7 @@ void SwFtnBossFrm::AppendFtn( SwCntntFrm *pRef, SwTxtFtn *pAttr ) { SwPageDesc *pDesc = pDoc->GetFtnInfo().GetPageDesc( *pDoc ); pPage = ::InsertNewPage( *pDesc, pPage->GetUpper(), - !pPage->OnRightPage(), false, sal_False, sal_True, pPage->GetNext() ); + !pPage->OnRightPage(), false, false, sal_True, pPage->GetNext() ); bChgPage = true; } else diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 26de885b3650..468ee65747d5 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1128,7 +1128,7 @@ sal_Bool SwLayAction::IsShortCut( SwPageFrm *&prPage ) { sal_Bool bRet = sal_False; const ViewShell *pSh = pRoot->GetCurrShell(); - const sal_Bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode(); + const bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode(); // If the page is not valid, we quickly format it, otherwise // there's gonna be no end of trouble @@ -1139,7 +1139,7 @@ sal_Bool SwLayAction::IsShortCut( SwPageFrm *&prPage ) /// OD 15.10.2002 #103517# - format complete page /// Thus, loop on all lowers of the page <prPage>, instead of only /// format its first lower. - /// NOTE: In online layout (bBrowse == sal_True) a page can contain + /// NOTE: In online layout (bBrowse == true) a page can contain /// a header frame and/or a footer frame beside the body frame. prPage->Calc(); SwFrm* pPageLowerFrm = prPage->Lower(); @@ -1192,7 +1192,7 @@ sal_Bool SwLayAction::IsShortCut( SwPageFrm *&prPage ) } if ( pCntnt ) { - sal_Bool bTstCnt = sal_True; + bool bTstCnt = true; if ( bBrowse ) { // Is the Cnt before already invisible? @@ -1206,7 +1206,7 @@ sal_Bool SwLayAction::IsShortCut( SwPageFrm *&prPage ) (pLst->Frm().Top() >= rVis.Bottom() || pLst->Frm().Left()>= rVis.Right()) ) { - bTstCnt = sal_False; + bTstCnt = false; } } @@ -1355,7 +1355,7 @@ sal_Bool SwLayAction::FormatLayout( SwLayoutFrm *pLay, sal_Bool bAddRect ) return sal_False; sal_Bool bChanged = sal_False; - sal_Bool bAlreadyPainted = sal_False; + bool bAlreadyPainted = false; // OD 11.11.2002 #104414# - remember frame at complete paint SwRect aFrmAtCompletePaint; @@ -1375,7 +1375,7 @@ sal_Bool SwLayAction::FormatLayout( SwLayoutFrm *pLay, sal_Bool bAddRect ) if ( aOldFrame != pLay->Frm() ) bChanged = sal_True; - sal_Bool bNoPaint = sal_False; + bool bNoPaint = false; if ( pLay->IsPageBodyFrm() && pLay->Frm().Pos() == aOldRect.Pos() && pLay->Lower() ) @@ -1384,7 +1384,7 @@ sal_Bool SwLayAction::FormatLayout( SwLayoutFrm *pLay, sal_Bool bAddRect ) // Limitations because of headers / footers if( pSh && pSh->GetViewOptions()->getBrowseMode() && !( pLay->IsCompletePaint() && pLay->FindPageFrm()->FindFtnCont() ) ) - bNoPaint = sal_True; + bNoPaint = true; } if ( !bNoPaint && IsPaint() && bAddRect && (pLay->IsCompletePaint() || bChanged) ) @@ -1434,7 +1434,7 @@ sal_Bool SwLayAction::FormatLayout( SwLayoutFrm *pLay, sal_Bool bAddRect ) else { pImp->GetShell()->AddPaintRect( aPaint ); - bAlreadyPainted = sal_True; + bAlreadyPainted = true; // OD 11.11.2002 #104414# - remember frame at complete paint aFrmAtCompletePaint = pLay->Frm(); } @@ -1625,7 +1625,7 @@ sal_Bool SwLayAction::FormatLayoutTab( SwTabFrm *pTab, sal_Bool bAddRect ) pTimerAccess->BlockIdling(); sal_Bool bChanged = sal_False; - sal_Bool bPainted = sal_False; + bool bPainted = false; const SwPageFrm *pOldPage = pTab->FindPageFrm(); @@ -1698,7 +1698,7 @@ sal_Bool SwLayAction::FormatLayoutTab( SwTabFrm *pTab, sal_Bool bAddRect ) { pImp->GetShell()->AddPaintRect( aPaintFrm ); bAddRect = sal_False; - bPainted = sal_True; + bPainted = true; } if ( pTab->IsRetouche() && !pTab->GetNext() ) @@ -1772,23 +1772,23 @@ sal_Bool SwLayAction::FormatCntnt( const SwPageFrm *pPage ) { const SwCntntFrm *pCntnt = pPage->ContainsCntnt(); const ViewShell *pSh = pRoot->GetCurrShell(); - const sal_Bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode(); + const bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode(); while ( pCntnt && pPage->IsAnLower( pCntnt ) ) { // If the Cntnt didn't change, we can use a few shortcuts. - const sal_Bool bFull = !pCntnt->IsValid() || pCntnt->IsCompletePaint() || + const bool bFull = !pCntnt->IsValid() || pCntnt->IsCompletePaint() || pCntnt->IsRetouche() || pCntnt->GetDrawObjs(); if ( bFull ) { // We do this so we don't have to search later on. - const sal_Bool bNxtCnt = IsCalcLayout() && !pCntnt->GetFollow(); + const bool bNxtCnt = IsCalcLayout() && !pCntnt->GetFollow(); const SwCntntFrm *pCntntNext = bNxtCnt ? pCntnt->GetNextCntntFrm() : 0; const SwCntntFrm *pCntntPrev = pCntnt->GetPrev() ? pCntnt->GetPrevCntntFrm() : 0; const SwLayoutFrm*pOldUpper = pCntnt->GetUpper(); const SwTabFrm *pTab = pCntnt->FindTabFrm(); - const sal_Bool bInValid = !pCntnt->IsValid() || pCntnt->IsCompletePaint(); + const bool bInValid = !pCntnt->IsValid() || pCntnt->IsCompletePaint(); const sal_Bool bOldPaint = IsPaint(); bPaint = bOldPaint && !(pTab && pTab == pOptTab); _FormatCntnt( pCntnt, pPage ); @@ -1860,7 +1860,7 @@ sal_Bool SwLayAction::FormatCntnt( const SwPageFrm *pPage ) // the predecessor. // This way, we catch predecessors which are now responsible for // retouching, but the footers will be touched also. - sal_Bool bSetCntnt = sal_True; + bool bSetCntnt = true; if ( pCntntPrev ) { if ( !pCntntPrev->IsValid() && pPage->IsAnLower( pCntntPrev ) ) @@ -1869,7 +1869,7 @@ sal_Bool SwLayAction::FormatCntnt( const SwPageFrm *pPage ) pPage->GetPhyPageNum() < pCntnt->FindPageFrm()->GetPhyPageNum() ) { pCntnt = pCntntPrev; - bSetCntnt = sal_False; + bSetCntnt = false; } } if ( bSetCntnt ) @@ -2395,14 +2395,14 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) : // solution would be disproportionally expensive. //fix(18176): SwViewImp *pViewImp = pSh->Imp(); - sal_Bool bUnlock = sal_False; + bool bUnlock = false; if ( pViewImp->GetRegion() ) { pViewImp->DelRegion(); // Cause a repaint with virtual device. pSh->LockPaint(); - bUnlock = sal_True; + bUnlock = true; } if ( bCrsrShell ) @@ -2449,7 +2449,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) : const sal_Bool bSpell = rVOpt.IsOnlineSpell(); const sal_Bool bACmplWrd = rVOpt.IsAutoCompleteWords(); const sal_Bool bWordCount = pViewShell->getIDocumentStatistics()->GetDocStat().bModified; - const sal_Bool bSmartTags = !pViewShell->GetDoc()->GetDocShell()->IsHelpDocument() && + const bool bSmartTags = !pViewShell->GetDoc()->GetDocShell()->IsHelpDocument() && !pViewShell->GetDoc()->isXForms() && SwSmartTagMgr::Get().IsSmartTagsEnabled(); // SMARTTAGS diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index ed13aa266e11..ea4deecb49a1 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -100,11 +100,11 @@ void SwLayCacheImpl::Insert( sal_uInt16 nType, sal_uLong nIndex, xub_StrLen nOff aOffset.push_back( nOffset ); } -sal_Bool SwLayCacheImpl::Read( SvStream& rStream ) +bool SwLayCacheImpl::Read( SvStream& rStream ) { - SwLayCacheIoImpl aIo( rStream, sal_False ); + SwLayCacheIoImpl aIo( rStream, false ); if( aIo.GetMajorVersion() > SW_LAYCACHE_IO_VERSION_MAJOR ) - return sal_False; + return false; // Due to an evil bug in the layout cache (#102759#), we cannot trust the // sizes of fly frames which have been written using the "old" layout cache. @@ -184,7 +184,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc ) { if( rDoc.GetCurrentLayout() ) // the layout itself .. //swmod 080218 { - SwLayCacheIoImpl aIo( rStream, sal_True ); + SwLayCacheIoImpl aIo( rStream, true ); // We want to save the relative index, so we need the index // of the first content sal_uLong nStartOfContent = rDoc.GetNodes().GetEndOfContent(). @@ -506,7 +506,7 @@ SwActualSection::SwActualSection( SwActualSection *pUp, SwLayHelper::SwLayHelper( SwDoc *pD, SwFrm* &rpF, SwFrm* &rpP, SwPageFrm* &rpPg, SwLayoutFrm* &rpL, SwActualSection* &rpA, sal_Bool &rB, - sal_uLong nNodeIndex, sal_Bool bCache ) + sal_uLong nNodeIndex, bool bCache ) : rpFrm( rpF ), rpPrv( rpP ), rpPage( rpPg ), rpLay( rpL ), rpActualSection( rpA ), rbBreakAfter(rB), pDoc(pD), nMaxParaPerPage( 25 ), nParagraphCnt( bCache ? 0 : USHRT_MAX ), bFirst( bCache ) @@ -605,7 +605,7 @@ sal_uLong SwLayHelper::CalcPageCount() /* * SwLayHelper::CheckInsertPage() - * inserts a page and return sal_True, if + * inserts a page and return true, if * - the break after flag is set * - the actual content wants a break before * - the maximum count of paragraph/rows is reached @@ -614,9 +614,9 @@ sal_uLong SwLayHelper::CalcPageCount() * wants a break after. */ -sal_Bool SwLayHelper::CheckInsertPage() +bool SwLayHelper::CheckInsertPage() { - sal_Bool bEnd = 0 == rpPage->GetNext(); + bool bEnd = 0 == rpPage->GetNext(); const SwAttrSet* pAttr = rpFrm->GetAttrSet(); const SvxFmtBreakItem& rBrk = pAttr->GetBreak(); const SwFmtPageDesc& rDesc = pAttr->GetPageDesc(); @@ -627,7 +627,7 @@ sal_Bool SwLayHelper::CheckInsertPage() 0 : rDesc.GetPageDesc(); - sal_Bool bBrk = nParagraphCnt > nMaxParaPerPage || rbBreakAfter; + bool bBrk = nParagraphCnt > nMaxParaPerPage || rbBreakAfter; rbBreakAfter = rBrk.GetBreak() == SVX_BREAK_PAGE_AFTER || rBrk.GetBreak() == SVX_BREAK_PAGE_BOTH; if ( !bBrk ) @@ -644,12 +644,12 @@ sal_Bool SwLayHelper::CheckInsertPage() if ( 0 != (nPgNum = rDesc.GetNumOffset()) ) ((SwRootFrm*)rpPage->GetUpper())->SetVirtPageNum(sal_True); } - sal_Bool bNextPageOdd = !rpPage->OnRightPage(); - sal_Bool bInsertEmpty = sal_False; + bool bNextPageOdd = !rpPage->OnRightPage(); + bool bInsertEmpty = false; if( nPgNum && bNextPageOdd != ( ( nPgNum % 2 ) != 0 ) ) { bNextPageOdd = !bNextPageOdd; - bInsertEmpty = sal_True; + bInsertEmpty = true; } // If the page style is changing, we'll have a first page. bool bNextPageFirst = pDesc != rpPage->GetPageDesc(); @@ -675,9 +675,9 @@ sal_Bool SwLayHelper::CheckInsertPage() rpLay = rpPage->FindBodyCont(); while( rpLay->Lower() ) rpLay = (SwLayoutFrm*)rpLay->Lower(); - return sal_True; + return true; } - return sal_False; + return false; } /* @@ -690,10 +690,10 @@ sal_Bool SwLayHelper::CheckInsertPage() * one page, in this case the needed count of pages will inserted. */ -sal_Bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex ) +bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex ) { - sal_Bool bRet = sal_False; - sal_Bool bLongTab = sal_False; + bool bRet = false; + bool bLongTab = false; sal_uLong nMaxRowPerPage( 0 ); nNodeIndex -= nStartOfContent; sal_uInt16 nRows( 0 ); @@ -733,7 +733,7 @@ sal_Bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex ) } while( pTmp ); nMaxRowPerPage = Max( sal_uLong(2), nMaxParaPerPage / nCnt ); } - bLongTab = sal_True; + bLongTab = true; } } else @@ -743,7 +743,7 @@ sal_Bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex ) ( pImpl->GetBreakOfst( nIndex ) < STRING_LEN || ( ++nIndex < pImpl->size() && pImpl->GetBreakIndex( nIndex ) == nNodeIndex ) ) ) - bFirst = sal_False; + bFirst = false; #if OSL_DEBUG_LEVEL > 1 sal_uLong nBreakIndex = ( pImpl && nIndex < pImpl->size() ) ? pImpl->GetBreakIndex(nIndex) : 0xffff; @@ -787,12 +787,12 @@ sal_Bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex ) if( nOfst < STRING_LEN ) { - sal_Bool bSplit = sal_False; + bool bSplit = false; sal_uInt16 nRepeat( 0 ); if( !bLongTab && rpFrm->IsTxtFrm() && SW_LAYCACHE_IO_REC_PARA == nType && nOfst<((SwTxtFrm*)rpFrm)->GetTxtNode()->GetTxt().Len() ) - bSplit = sal_True; + bSplit = true; else if( rpFrm->IsTabFrm() && nRowCount < nOfst && ( bLongTab || SW_LAYCACHE_IO_REC_TABLE == nType ) ) { @@ -876,7 +876,7 @@ sal_Bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex ) if( rpPrv && rpPrv->IsTxtFrm() && !rpPrv->GetValidSizeFlag() ) rpPrv->Frm().Height( rpPrv->GetUpper()->Prt().Height() ); - bRet = sal_True; + bRet = true; rpPrv = 0; nParagraphCnt = 0; @@ -913,7 +913,7 @@ sal_Bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex ) } while( bLongTab || ( pImpl && nIndex < pImpl->size() && (*pImpl)[ nIndex ] == nNodeIndex ) ); } - bFirst = sal_False; + bFirst = false; return bRet; } @@ -1034,12 +1034,12 @@ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage ) * the rpPage parameter to the right page, if possible. */ -sal_Bool SwLayHelper::CheckPageFlyCache( SwPageFrm* &rpPage, SwFlyFrm* pFly ) +bool SwLayHelper::CheckPageFlyCache( SwPageFrm* &rpPage, SwFlyFrm* pFly ) { if( !pFly->GetAnchorFrm() || !pFly->GetVirtDrawObj() || pFly->GetAnchorFrm()->FindFooterOrHeader() ) - return sal_False; - sal_Bool bRet = sal_False; + return false; + bool bRet = false; SwDoc* pDoc = rpPage->GetFmt()->GetDoc(); SwLayCacheImpl *pCache = pDoc->GetLayoutCache() ? pDoc->GetLayoutCache()->LockImpl() : NULL; @@ -1082,7 +1082,7 @@ sal_Bool SwLayHelper::CheckPageFlyCache( SwPageFrm* &rpPage, SwFlyFrm* pFly ) pFly->Frm().Width( pFlyC->Width() ); pFly->Frm().Height( pFlyC->Height() ); } - bRet = sal_True; + bRet = true; } } pDoc->GetLayoutCache()->UnlockImpl(); @@ -1092,12 +1092,12 @@ sal_Bool SwLayHelper::CheckPageFlyCache( SwPageFrm* &rpPage, SwFlyFrm* pFly ) // ----------------------------------------------------------------------------- -SwLayCacheIoImpl::SwLayCacheIoImpl( SvStream& rStrm, sal_Bool bWrtMd ) : +SwLayCacheIoImpl::SwLayCacheIoImpl( SvStream& rStrm, bool bWrtMd ) : pStream( &rStrm ), nMajorVersion(SW_LAYCACHE_IO_VERSION_MAJOR), nMinorVersion(SW_LAYCACHE_IO_VERSION_MINOR), bWriteMode( bWrtMd ), - bError( sal_False ) + bError( false ) { if( bWriteMode ) *pStream << nMajorVersion @@ -1108,9 +1108,9 @@ SwLayCacheIoImpl::SwLayCacheIoImpl( SvStream& rStrm, sal_Bool bWrtMd ) : >> nMinorVersion; } -sal_Bool SwLayCacheIoImpl::OpenRec( sal_uInt8 cType ) +bool SwLayCacheIoImpl::OpenRec( sal_uInt8 cType ) { - sal_Bool bRes = sal_True; + bool bRes = true; sal_uInt32 nPos = pStream->Tell(); if( bWriteMode ) { @@ -1128,8 +1128,8 @@ sal_Bool SwLayCacheIoImpl::OpenRec( sal_uInt8 cType ) OSL_ENSURE( nVal, "OpenRec: Record-Header is 0" ); OSL_ENSURE( cRecTyp == cType, "OpenRec: Wrong Record Type" ); aRecords.push_back( RecTypeSize(0, pStream->Tell()) ); - bRes = sal_False; - bError = sal_True; + bRes = false; + bError = true; } else { @@ -1142,9 +1142,9 @@ sal_Bool SwLayCacheIoImpl::OpenRec( sal_uInt8 cType ) // Close record -sal_Bool SwLayCacheIoImpl::CloseRec( sal_uInt8 ) +bool SwLayCacheIoImpl::CloseRec( sal_uInt8 ) { - sal_Bool bRes = sal_True; + bool bRes = true; OSL_ENSURE( !aRecords.empty(), "CloseRec: no levels" ); if( !aRecords.empty() ) { @@ -1158,7 +1158,7 @@ sal_Bool SwLayCacheIoImpl::CloseRec( sal_uInt8 ) *pStream << nVal; pStream->Seek( nPos ); if( pStream->GetError() != SVSTREAM_OK ) - bRes = sal_False; + bRes = false; } else { @@ -1168,16 +1168,16 @@ sal_Bool SwLayCacheIoImpl::CloseRec( sal_uInt8 ) { pStream->Seek( n ); if( n < nPos ) - bRes = sal_False; + bRes = false; } if( pStream->GetErrorCode() != SVSTREAM_OK ) - bRes = sal_False; + bRes = false; } aRecords.pop_back(); } if( !bRes ) - bError = sal_True; + bError = true; return bRes; } @@ -1206,7 +1206,7 @@ sal_uInt8 SwLayCacheIoImpl::Peek() if( pStream->GetErrorCode() != SVSTREAM_OK ) { c = 0; - bError = sal_True; + bError = true; } } return c; diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx index 02f4e57ecc84..551ad747032b 100644 --- a/sw/source/core/layout/layhelp.hxx +++ b/sw/source/core/layout/layhelp.hxx @@ -64,12 +64,12 @@ class SwLayCacheImpl : public std::vector<sal_uLong> std::deque<xub_StrLen> aOffset; std::vector<sal_uInt16> aType; SwPageFlyCache aFlyCache; - sal_Bool bUseFlyCache; + bool bUseFlyCache; void Insert( sal_uInt16 nType, sal_uLong nIndex, xub_StrLen nOffset ); public: SwLayCacheImpl() {} - sal_Bool Read( SvStream& rStream ); + bool Read( SvStream& rStream ); sal_uLong GetBreakIndex( sal_uInt16 nIdx ) const { return std::vector<sal_uLong>::operator[]( nIdx ); } xub_StrLen GetBreakOfst( size_t nIdx ) const { return aOffset[ nIdx ]; } @@ -78,7 +78,7 @@ public: sal_uInt16 GetFlyCount() const { return aFlyCache.size(); } SwFlyCache *GetFlyCache( sal_uInt16 nIdx ) { return &aFlyCache[ nIdx ]; } - sal_Bool IsUseFlyCache() const { return bUseFlyCache; } + bool IsUseFlyCache() const { return bUseFlyCache; } }; /************************************************************************* @@ -124,17 +124,17 @@ class SwLayHelper sal_uLong nStartOfContent; sal_uInt16 nIndex; // the index in the page break array sal_uInt16 nFlyIdx; // the index in the fly cache array - sal_Bool bFirst : 1; + bool bFirst : 1; void _CheckFlyCache( SwPageFrm* pPage ); public: SwLayHelper( SwDoc *pD, SwFrm* &rpF, SwFrm* &rpP, SwPageFrm* &rpPg, SwLayoutFrm* &rpL, SwActualSection* &rpA, sal_Bool &rBrk, - sal_uLong nNodeIndex, sal_Bool bCache ); + sal_uLong nNodeIndex, bool bCache ); ~SwLayHelper(); sal_uLong CalcPageCount(); - sal_Bool CheckInsert( sal_uLong nNodeIndex ); + bool CheckInsert( sal_uLong nNodeIndex ); - sal_Bool CheckInsertPage(); + bool CheckInsertPage(); // Look for fresh text frames at this (new) page and set them to the right // position, if they are in the fly cache. @@ -143,7 +143,7 @@ public: // Look for this text frame and set it to the right position, // if it's in the fly cache. - static sal_Bool CheckPageFlyCache( SwPageFrm* &rpPage, SwFlyFrm* pFly ); + static bool CheckPageFlyCache( SwPageFrm* &rpPage, SwFlyFrm* pFly ); }; /************************************************************************* @@ -177,21 +177,21 @@ private: sal_uInt16 nMajorVersion; sal_uInt16 nMinorVersion; - sal_Bool bWriteMode : 1; - sal_Bool bError : 1; + bool bWriteMode : 1; + bool bError : 1; public: - SwLayCacheIoImpl( SvStream& rStrm, sal_Bool bWrtMd ); + SwLayCacheIoImpl( SvStream& rStrm, bool bWrtMd ); // Get input or output stream SvStream& GetStream() const { return *pStream; } // Open a record of type "nType" - sal_Bool OpenRec( sal_uInt8 nType ); + bool OpenRec( sal_uInt8 nType ); // Close a record of type "nType". This skips any unread data that // remains in the record. - sal_Bool CloseRec( sal_uInt8 nType ); + bool CloseRec( sal_uInt8 nType ); // Return the number of bytes contained in the current record that // haven't been read by now. @@ -214,7 +214,7 @@ public: // Close a flag record. Any bytes left are skipped. void CloseFlagRec(); - sal_Bool HasError() const { return bError; } + bool HasError() const { return bError; } sal_uInt16 GetMajorVersion() const { return nMajorVersion; } sal_uInt16 GetMinorVersion() const { return nMinorVersion; } diff --git a/sw/source/core/layout/layouter.cxx b/sw/source/core/layout/layouter.cxx index 68264c9e899b..52e68136266d 100644 --- a/sw/source/core/layout/layouter.cxx +++ b/sw/source/core/layout/layouter.cxx @@ -69,7 +69,7 @@ public: void CollectEndnote( SwFtnFrm* pFtn ); const SwSectionFrm* GetSect() const { return pSect; } void InsertEndnotes(); - sal_Bool HasEndnotes() const { return pEndArr && !pEndArr->empty(); } + bool HasEndnotes() const { return pEndArr && !pEndArr->empty(); } }; void SwEndnoter::CollectEndnotes( SwSectionFrm* pSct ) @@ -194,7 +194,7 @@ void SwLooping::Control( SwPageFrm* pPage ) else if( ++nCount > LOOP_DETECT ) { #if OSL_DEBUG_LEVEL > 1 - static sal_Bool bNoLouie = sal_False; + static bool bNoLouie = false; if( bNoLouie ) return; @@ -250,7 +250,7 @@ void SwLayouter::_CollectEndnotes( SwSectionFrm* pSect ) pEndnoter->CollectEndnotes( pSect ); } -sal_Bool SwLayouter::HasEndnotes() const +bool SwLayouter::HasEndnotes() const { return pEndnoter->HasEndnotes(); } diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx index 307c724c4f72..f4704f8d8249 100644 --- a/sw/source/core/layout/newfrm.cxx +++ b/sw/source/core/layout/newfrm.cxx @@ -57,7 +57,7 @@ #include <set> SwLayVout *SwRootFrm::pVout = 0; -sal_Bool SwRootFrm::bInPaint = sal_False; +bool SwRootFrm::bInPaint = false; sal_Bool SwRootFrm::bNoVirDev = sal_False; SwCache *SwFrm::pCache = 0; @@ -554,11 +554,11 @@ void SwRootFrm::Init( SwFrmFmt* pFmt ) bIsVirtPageNum = sal_False; if ( !pDesc ) pDesc = &pDoc->GetPageDesc( 0 ); - const sal_Bool bOdd = !nPgNum || 0 != ( nPgNum % 2 ); + const bool bOdd = !nPgNum || 0 != ( nPgNum % 2 ); bool bFirst = !nPgNum || 1 == nPgNum; // Create a page and put it in the layout - SwPageFrm *pPage = ::InsertNewPage( *pDesc, this, bOdd, bFirst, sal_False, sal_False, 0 ); + SwPageFrm *pPage = ::InsertNewPage( *pDesc, this, bOdd, bFirst, false, sal_False, 0 ); // Find the first page in the Bodytext section. SwLayoutFrm *pLay = pPage->FindBodyCont(); diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index b6da50985ae5..58e86f532aea 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -2915,7 +2915,7 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const PROTOCOL( this, PROT_FILE_INIT, 0, 0) - sal_Bool bResetRootPaint = sal_False; + bool bResetRootPaint = false; ViewShell *pSh = pCurrShell; if ( pSh->GetWin() ) @@ -2931,7 +2931,7 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const } } else - SwRootFrm::bInPaint = bResetRootPaint = sal_True; + SwRootFrm::bInPaint = bResetRootPaint = true; SwSavePaintStatics *pStatics = 0; if ( pGlobalShell ) @@ -3250,7 +3250,7 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const DELETEZ( pLines ); if ( bResetRootPaint ) - SwRootFrm::bInPaint = sal_False; + SwRootFrm::bInPaint = false; if ( pStatics ) delete pStatics; else |