summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-05 12:26:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-05 12:21:19 +0000
commit572e9cde744e2b482a04ff4b457ad2cfde5f70d2 (patch)
tree78e93df178de6d17d55eef7c3907781aa131ff7c /sc
parent5f282c101a644ffc3615c3dc43ddb99febecae16 (diff)
loplugin:redundantcast find c-style bool casts
Change-Id: I3237b93babc67de12c3771aa84766c2141ca93b2 Reviewed-on: https://gerrit.libreoffice.org/36137 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/dpcache.cxx4
-rw-r--r--sc/source/core/tool/dbdata.cxx6
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx4
-rw-r--r--sc/source/ui/miscdlgs/warnbox.cxx2
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx2
-rw-r--r--sc/source/ui/view/tabcont.cxx2
6 files changed, 10 insertions, 10 deletions
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index 48dfa09f5150..ccd967b65c49 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -520,8 +520,8 @@ bool ScDPCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam) const
sal_Int32 nStart = 0;
sal_Int32 nEnd = aCellStr.getLength();
- bool bMatch = (bool) rEntry.GetSearchTextPtr( rParam.eSearchType, rParam.bCaseSens, bMatchWholeCell )
- ->SearchForward( aCellStr, &nStart, &nEnd );
+ bool bMatch = rEntry.GetSearchTextPtr( rParam.eSearchType, rParam.bCaseSens, bMatchWholeCell )
+ ->SearchForward( aCellStr, &nStart, &nEnd );
// from 614 on, nEnd is behind the found text
if (bMatch && bMatchWholeCell
&& (nStart != 0 || nEnd != aCellStr.getLength()))
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index 7196db50201b..ccc19bcd1b49 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -496,9 +496,9 @@ bool ScDBData::IsDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion
bool ScDBData::IsDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
{
- return (bool)((nTab == nTable)
- && (nCol1 == nStartCol) && (nRow1 == nStartRow)
- && (nCol2 == nEndCol) && (nRow2 == nEndRow));
+ return (nTab == nTable)
+ && (nCol1 == nStartCol) && (nRow1 == nStartRow)
+ && (nCol2 == nEndCol) && (nRow2 == nEndRow);
}
bool ScDBData::HasImportParam() const
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index 307d7527d706..f33efa354854 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -1627,8 +1627,8 @@ IMPL_LINK_NOARG(ScAcceptChgDlg, UpdateSelectionHdl, Timer *, void)
ScRedlinData* pEntryData = static_cast<ScRedlinData*>(pEntry->GetUserData());
if( pEntryData )
{
- bRejectFlag &= (bool) pEntryData->bIsRejectable;
- bAcceptFlag &= (bool) pEntryData->bIsAcceptable;
+ bRejectFlag &= pEntryData->bIsRejectable;
+ bAcceptFlag &= pEntryData->bIsAcceptable;
const ScChangeAction* pScChangeAction = static_cast<ScChangeAction*>(pEntryData->pData);
if( pScChangeAction && (pScChangeAction->GetType() != SC_CAT_DELETE_TABS) &&
diff --git a/sc/source/ui/miscdlgs/warnbox.cxx b/sc/source/ui/miscdlgs/warnbox.cxx
index 22d2fb2ccdd9..55d473ef9720 100644
--- a/sc/source/ui/miscdlgs/warnbox.cxx
+++ b/sc/source/ui/miscdlgs/warnbox.cxx
@@ -37,7 +37,7 @@ ScReplaceWarnBox::ScReplaceWarnBox( vcl::Window* pParent ) :
sal_Int16 ScReplaceWarnBox::Execute()
{
sal_Int16 nRet = RET_YES;
- if( (bool) SC_MOD()->GetInputOptions().GetReplaceCellsWarn() )
+ if( SC_MOD()->GetInputOptions().GetReplaceCellsWarn() )
{
nRet = WarningBox::Execute();
if (!GetCheckBoxState())
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index 6c1efce1ca4d..cd6635af5133 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -3427,7 +3427,7 @@ Any SAL_CALL ScDataPilotItemObj::getPropertyValue( const OUString& aPropertyName
{
if (pMember && pMember->HasShowDetails())
{
- aRet <<= (bool)pMember->GetShowDetails();
+ aRet <<= pMember->GetShowDetails();
}
else
{
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index c6aa46fb4a97..0329c023ef8a 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -383,7 +383,7 @@ void ScTabControl::UpdateStatus()
{
bModified = false; // selection
for (i=0; i<nMaxCnt && !bModified; i++)
- if ( rMark.GetTableSelect(i) != (bool) IsPageSelected(static_cast<sal_uInt16>(i)+1) )
+ if ( rMark.GetTableSelect(i) != IsPageSelected(static_cast<sal_uInt16>(i)+1) )
bModified = true;
if ( bModified )