summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-27 15:28:46 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-27 15:31:00 +0200
commit6c97d801203b277428e329d174c8650e5fae78ab (patch)
tree6f3bd74f23cabfdac763e3c02ee973d43f4d9c9f
parentMore loplugin:simplifybool (diff)
downloadcore-6c97d801203b277428e329d174c8650e5fae78ab.tar.gz
core-6c97d801203b277428e329d174c8650e5fae78ab.zip
More loplugin:simplifybool
Change-Id: I65ea51a6d34942acfe8c4fe0dee62781251fb1bf
-rw-r--r--sc/source/core/data/docpool.cxx2
-rw-r--r--sc/source/core/data/dpoutput.cxx2
-rw-r--r--sc/source/core/opencl/formulagroupcl.cxx4
-rw-r--r--sc/source/filter/excel/xepivot.cxx8
-rw-r--r--sc/source/filter/excel/xeview.cxx2
-rw-r--r--sc/source/filter/excel/xistyle.cxx12
-rw-r--r--sc/source/ui/miscdlgs/warnbox.cxx2
-rw-r--r--sc/source/ui/namedlg/namemgrtable.cxx2
-rw-r--r--sc/source/ui/vba/vbaaxes.cxx2
-rw-r--r--sc/source/ui/vba/vbavalidation.cxx2
-rw-r--r--sc/source/ui/view/viewfun2.cxx4
11 files changed, 21 insertions, 21 deletions
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 2effa6d9cfee..7a9009b64499 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -703,7 +703,7 @@ static bool lcl_HFPresentation
if ( SfxItemState::SET == rSet.GetItemState(ATTR_PAGE_ON,false,&pItem) )
{
- if( false == static_cast<const SfxBoolItem*>(pItem)->GetValue() )
+ if( !static_cast<const SfxBoolItem*>(pItem)->GetValue() )
return false;
}
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index dee436ac8ea7..450c5bb7393d 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -1105,7 +1105,7 @@ void ScDPOutput::Output()
++nEnd;
SCROW nEndRowPos = nDataStartRow + (SCROW)nEnd; //TODO: check for overflow
outputimp.AddRow( nRowPos );
- if ( vbSetBorder[ nRow ] == false )
+ if ( !vbSetBorder[ nRow ] )
{
outputimp.OutputBlockFrame( nColPos, nRowPos, nTabEndCol, nEndRowPos );
vbSetBorder[ nRow ] = true;
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 1ad51200dda1..368c525a6d3b 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -1693,7 +1693,7 @@ public:
if (NumericRange* NR =
dynamic_cast<NumericRange*>(vSubArguments[i].get()))
{
- bool needBody; NR->GenReductionLoopHeader(ss, needBody); if (needBody == false)
+ bool needBody; NR->GenReductionLoopHeader(ss, needBody); if (!needBody)
continue;
}
else if (ParallelNumericRange* PNR =
@@ -1711,7 +1711,7 @@ public:
//did not handle yet
bool needBody;
SR->GenReductionLoopHeader(ss, needBody);
- if (needBody == false)
+ if (!needBody)
continue;
}
else
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index d4039c5feca3..035a186a9d03 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -462,7 +462,7 @@ void XclExpPCField::InsertOrigTextItem( const OUString& rText )
// #i76047# maximum item text length in pivot cache is 255
OUString aShortText = rText.copy( 0, ::std::min(rText.getLength(), EXC_PC_MAXSTRLEN ) );
for( size_t nSize = maOrigItemList.GetSize(); !bFound && (nPos < nSize); ++nPos )
- if( (bFound = maOrigItemList.GetRecord( nPos )->EqualsText( aShortText )) == true )
+ if( (bFound = maOrigItemList.GetRecord( nPos )->EqualsText( aShortText )) )
InsertItemArrayIndex( nPos );
if( !bFound )
InsertOrigItem( new XclExpPCItem( aShortText ) );
@@ -473,7 +473,7 @@ void XclExpPCField::InsertOrigDoubleItem( double fValue )
size_t nPos = 0;
bool bFound = false;
for( size_t nSize = maOrigItemList.GetSize(); !bFound && (nPos < nSize); ++nPos )
- if( (bFound = maOrigItemList.GetRecord( nPos )->EqualsDouble( fValue )) == true )
+ if( (bFound = maOrigItemList.GetRecord( nPos )->EqualsDouble( fValue )) )
InsertItemArrayIndex( nPos );
if( !bFound )
InsertOrigItem( new XclExpPCItem( fValue ) );
@@ -484,7 +484,7 @@ void XclExpPCField::InsertOrigDateTimeItem( const DateTime& rDateTime )
size_t nPos = 0;
bool bFound = false;
for( size_t nSize = maOrigItemList.GetSize(); !bFound && (nPos < nSize); ++nPos )
- if( (bFound = maOrigItemList.GetRecord( nPos )->EqualsDateTime( rDateTime )) == true )
+ if( (bFound = maOrigItemList.GetRecord( nPos )->EqualsDateTime( rDateTime )) )
InsertItemArrayIndex( nPos );
if( !bFound )
InsertOrigItem( new XclExpPCItem( rDateTime ) );
@@ -495,7 +495,7 @@ void XclExpPCField::InsertOrigBoolItem( bool bValue )
size_t nPos = 0;
bool bFound = false;
for( size_t nSize = maOrigItemList.GetSize(); !bFound && (nPos < nSize); ++nPos )
- if( (bFound = maOrigItemList.GetRecord( nPos )->EqualsBool( bValue )) == true )
+ if( (bFound = maOrigItemList.GetRecord( nPos )->EqualsBool( bValue )) )
InsertItemArrayIndex( nPos );
if( !bFound )
InsertOrigItem( new XclExpPCItem( bValue ) );
diff --git a/sc/source/filter/excel/xeview.cxx b/sc/source/filter/excel/xeview.cxx
index e3104ffbb985..09fbbc1fef52 100644
--- a/sc/source/filter/excel/xeview.cxx
+++ b/sc/source/filter/excel/xeview.cxx
@@ -209,7 +209,7 @@ XclExpSelection::XclExpSelection( const XclTabViewData& rData, sal_uInt8 nPane )
XclRangeList& rXclSel = maSelData.maXclSelection;
bool bFound = false;
for( XclRangeVector::const_iterator aIt = rXclSel.begin(), aEnd = rXclSel.end(); !bFound && (aIt != aEnd); ++aIt )
- if( (bFound = aIt->Contains( maSelData.maXclCursor )) == true )
+ if( (bFound = aIt->Contains( maSelData.maXclCursor )) )
maSelData.mnCursorIdx = static_cast< sal_uInt16 >( aIt - rXclSel.begin() );
/* Cursor cell not found in list? (e.g. inactive pane, or removed in
ConvertRangeList(), because Calc cursor on invalid pos)
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index 393493535652..47251d5b3997 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -281,17 +281,17 @@ void XclImpFont::ReadCFFontBlock( XclImpStream& rStrm )
sal_uInt32 nFontFlags3 = rStrm.ReaduInt32();
rStrm.Ignore( 18 );
- if( (mbHeightUsed = (nHeight <= 0x7FFF)) == true )
+ if( (mbHeightUsed = (nHeight <= 0x7FFF)) )
maData.mnHeight = static_cast< sal_uInt16 >( nHeight );
- if( (mbWeightUsed = !::get_flag( nFontFlags1, EXC_CF_FONT_STYLE ) && (nWeight < 0x7FFF)) == true )
+ if( (mbWeightUsed = !::get_flag( nFontFlags1, EXC_CF_FONT_STYLE ) && (nWeight < 0x7FFF)) )
maData.mnWeight = static_cast< sal_uInt16 >( nWeight );
- if( (mbItalicUsed = !::get_flag( nFontFlags1, EXC_CF_FONT_STYLE )) == true )
+ if( (mbItalicUsed = !::get_flag( nFontFlags1, EXC_CF_FONT_STYLE )) )
maData.mbItalic = ::get_flag( nStyle, EXC_CF_FONT_STYLE );
- if( (mbUnderlUsed = !::get_flag( nFontFlags3, EXC_CF_FONT_UNDERL ) && (nUnderl <= 0x7F)) == true )
+ if( (mbUnderlUsed = !::get_flag( nFontFlags3, EXC_CF_FONT_UNDERL ) && (nUnderl <= 0x7F)) )
maData.mnUnderline = nUnderl;
- if( (mbColorUsed = (nColor <= 0x7FFF)) == true )
+ if( (mbColorUsed = (nColor <= 0x7FFF)) )
maData.maColor = GetPalette().GetColor( static_cast< sal_uInt16 >( nColor ) );
- if( (mbStrikeUsed = !::get_flag( nFontFlags1, EXC_CF_FONT_STRIKEOUT )) == true )
+ if( (mbStrikeUsed = !::get_flag( nFontFlags1, EXC_CF_FONT_STRIKEOUT )) )
maData.mbStrikeout = ::get_flag( nStyle, EXC_CF_FONT_STRIKEOUT );
}
diff --git a/sc/source/ui/miscdlgs/warnbox.cxx b/sc/source/ui/miscdlgs/warnbox.cxx
index de69700e75f5..75c7b6032bf6 100644
--- a/sc/source/ui/miscdlgs/warnbox.cxx
+++ b/sc/source/ui/miscdlgs/warnbox.cxx
@@ -62,7 +62,7 @@ ScReplaceWarnBox::ScReplaceWarnBox( vcl::Window* pParent ) :
bool ScReplaceWarnBox::IsDialogEnabled()
{
- return ((bool) SC_MOD()->GetInputOptions().GetReplaceCellsWarn()) == true;
+ return (bool) SC_MOD()->GetInputOptions().GetReplaceCellsWarn();
}
void ScReplaceWarnBox::DisableDialog()
diff --git a/sc/source/ui/namedlg/namemgrtable.cxx b/sc/source/ui/namedlg/namemgrtable.cxx
index fbe6cba61cad..f534320e47ed 100644
--- a/sc/source/ui/namedlg/namemgrtable.cxx
+++ b/sc/source/ui/namedlg/namemgrtable.cxx
@@ -175,7 +175,7 @@ void ScRangeManagerTable::CheckForFormulaString()
for (SvTreeListEntry* pEntry = GetFirstEntryInView(); pEntry ; pEntry = GetNextEntryInView(pEntry))
{
std::map<SvTreeListEntry*, bool>::const_iterator itr = maCalculatedFormulaEntries.find(pEntry);
- if (itr == maCalculatedFormulaEntries.end() || itr->second == false)
+ if (itr == maCalculatedFormulaEntries.end() || !itr->second)
{
ScRangeNameLine aLine;
GetLine( aLine, pEntry);
diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx
index 1cd88511f60a..c2b0f7da4345 100644
--- a/sc/source/ui/vba/vbaaxes.cxx
+++ b/sc/source/ui/vba/vbaaxes.cxx
@@ -176,7 +176,7 @@ ScVbaAxes::Item( const css::uno::Any& _nType, const css::uno::Any& _oAxisGroup)
// bodgy helperapi port bits
sal_Int32 nAxisGroup = xlPrimary;
sal_Int32 nType = -1;
- if ( !_nType.hasValue() || ( ( _nType >>= nType ) == false ) )
+ if ( !_nType.hasValue() || !( _nType >>= nType ) )
throw uno::RuntimeException("Axes::Item Failed to extract type" );
if ( _oAxisGroup.hasValue() )
diff --git a/sc/source/ui/vba/vbavalidation.cxx b/sc/source/ui/vba/vbavalidation.cxx
index 95585a05b51b..541be9a773e2 100644
--- a/sc/source/ui/vba/vbavalidation.cxx
+++ b/sc/source/ui/vba/vbavalidation.cxx
@@ -74,7 +74,7 @@ ScVbaValidation::getInCellDropdown() throw (uno::RuntimeException, std::exceptio
uno::Reference< beans::XPropertySet > xProps = lcl_getValidationProps( m_xRange );
sal_Int32 nShowList = 0;
xProps->getPropertyValue( SC_UNONAME_SHOWLIST ) >>= nShowList;
- return ( nShowList ? sal_True : false );
+ return nShowList != 0;
}
void SAL_CALL
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 1c647ab42fa7..7f303eaf9815 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -314,7 +314,7 @@ static bool lcl_GetAutoSumForColumnRange( ScDocument* pDoc, ScRangeList& rRangeL
{
rRangeList.Append( ScRange( nCol, nStartRow, nTab, nCol, nEndRow, nTab ) );
nEndRow = static_cast< SCROW >( nExtend );
- if ( ( bContinue = lcl_FindNextSumEntryInColumn( pDoc, nCol, nEndRow /*inout*/, nTab, nExtend /*out*/, aStart.Row() ) ) == true )
+ if ( ( bContinue = lcl_FindNextSumEntryInColumn( pDoc, nCol, nEndRow /*inout*/, nTab, nExtend /*out*/, aStart.Row() ) ) )
{
nStartRow = nEndRow;
}
@@ -356,7 +356,7 @@ static bool lcl_GetAutoSumForRowRange( ScDocument* pDoc, ScRangeList& rRangeList
{
rRangeList.Append( ScRange( nStartCol, nRow, nTab, nEndCol, nRow, nTab ) );
nEndCol = static_cast< SCCOL >( nExtend );
- if ( ( bContinue = lcl_FindNextSumEntryInRow( pDoc, nEndCol /*inout*/, nRow, nTab, nExtend /*out*/, aStart.Col() ) ) == true )
+ if ( ( bContinue = lcl_FindNextSumEntryInRow( pDoc, nEndCol /*inout*/, nRow, nTab, nExtend /*out*/, aStart.Col() ) ) )
{
nStartCol = nEndCol;
}