summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2015-06-14 12:17:55 +0200
committerJulien Nabet <serval2412@yahoo.fr>2015-06-14 12:17:55 +0200
commitb226928c6d5d094359b970b64a063b243d4fc84c (patch)
tree3ec0329c0f69fc4e9b57210135d51c2006853388 /sc
parent01a189abcd9a4ca472a74b3b2c000c9338fc2c91 (diff)
cppcheck: redundantCondition [part1]
Change-Id: I21c5340e7b5ec09248b08aa76f43acf883c56cd8
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/oox/worksheetfragment.cxx2
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx2
-rw-r--r--sc/source/ui/view/viewfun2.cxx2
4 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/filter/oox/worksheetfragment.cxx b/sc/source/filter/oox/worksheetfragment.cxx
index 1eb803d678e5..97539e686044 100644
--- a/sc/source/filter/oox/worksheetfragment.cxx
+++ b/sc/source/filter/oox/worksheetfragment.cxx
@@ -320,7 +320,7 @@ ContextHandlerRef WorksheetFragment::onCreateContext( sal_Int32 nElement, const
case XLS_TOKEN( oleObjects ):
if ( getCurrentElement() == XLS_TOKEN( controls ) )
{
- if( aMceState.empty() || ( !aMceState.empty() && aMceState.back() == MCE_STARTED ) )
+ if( aMceState.empty() || aMceState.back() == MCE_STARTED )
{
if ( getCurrentElement() == XLS_TOKEN( oleObjects ) ) importOleObject( rAttribs );
else
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 3fb893f37502..c67090eb880b 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3107,7 +3107,7 @@ void ScXMLExport::WriteCell(ScMyCell& aCell, sal_Int32 nEqualCellCount)
if (aCell.maBaseCell.meType == CELLTYPE_FORMULA)
{
ScFormulaCell* pFormulaCell = aCell.maBaseCell.mpFormula;
- if (!bIsMatrix || (bIsMatrix && bIsFirstMatrixCell))
+ if (!bIsMatrix || bIsFirstMatrixCell)
{
if (!mpCompileFormulaCxt)
{
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index e46e6df7444e..4a2b4e8a124d 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -556,7 +556,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
{
ScRange aDelRange;
bool bIsDel = rViewData.GetDelMark( aDelRange );
- if ( (!bIsDel || (bIsDel && aMarkRange != aDelRange)) &&
+ if ( (!bIsDel || aMarkRange != aDelRange) &&
bNewMarked &&
nNewMarkCount > 0 &&
!IsSameMarkCell() )
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 3fe6ade40744..40e85e942c09 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -545,7 +545,7 @@ bool ScViewFunc::AutoSum( const ScRange& rRange, bool bSubTotal, bool bSetCursor
const bool bEndRowEmpty = pDoc->IsBlockEmpty( nTab, nStartCol, nEndRow, nEndCol, nEndRow );
const bool bEndColEmpty = pDoc->IsBlockEmpty( nTab, nEndCol, nStartRow, nEndCol, nEndRow );
- bool bRow = ( ( nStartRow != nEndRow ) && ( bEndRowEmpty || ( !bEndRowEmpty && !bEndColEmpty ) ) );
+ bool bRow = ( ( nStartRow != nEndRow ) && ( bEndRowEmpty || !bEndColEmpty ) );
bool bCol = ( ( nStartCol != nEndCol ) && ( bEndColEmpty || nStartRow == nEndRow ) );
// find an empty row for entering the result