summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-21 23:42:48 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-22 08:22:35 +0100
commitb168814577b388de63972d68e298ae96f9eee8a3 (patch)
tree91e40c55becef6862ddbcb8f3829e0b6e52cfc4c /sc
parent7f0fe5444f80472ec454efbccc2a38bebab62625 (diff)
bool improvements
Change-Id: I7f814f53f67e2d6dd44013e7f9055ee256ec4811
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/validat.cxx2
-rw-r--r--sc/source/core/tool/rangeutl.cxx2
-rw-r--r--sc/source/filter/excel/xecontent.cxx4
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx2
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx2
-rw-r--r--sc/source/ui/formdlg/dwfunctr.cxx4
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx2
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx2
-rw-r--r--sc/source/ui/unoobj/chartuno.cxx4
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx2
-rw-r--r--sc/source/ui/view/selectionstate.cxx4
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx4
-rw-r--r--sc/source/ui/view/viewfun2.cxx4
13 files changed, 19 insertions, 19 deletions
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index b7e51bad3cbf..878dc0ab306d 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -346,7 +346,7 @@ bool ScValidationData::DoMacro( const ScAddress& rPos, const OUString& rInput,
pDocument->SetInLinkUpdate( false );
// Eingabe abbrechen, wenn Basic-Makro sal_False zurueckgibt
- if ( eRet == ERRCODE_NONE && refRes->GetType() == SbxBOOL && refRes->GetBool() == false )
+ if ( eRet == ERRCODE_NONE && refRes->GetType() == SbxBOOL && !refRes->GetBool() )
bRet = true;
bDone = true;
}
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index 10fdf137765a..85c5abb1ebdb 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -356,7 +356,7 @@ sal_Int32 ScRangeStringConverter::IndexOf(
{
sal_Int32 nLength = rString.getLength();
sal_Int32 nIndex = nOffset;
- sal_Bool bQuoted = false;
+ bool bQuoted = false;
sal_Bool bExitLoop = false;
while( !bExitLoop && (nIndex >= 0 && nIndex < nLength) )
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 2c92bfe87a95..21394c56091b 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -1483,7 +1483,7 @@ XclExpDV::XclExpDV( const XclExpRoot& rRoot, sal_uLong nScHandle ) :
{
// prompt box - empty string represented by single NUL character
OUString aTitle, aText;
- bool bShowPrompt = (pValData->GetInput( aTitle, aText ) == sal_True);
+ bool bShowPrompt = pValData->GetInput( aTitle, aText );
if( !aTitle.isEmpty() )
maPromptTitle.Assign( aTitle );
else
@@ -1495,7 +1495,7 @@ XclExpDV::XclExpDV( const XclExpRoot& rRoot, sal_uLong nScHandle ) :
// error box - empty string represented by single NUL character
ScValidErrorStyle eScErrorStyle;
- bool bShowError = (pValData->GetErrMsg( aTitle, aText, eScErrorStyle ) == sal_True);
+ bool bShowError = pValData->GetErrMsg( aTitle, aText, eScErrorStyle );
if( !aTitle.isEmpty() )
maErrorTitle.Assign( aTitle );
else
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 39d21738221b..2ebf0cb4ea37 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1474,7 +1474,7 @@ void ScCheckListBox::KeyInput( const KeyEvent& rKEvt )
if ( pEntry )
{
- sal_Bool bCheck = ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED );
+ bool bCheck = ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED );
CheckEntry( pEntry, !bCheck );
if ( bCheck != ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED ) )
CheckButtonHdl();
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index 033ab00612ba..27ebd6f663e7 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -316,7 +316,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
// skip rows that are not selected
if ( !bDoSelection )
{
- if ( (bEnd = !xRowSet->next()) == false )
+ if ( !(bEnd = !xRowSet->next()) )
++nRowsRead;
}
else
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx
index 1d9fc51de8e6..bc72d0dfe70b 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -319,7 +319,7 @@ void ScFunctionDockWin::SetSize()
void ScFunctionDockWin::SetLeftRightSize()
{
- if(bSizeFlag==false)
+ if(!bSizeFlag)
{
bSizeFlag=sal_True;
@@ -366,7 +366,7 @@ void ScFunctionDockWin::SetLeftRightSize()
void ScFunctionDockWin::SetTopBottonSize()
{
- if(bSizeFlag==false)
+ if(!bSizeFlag)
{
bSizeFlag=sal_True;
Size aDiffSize=GetSizePixel();
diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx
index adce6ab0310d..93f367634e51 100644
--- a/sc/source/ui/miscdlgs/crnrdlg.cxx
+++ b/sc/source/ui/miscdlgs/crnrdlg.cxx
@@ -752,7 +752,7 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, AddBtnHdl)
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
ScRange aRange1, aRange2;
sal_Bool bOk1;
- if ( (bOk1 = ((aRange1.ParseAny( aNewArea, pDoc, eConv ) & SCA_VALID) == SCA_VALID)) != false
+ if ( (bOk1 = ((aRange1.ParseAny( aNewArea, pDoc, eConv ) & SCA_VALID) == SCA_VALID))
&& ((aRange2.ParseAny( aNewData, pDoc, eConv ) & SCA_VALID) == SCA_VALID) )
{
theCurArea = aRange1;
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index 0e28c5cdbb70..3085f8dde323 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -699,7 +699,7 @@ static bool lcl_CheckOne_OOO( const OUString& rStr, bool bIsRow, SCCOLROW& rVal
{
sal_Int32 n = aStr.toInt32();
- if ( ( bStrOk = (n > 0) && ( n <= MAXROWCOUNT ) ) != false )
+ if ( ( bStrOk = (n > 0) && ( n <= MAXROWCOUNT ) ) )
nNum = static_cast<SCCOLROW>(n - 1);
}
}
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index 31ef9da291fd..53b8255ab740 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -674,7 +674,7 @@ void SAL_CALL ScChartObj::setHasColumnHeaders( sal_Bool bHasColumnHeaders )
ScRangeListRef xRanges = new ScRangeList;
bool bOldColHeaders, bOldRowHeaders;
GetData_Impl( xRanges, bOldColHeaders, bOldRowHeaders );
- if ( bOldColHeaders != (bHasColumnHeaders != false) )
+ if ( bOldColHeaders != bool(bHasColumnHeaders) )
Update_Impl( xRanges, bHasColumnHeaders, bOldRowHeaders );
}
@@ -694,7 +694,7 @@ void SAL_CALL ScChartObj::setHasRowHeaders( sal_Bool bHasRowHeaders )
ScRangeListRef xRanges = new ScRangeList;
bool bOldColHeaders, bOldRowHeaders;
GetData_Impl( xRanges, bOldColHeaders, bOldRowHeaders );
- if ( bOldRowHeaders != (bHasRowHeaders != false) )
+ if ( bOldRowHeaders != bool(bHasRowHeaders) )
Update_Impl( xRanges, bOldColHeaders, bHasRowHeaders );
}
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index 9abea92f1662..aa4fe7431399 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -423,7 +423,7 @@ ScVbaApplication::setStatusBar( const uno::Any& _statusbar ) throw (uno::Runtime
}
else if( _statusbar >>= bDefault )
{
- if( bDefault == false )
+ if( !bDefault )
{
xStatusIndicator->end();
setDisplayStatusBar( sal_True );
diff --git a/sc/source/ui/view/selectionstate.cxx b/sc/source/ui/view/selectionstate.cxx
index f4ff50c513a7..bbbe313bd0da 100644
--- a/sc/source/ui/view/selectionstate.cxx
+++ b/sc/source/ui/view/selectionstate.cxx
@@ -60,10 +60,10 @@ bool operator==( const ScSelectionState& rL, const ScSelectionState& rR )
if( bEqual ) switch( rL.GetSelectionType() )
{
case SC_SELECTTYPE_EDITCELL:
- bEqual &= ( rL.GetEditSelection().IsEqual( rR.GetEditSelection() ) != false );
+ bEqual &= rL.GetEditSelection().IsEqual( rR.GetEditSelection() );
// run through!
case SC_SELECTTYPE_SHEET:
- bEqual &= (rL.GetSheetSelection() == rR.GetSheetSelection()) == sal_True;
+ bEqual &= rL.GetSheetSelection() == rR.GetSheetSelection();
// run through!
case SC_SELECTTYPE_NONE:
bEqual &= rL.GetCellCursor() == rR.GetCellCursor();
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index de20ea1d594e..c1f533963065 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -525,7 +525,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
const SfxPoolItem* pItem;
if ( pReqArgs && pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET )
{
- sal_Bool bItemValue = ((const SfxBoolItem*)pItem)->GetValue();
+ bool bItemValue = ((const SfxBoolItem*)pItem)->GetValue();
bWantPageBreak = (nSlot == FID_PAGEBREAKMODE) == bItemValue;
}
@@ -977,7 +977,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
const SfxPoolItem* pItem;
if( pReqArgs->HasItem( FID_PROTECT_DOC, &pItem ) &&
- ((const SfxBoolItem*)pItem)->GetValue() == static_cast<sal_Bool>(pDoc->IsDocProtected()) )
+ ((const SfxBoolItem*)pItem)->GetValue() == pDoc->IsDocProtected() )
{
rReq.Ignore();
break;
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index fb07797d1f0e..408b029b3c64 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -481,7 +481,7 @@ sal_Bool ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList )
if ( bRow )
{
nEndRow = static_cast< SCROW >( nExtend );
- if ( ( bContinue = lcl_FindNextSumEntryInColumn( pDoc, nCol, nEndRow /*inout*/, nTab, nExtend /*out*/, 0 ) ) == true )
+ if ( ( bContinue = lcl_FindNextSumEntryInColumn( pDoc, nCol, nEndRow /*inout*/, nTab, nExtend /*out*/, 0 ) ) )
{
nStartRow = nEndRow;
}
@@ -489,7 +489,7 @@ sal_Bool ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList )
else
{
nEndCol = static_cast< SCCOL >( nExtend );
- if ( ( bContinue = lcl_FindNextSumEntryInRow( pDoc, nEndCol /*inout*/, nRow, nTab, nExtend /*out*/, 0 ) ) == true )
+ if ( ( bContinue = lcl_FindNextSumEntryInRow( pDoc, nEndCol /*inout*/, nRow, nTab, nExtend /*out*/, 0 ) ) )
{
nStartCol = nEndCol;
}