Kaydet (Commit) 2bbb4b9c authored tarafından Takeshi Abe's avatar Takeshi Abe

sal_Bool to bool

Change-Id: I8fe2b267454a3a4c235e6de7f44aa127657d0429
üst 5af4fff6
......@@ -106,7 +106,7 @@ extern void sw_GetTblBoxColStr( sal_uInt16 nCol, String& rNm );
#define UNO_TABLE_COLUMN_SUM 10000
static sal_Bool lcl_LineToSvxLine(const table::BorderLine& rLine, SvxBorderLine& rSvxLine)
static bool lcl_LineToSvxLine(const table::BorderLine& rLine, SvxBorderLine& rSvxLine)
{
rSvxLine.SetColor(Color(rLine.Color));
......@@ -115,7 +115,7 @@ static sal_Bool lcl_LineToSvxLine(const table::BorderLine& rLine, SvxBorderLine&
MM100_TO_TWIP( rLine.InnerLineWidth ),
MM100_TO_TWIP( rLine.LineDistance ) );
sal_Bool bRet = rLine.InnerLineWidth > 0 || rLine.OuterLineWidth > 0;
bool bRet = rLine.InnerLineWidth > 0 || rLine.OuterLineWidth > 0;
return bRet;
}
......@@ -596,14 +596,14 @@ static void lcl_GetTblSeparators(uno::Any& rRet, SwTable* pTable, SwTableBox* pB
sal_uInt16 nSepCount = aCols.Count();
uno::Sequence< text::TableColumnSeparator> aColSeq(nSepCount);
text::TableColumnSeparator* pArray = aColSeq.getArray();
sal_Bool bError = sal_False;
bool bError = false;
for(sal_uInt16 i = 0; i < nSepCount; i++)
{
pArray[i].Position = static_cast< sal_Int16 >(aCols[i]);
pArray[i].IsVisible = !aCols.IsHidden(i);
if(!bRow && !pArray[i].IsVisible)
{
bError = sal_True;
bError = true;
break;
}
}
......@@ -1961,7 +1961,7 @@ void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
aSet.Put(aBrush);
}
sal_Bool bPutBreak = sal_True;
bool bPutBreak = true;
const uno::Any* pPage;
if(GetProperty(FN_UNO_PAGE_STYLE, 0, pPage) || GetProperty(RES_PAGEDESC, 0xff, pPage))
{
......@@ -1983,7 +1983,7 @@ void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
aDesc.SetNumOffset( nTmp );
}
aSet.Put(aDesc);
bPutBreak = sal_False;
bPutBreak = false;
}
}
......@@ -2025,18 +2025,18 @@ void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
const uno::Any* pWidth = 0;
GetProperty(FN_TABLE_WIDTH, 0xff, pWidth );
sal_Bool bPutSize = pWidth != 0;
bool bPutSize = pWidth != 0;
SwFmtFrmSize aSz( ATT_VAR_SIZE);
if(pWidth)
{
((SfxPoolItem&)aSz).PutValue(*pWidth, MID_FRMSIZE_WIDTH);
bPutSize = sal_True;
bPutSize = true;
}
sal_Bool bTemp = pSzRel ? *(sal_Bool*)pSzRel->getValue() : sal_False;
if(pSzRel && bTemp && pRelWidth)
{
((SfxPoolItem&)aSz).PutValue(*pRelWidth, MID_FRMSIZE_REL_WIDTH|CONVERT_TWIPS);
bPutSize = sal_True;
bPutSize = true;
}
if(bPutSize)
{
......@@ -2545,7 +2545,7 @@ uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXTextTable::getDataArray()
{
// check if table box value item is set
SwFrmFmt* pBoxFmt = pBox->GetFrmFmt();
sal_Bool bIsNum = pBoxFmt->GetItemState( RES_BOXATR_VALUE, sal_False ) == SFX_ITEM_SET;
bool bIsNum = pBoxFmt->GetItemState( RES_BOXATR_VALUE, sal_False ) == SFX_ITEM_SET;
//const SfxPoolItem* pItem;
//SwDoc* pDoc = pXCell->GetDoc();
//sal_Bool bIsText = (SFX_ITEM_SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, sal_True, &pItem)
......@@ -2682,7 +2682,7 @@ void SwXTextTable::setData(const uno::Sequence< uno::Sequence< double > >& rData
SolarMutexGuard aGuard;
sal_Int16 nRowCount = getRowCount();
sal_Int16 nColCount = getColumnCount();
sal_Bool bChanged = sal_False;
bool bChanged = false;
if(!nRowCount || !nColCount)
{
......@@ -2716,7 +2716,7 @@ void SwXTextTable::setData(const uno::Sequence< uno::Sequence< double > >& rData
throw uno::RuntimeException();
}
xCell->setValue(pColArray[nCol - nColStart]);
bChanged=sal_True;
bChanged=true;
}
}
if ( bChanged )
......@@ -3512,7 +3512,7 @@ void SwXTextTable::setName(const OUString& rName) throw( uno::RuntimeException )
if(pFmt)
{
const String aOldName( pFmt->GetName() );
sal_Bool bNameFound = sal_False;
bool bNameFound = false;
SwFrmFmt* pTmpFmt;
const SwFrmFmts* pTbl = pFmt->GetDoc()->GetTblFrmFmts();
for( sal_uInt16 i = pTbl->size(); i; )
......@@ -3520,7 +3520,7 @@ void SwXTextTable::setName(const OUString& rName) throw( uno::RuntimeException )
pTmpFmt->GetName() == sNewTblName &&
pFmt->GetDoc()->IsUsed( *pTmpFmt ))
{
bNameFound = sal_True;
bNameFound = true;
break;
}
......@@ -4094,7 +4094,7 @@ void SwXCellRange::GetDataSequence(
if (pAnyData)
{
// check if table box value item is set
sal_Bool bIsNum = pBox->GetFrmFmt()->GetItemState( RES_BOXATR_VALUE, sal_False ) == SFX_ITEM_SET;
bool bIsNum = pBox->GetFrmFmt()->GetItemState( RES_BOXATR_VALUE, sal_False ) == SFX_ITEM_SET;
//sal_uLong nNdPos = pBox->IsValidNumTxtNd( sal_True );
if (!bIsNum/* && ULONG_MAX == nNdPos*/)
pAnyData[nDtaCnt++] <<= lcl_getString(*pXCell);
......@@ -4214,7 +4214,7 @@ uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXCellRange::getDataArray()
{
// check if table box value item is set
SwFrmFmt* pBoxFmt = pBox->GetFrmFmt();
sal_Bool bIsNum = pBoxFmt->GetItemState( RES_BOXATR_VALUE, sal_False ) == SFX_ITEM_SET;
bool bIsNum = pBoxFmt->GetItemState( RES_BOXATR_VALUE, sal_False ) == SFX_ITEM_SET;
//const SfxPoolItem* pItem;
//SwDoc* pDoc = pXCell->GetDoc();
//sal_Bool bIsText = (SFX_ITEM_SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, sal_True, &pItem)
......@@ -4773,7 +4773,7 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( uno:
throw uno::RuntimeException();
else
{
sal_Bool bSuccess = sal_False;
bool bSuccess = false;
SwTable* pTable = SwTable::FindTable( pFrmFmt );
if(!pTable->IsTblComplex())
{
......@@ -4805,7 +4805,7 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( uno:
UnoActionContext aAction(pFrmFmt->GetDoc());
pFrmFmt->GetDoc()->DeleteRow(*pUnoCrsr);
delete pUnoCrsr;
bSuccess = sal_True;
bSuccess = true;
}
{
// hier muessen die Actions aufgehoben werden
......@@ -4982,7 +4982,7 @@ void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( u
throw uno::RuntimeException();
else
{
sal_Bool bSuccess = sal_False;
bool bSuccess = false;
SwTable* pTable = SwTable::FindTable( pFrmFmt );
if(!pTable->IsTblComplex())
{
......@@ -5014,7 +5014,7 @@ void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( u
UnoActionContext aAction(pFrmFmt->GetDoc());
pFrmFmt->GetDoc()->DeleteCol(*pUnoCrsr);
delete pUnoCrsr;
bSuccess = sal_True;
bSuccess = true;
}
{
// hier muessen die Actions aufgehoben werden
......
......@@ -948,7 +948,7 @@ SwXText::setString(const OUString& rString) throw (uno::RuntimeException)
//the inserting of nodes should only be done if really necessary
//to prevent #97924# (removes paragraph attributes when setting the text
//e.g. of a table cell
sal_Bool bInsertNodes = sal_False;
bool bInsertNodes = false;
SwNodeIndex aStartIdx(*pStartNode);
do
{
......@@ -957,7 +957,7 @@ SwXText::setString(const OUString& rString) throw (uno::RuntimeException)
if(rCurrentNode.GetNodeType() == ND_SECTIONNODE
||rCurrentNode.GetNodeType() == ND_TABLENODE)
{
bInsertNodes = sal_True;
bInsertNodes = true;
break;
}
}
......
......@@ -200,11 +200,11 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz )
// Limitation of the work area
const Rectangle aRect( Point( DOCUMENTBORDER, DOCUMENTBORDER ), rNewSz );
const Rectangle &rOldWork = GetDrawView()->GetWorkArea();
sal_Bool bCheckDrawObjs = sal_False;
bool bCheckDrawObjs = false;
if ( aRect != rOldWork )
{
if ( rOldWork.Bottom() > aRect.Bottom() || rOldWork.Right() > aRect.Right())
bCheckDrawObjs = sal_True;
bCheckDrawObjs = true;
GetDrawView()->SetWorkArea( aRect );
}
if ( !bCheckDrawObjs )
......
......@@ -77,7 +77,7 @@ Window *ViewShell::pCareWindow = 0;
BitmapEx* ViewShell::pErrorBmp = NULL;
BitmapEx* ViewShell::pReplaceBmp = NULL;
sal_Bool bInSizeNotify = sal_False;
bool bInSizeNotify = false;
DBG_NAME(LayoutIdle)
......@@ -269,7 +269,7 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
// Mitte eine Selektion und mit einem anderen Cursor an linken
// rechten Rand springen. Ohne ShowCrsr verschwindet die
// Selektion
sal_Bool bShowCrsr = pRegion && IsA( TYPE(SwCrsrShell) );
bool bShowCrsr = pRegion && IsA( TYPE(SwCrsrShell) );
if( bShowCrsr )
((SwCrsrShell*)this)->HideCrsrs();
......@@ -290,7 +290,7 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
SwRect aRect( pRegion->back() );
pRegion->pop_back();
sal_Bool bPaint = sal_True;
bool bPaint = true;
if ( IsEndActionByVirDev() )
{
//virtuelles device erzeugen und einstellen.
......@@ -321,7 +321,7 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
}
if ( bSizeOK )
{
bPaint = sal_False;
bPaint = false;
// --> OD 2007-07-26 #i79947#
// #i72754# start Pre/PostPaint encapsulation before pOut is changed to the buffering VDev
......@@ -942,7 +942,7 @@ void ViewShell::CalcLayout()
SwTxtFrm::GetTxtCache()->GetCurMax() - 50 );
//Progress einschalten wenn noch keiner Lauft.
const sal_Bool bEndProgress = SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) == 0;
const bool bEndProgress = SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) == 0;
if ( bEndProgress )
{
sal_uInt16 nEndPage = GetLayout()->GetPageNum();
......@@ -1455,7 +1455,7 @@ void ViewShell::PaintDesktop( const SwRect &rRect )
//Kann z.B. waehrend des Idle'ns zwischenzeitlich auftreten.
//Die Rechtecke neben den Seiten muessen wir leider auf jedenfall Painten,
//den diese werden spaeter beim VisPortChgd ausgespart.
sal_Bool bBorderOnly = sal_False;
bool bBorderOnly = false;
const SwRootFrm *pRoot = GetLayout();//swmod 080305
if ( rRect.Top() > pRoot->Frm().Bottom() )
{
......@@ -1463,7 +1463,7 @@ void ViewShell::PaintDesktop( const SwRect &rRect )
while ( pPg && pPg->GetNext() )
pPg = pPg->GetNext();
if ( !pPg || !pPg->Frm().IsOver( VisArea() ) )
bBorderOnly = sal_True;
bBorderOnly = true;
}
const bool bBookMode = GetViewOptions()->IsViewLayoutBookMode();
......@@ -2098,7 +2098,7 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
pDView->SetMarkHdlSizePixel(9);
}
sal_Bool bOnlineSpellChgd = pOpt->IsOnlineSpell() != rOpt.IsOnlineSpell();
bool bOnlineSpellChgd = pOpt->IsOnlineSpell() != rOpt.IsOnlineSpell();
*pOpt = rOpt; // Erst jetzt werden die Options uebernommen.
pOpt->SetUIOptions(rOpt);
......@@ -2213,8 +2213,8 @@ void ViewShell::UISizeNotify()
if ( bDocSizeChgd )
{
bDocSizeChgd = sal_False;
sal_Bool bOld = bInSizeNotify;
bInSizeNotify = sal_True;
bool bOld = bInSizeNotify;
bInSizeNotify = true;
::SizeNotify( this, GetDocSize() );
bInSizeNotify = bOld;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment