summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2017-02-19 22:40:57 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-20 06:04:00 +0000
commitf173262024391af6cbeac180f8628d0022a22426 (patch)
tree9746dd1f79e0ccb4132731ba130e963d64e49699 /sc
parent673dddaf9d6f49ff43724ff84122451bb4df94f2 (diff)
cppcheck: redundantAssignment and unreadVariable
Change-Id: I19e8aef9149154967a5a1ba32e3d8e0a918adeaf Reviewed-on: https://gerrit.libreoffice.org/34437 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/ucalc_pivottable.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/qa/unit/ucalc_pivottable.cxx b/sc/qa/unit/ucalc_pivottable.cxx
index 2c2cfb5f00fa..b2ca97a06774 100644
--- a/sc/qa/unit/ucalc_pivottable.cxx
+++ b/sc/qa/unit/ucalc_pivottable.cxx
@@ -2430,7 +2430,6 @@ void Test::testPivotTableDPCollection()
ScRange aDataRange(nCol1, nRow1, 0, nCol2, nRow2, 0);
ScDPCollection* pDPs = m_pDoc->GetDPCollection();
- bool bSuccess = false;
// Check at the beginning
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be no DP table", size_t(0), pDPs->GetCount());
@@ -2442,7 +2441,7 @@ void Test::testPivotTableDPCollection()
// Add 2 DP objects
ScDPObject* pDPObj = createDPFromRange(m_pDoc, aDataRange , aFields, nFieldCount, false);
- bSuccess = pDPs->InsertNewTable(pDPObj);
+ bool bSuccess = pDPs->InsertNewTable(pDPObj);
CPPUNIT_ASSERT_MESSAGE("failed to insert a new DP object into document", bSuccess);
pDPObj->SetName("DP1"); // set custom name
@@ -2563,6 +2562,7 @@ void Test::testPivotTableMedianFunc()
}
bSuccess = aFunc.RemovePivotTable(*pDPObject, false, true);
+ CPPUNIT_ASSERT_MESSAGE("Failed to remove pivot table object.", bSuccess);
m_pDoc->DeleteTab(1);
m_pDoc->DeleteTab(0);