summaryrefslogtreecommitdiff
path: root/sc/qa
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-22 15:56:13 +0200
committerNoel Grandin <noel@peralex.com>2016-03-23 09:13:14 +0200
commit26012ae8f65ca16e584b3688b0f1f9e76e97db84 (patch)
tree6c16a437f7aabbc36b60d162b0899cb2c657229e /sc/qa
parent50b39947cb23ec6a9de3845da4aea9ae53fd3cfa (diff)
loplugin:constantparam in sc
Change-Id: I437367b8c6960db730a69c020ba82792a9170d01
Diffstat (limited to 'sc/qa')
-rw-r--r--sc/qa/unit/ucalc.cxx14
-rw-r--r--sc/qa/unit/ucalc_formula.cxx32
-rw-r--r--sc/qa/unit/ucalc_sharedformula.cxx8
3 files changed, 27 insertions, 27 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 77a42e6a8731..5dba406d3c85 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4184,7 +4184,7 @@ void Test::testCopyPasteRepeatOneFormula()
}
// Delete row at row 1 to shift the cells up.
- rFunc.DeleteCells(aRowOne, &aMark, DEL_DELROWS, true, true);
+ rFunc.DeleteCells(aRowOne, &aMark, DEL_DELROWS, true);
// Check the formula results again.
for (SCROW i = 0; i < 10; ++i)
@@ -4637,7 +4637,7 @@ void Test::testAutoFill()
m_pDoc->SetValue(ScAddress(0,0,0), 1.0);
ScRange aRange(0,0,0,0,5,0);
aMarkData.SetMarkArea(aRange);
- rFunc.FillSeries(aRange, &aMarkData, FILL_TO_BOTTOM, FILL_AUTO, FILL_DAY, MAXDOUBLE, 1.0, MAXDOUBLE, true, true);
+ rFunc.FillSeries(aRange, &aMarkData, FILL_TO_BOTTOM, FILL_AUTO, FILL_DAY, MAXDOUBLE, 1.0, MAXDOUBLE, true);
CPPUNIT_ASSERT_EQUAL(1.0, m_pDoc->GetValue(ScAddress(0,0,0)));
CPPUNIT_ASSERT_EQUAL(2.0, m_pDoc->GetValue(ScAddress(0,1,0)));
CPPUNIT_ASSERT_EQUAL(3.0, m_pDoc->GetValue(ScAddress(0,2,0)));
@@ -5092,7 +5092,7 @@ void Test::testNoteDeleteRow()
ScDocFunc& rDocFunc = getDocShell().GetDocFunc();
ScMarkData aMark;
aMark.SelectOneTable(0);
- rDocFunc.DeleteCells(ScRange(0,1,0,MAXCOL,1,0), &aMark, DEL_CELLSUP, true, true);
+ rDocFunc.DeleteCells(ScRange(0,1,0,MAXCOL,1,0), &aMark, DEL_CELLSUP, true);
// Check to make sure the notes have shifted upward.
pNote = m_pDoc->GetNote(ScAddress(1,1,0));
@@ -5121,7 +5121,7 @@ void Test::testNoteDeleteRow()
CPPUNIT_ASSERT_EQUAL(OUString("Second Note"), pNote->GetText());
// Delete row 3.
- rDocFunc.DeleteCells(ScRange(0,2,0,MAXCOL,2,0), &aMark, DEL_CELLSUP, true, true);
+ rDocFunc.DeleteCells(ScRange(0,2,0,MAXCOL,2,0), &aMark, DEL_CELLSUP, true);
pNote = m_pDoc->GetNote(ScAddress(1,2,0));
CPPUNIT_ASSERT_MESSAGE("B3 should have a note.", pNote);
@@ -5767,7 +5767,7 @@ void Test::testTransliterateText()
aMark.SetMarkArea(ScRange(0,0,0,0,2,0));
ScDocFunc& rFunc = getDocShell().GetDocFunc();
rFunc.TransliterateText(
- aMark, i18n::TransliterationModules_LOWERCASE_UPPERCASE, true, true);
+ aMark, i18n::TransliterationModules_LOWERCASE_UPPERCASE, true);
CPPUNIT_ASSERT_EQUAL(OUString("MIKE"), m_pDoc->GetString(ScAddress(0,0,0)));
CPPUNIT_ASSERT_EQUAL(OUString("NOAH"), m_pDoc->GetString(ScAddress(0,1,0)));
@@ -5828,7 +5828,7 @@ void Test::testFormulaToValue()
// Convert B5:C6 to static values, and check the result.
ScDocFunc& rFunc = getDocShell().GetDocFunc();
ScRange aConvRange(1,4,0,2,5,0); // B5:C6
- rFunc.ConvertFormulaToValue(aConvRange, true, false);
+ rFunc.ConvertFormulaToValue(aConvRange, false);
{
// Expected output table content. 0 = empty cell
@@ -5987,7 +5987,7 @@ void Test::testFormulaToValue2()
// Convert B3:B5 to a value.
ScDocFunc& rFunc = getDocShell().GetDocFunc();
ScRange aConvRange(1,2,0,1,4,0); // B3:B5
- rFunc.ConvertFormulaToValue(aConvRange, true, false);
+ rFunc.ConvertFormulaToValue(aConvRange, false);
{
// Expected output table content. 0 = empty cell
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index e8ff482a4100..2282fdaadc5c 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -2474,7 +2474,7 @@ void Test::testFormulaRefUpdateDeleteAndShiftLeft()
ScMarkData aMark;
aMark.SelectOneTable(0);
ScDocFunc& rFunc = getDocShell().GetDocFunc();
- bool bDeleted = rFunc.DeleteCells(ScRange(3,0,0,4,MAXROW,0), &aMark, DEL_CELLSLEFT, true, true);
+ bool bDeleted = rFunc.DeleteCells(ScRange(3,0,0,4,MAXROW,0), &aMark, DEL_CELLSLEFT, true);
CPPUNIT_ASSERT(bDeleted);
aPos.IncCol(-2);
@@ -2493,7 +2493,7 @@ void Test::testFormulaRefUpdateDeleteAndShiftLeft()
CPPUNIT_FAIL("Wrong formula!");
// Delete columns C:D (left end of the reference).
- bDeleted = rFunc.DeleteCells(ScRange(2,0,0,3,MAXROW,0), &aMark, DEL_CELLSLEFT, true, true);
+ bDeleted = rFunc.DeleteCells(ScRange(2,0,0,3,MAXROW,0), &aMark, DEL_CELLSLEFT, true);
CPPUNIT_ASSERT(bDeleted);
aPos.IncCol(-2);
@@ -2509,7 +2509,7 @@ void Test::testFormulaRefUpdateDeleteAndShiftLeft()
CPPUNIT_FAIL("Wrong formula!");
// Delete columns B:E (overlaps on the left).
- bDeleted = rFunc.DeleteCells(ScRange(1,0,0,4,MAXROW,0), &aMark, DEL_CELLSLEFT, true, true);
+ bDeleted = rFunc.DeleteCells(ScRange(1,0,0,4,MAXROW,0), &aMark, DEL_CELLSLEFT, true);
CPPUNIT_ASSERT(bDeleted);
aPos.IncCol(-4);
@@ -2537,7 +2537,7 @@ void Test::testFormulaRefUpdateDeleteAndShiftLeft()
CPPUNIT_ASSERT_EQUAL(21.0, m_pDoc->GetValue(aPos));
// Delete columns F:H (right end of the reference).
- bDeleted = rFunc.DeleteCells(ScRange(5,0,0,7,MAXROW,0), &aMark, DEL_CELLSLEFT, true, true);
+ bDeleted = rFunc.DeleteCells(ScRange(5,0,0,7,MAXROW,0), &aMark, DEL_CELLSLEFT, true);
CPPUNIT_ASSERT(bDeleted);
CPPUNIT_ASSERT_EQUAL(6.0, m_pDoc->GetValue(aPos));
@@ -2551,7 +2551,7 @@ void Test::testFormulaRefUpdateDeleteAndShiftLeft()
CPPUNIT_FAIL("Wrong formula!");
// Delete columns G:I (overlaps on the right).
- bDeleted = rFunc.DeleteCells(ScRange(6,0,0,8,MAXROW,0), &aMark, DEL_CELLSLEFT, true, true);
+ bDeleted = rFunc.DeleteCells(ScRange(6,0,0,8,MAXROW,0), &aMark, DEL_CELLSLEFT, true);
CPPUNIT_ASSERT(bDeleted);
CPPUNIT_ASSERT_EQUAL(10.0, m_pDoc->GetValue(aPos));
@@ -2587,7 +2587,7 @@ void Test::testFormulaRefUpdateDeleteAndShiftUp()
ScMarkData aMark;
aMark.SelectOneTable(0);
ScDocFunc& rFunc = getDocShell().GetDocFunc();
- bool bDeleted = rFunc.DeleteCells(ScRange(0,3,0,MAXCOL,4,0), &aMark, DEL_CELLSUP, true, true);
+ bool bDeleted = rFunc.DeleteCells(ScRange(0,3,0,MAXCOL,4,0), &aMark, DEL_CELLSUP, true);
CPPUNIT_ASSERT(bDeleted);
aPos.IncRow(-2);
@@ -2606,7 +2606,7 @@ void Test::testFormulaRefUpdateDeleteAndShiftUp()
CPPUNIT_FAIL("Wrong formula!");
// Delete rows 3:4 (top end of the reference).
- bDeleted = rFunc.DeleteCells(ScRange(0,2,0,MAXCOL,3,0), &aMark, DEL_CELLSUP, true, true);
+ bDeleted = rFunc.DeleteCells(ScRange(0,2,0,MAXCOL,3,0), &aMark, DEL_CELLSUP, true);
CPPUNIT_ASSERT(bDeleted);
aPos.IncRow(-2);
@@ -2622,7 +2622,7 @@ void Test::testFormulaRefUpdateDeleteAndShiftUp()
CPPUNIT_FAIL("Wrong formula!");
// Delete rows 2:5 (overlaps on the top).
- bDeleted = rFunc.DeleteCells(ScRange(0,1,0,MAXCOL,4,0), &aMark, DEL_CELLSUP, true, true);
+ bDeleted = rFunc.DeleteCells(ScRange(0,1,0,MAXCOL,4,0), &aMark, DEL_CELLSUP, true);
CPPUNIT_ASSERT(bDeleted);
aPos.IncRow(-4);
@@ -2650,7 +2650,7 @@ void Test::testFormulaRefUpdateDeleteAndShiftUp()
CPPUNIT_ASSERT_EQUAL(21.0, m_pDoc->GetValue(aPos));
// Delete rows 6:8 (bottom end of the reference).
- bDeleted = rFunc.DeleteCells(ScRange(0,5,0,MAXCOL,7,0), &aMark, DEL_CELLSUP, true, true);
+ bDeleted = rFunc.DeleteCells(ScRange(0,5,0,MAXCOL,7,0), &aMark, DEL_CELLSUP, true);
CPPUNIT_ASSERT(bDeleted);
CPPUNIT_ASSERT_EQUAL(6.0, m_pDoc->GetValue(aPos));
@@ -2664,7 +2664,7 @@ void Test::testFormulaRefUpdateDeleteAndShiftUp()
CPPUNIT_FAIL("Wrong formula!");
// Delete rows 7:9 (overlaps on the bottom).
- bDeleted = rFunc.DeleteCells(ScRange(0,6,0,MAXCOL,8,0), &aMark, DEL_CELLSUP, true, true);
+ bDeleted = rFunc.DeleteCells(ScRange(0,6,0,MAXCOL,8,0), &aMark, DEL_CELLSUP, true);
CPPUNIT_ASSERT(bDeleted);
CPPUNIT_ASSERT_EQUAL(10.0, m_pDoc->GetValue(aPos));
@@ -3043,14 +3043,14 @@ void Test::testFormulaRefUpdateNameDeleteRow()
// Delete row 3.
ScMarkData aMark;
aMark.SelectOneTable(0);
- rFunc.DeleteCells(ScRange(0,2,0,MAXCOL,2,0), &aMark, DEL_CELLSUP, true, true);
+ rFunc.DeleteCells(ScRange(0,2,0,MAXCOL,2,0), &aMark, DEL_CELLSUP, true);
// The reference in the name should get updated to B2:B3.
aExpr = pCode->CreateString(aCxt, ScAddress(0,0,0));
CPPUNIT_ASSERT_EQUAL(OUString("$B$2:$B$3"), aExpr);
// Delete row 3 again.
- rFunc.DeleteCells(ScRange(0,2,0,MAXCOL,2,0), &aMark, DEL_CELLSUP, true, true);
+ rFunc.DeleteCells(ScRange(0,2,0,MAXCOL,2,0), &aMark, DEL_CELLSUP, true);
aExpr = pCode->CreateString(aCxt, ScAddress(0,0,0));
CPPUNIT_ASSERT_EQUAL(OUString("$B$2:$B$2"), aExpr);
@@ -3078,7 +3078,7 @@ void Test::testFormulaRefUpdateNameDeleteRow()
CPPUNIT_ASSERT_EQUAL(OUString("$B$2:$B$4"), aExpr);
// Delete row 2-3.
- rFunc.DeleteCells(ScRange(0,1,0,MAXCOL,2,0), &aMark, DEL_CELLSUP, true, true);
+ rFunc.DeleteCells(ScRange(0,1,0,MAXCOL,2,0), &aMark, DEL_CELLSUP, true);
aExpr = pCode->CreateString(aCxt, ScAddress(0,0,0));
CPPUNIT_ASSERT_EQUAL(OUString("$B$2:$B$2"), aExpr);
@@ -3097,7 +3097,7 @@ void Test::testFormulaRefUpdateNameDeleteRow()
ScMarkData aMark2;
aMark2.SelectOneTable(1);
- rFunc.DeleteCells(ScRange(0,2,1,MAXCOL,2,1), &aMark2, DEL_CELLSUP, true, true);
+ rFunc.DeleteCells(ScRange(0,2,1,MAXCOL,2,1), &aMark2, DEL_CELLSUP, true);
pName = m_pDoc->GetRangeName()->findByUpperName("MYRANGE");
CPPUNIT_ASSERT(pName);
@@ -5118,7 +5118,7 @@ void Test::testFormulaDepTrackingDeleteRow()
ScDocFunc& rFunc = getDocShell().GetDocFunc();
ScMarkData aMark;
aMark.SelectOneTable(0);
- rFunc.DeleteCells(ScRange(0,1,0,MAXCOL,1,0), &aMark, DEL_CELLSUP, true, true);
+ rFunc.DeleteCells(ScRange(0,1,0,MAXCOL,1,0), &aMark, DEL_CELLSUP, true);
pBC = m_pDoc->GetBroadcaster(ScAddress(0,3,0));
CPPUNIT_ASSERT_MESSAGE("Broadcaster at A5 should have shifted to A4.", pBC);
@@ -5176,7 +5176,7 @@ void Test::testFormulaDepTrackingDeleteCol()
ScDocFunc& rFunc = getDocShell().GetDocFunc();
ScMarkData aMark;
aMark.SelectOneTable(0);
- rFunc.DeleteCells(ScRange(0,0,0,0,MAXROW,0), &aMark, DEL_CELLSLEFT, true, true);
+ rFunc.DeleteCells(ScRange(0,0,0,0,MAXROW,0), &aMark, DEL_CELLSLEFT, true);
{
// Expected output table content. 0 = empty cell
diff --git a/sc/qa/unit/ucalc_sharedformula.cxx b/sc/qa/unit/ucalc_sharedformula.cxx
index d543deb8dc61..8ae2cf9ed83e 100644
--- a/sc/qa/unit/ucalc_sharedformula.cxx
+++ b/sc/qa/unit/ucalc_sharedformula.cxx
@@ -681,7 +681,7 @@ void Test::testSharedFormulasRefUpdateRangeDeleteRow()
ScDocFunc& rFunc = getDocShell().GetDocFunc();
ScMarkData aMark;
aMark.SelectOneTable(0);
- rFunc.DeleteCells(ScRange(0,2,0,MAXCOL,2,0), &aMark, DEL_DELROWS, true, true);
+ rFunc.DeleteCells(ScRange(0,2,0,MAXCOL,2,0), &aMark, DEL_DELROWS, true);
// Make sure C1:C4 belong to the same group.
pFC = m_pDoc->GetFormulaCell(ScAddress(2,0,0));
@@ -787,7 +787,7 @@ void Test::testSharedFormulasRefUpdateExternal()
ScDocFunc& rDocFunc = getDocShell().GetDocFunc();
ScMarkData aMark;
aMark.SelectOneTable(0);
- rDocFunc.DeleteCells(ScRange(0,0,0,MAXCOL,1,0), &aMark, DEL_CELLSUP, true, true);
+ rDocFunc.DeleteCells(ScRange(0,0,0,MAXCOL,1,0), &aMark, DEL_CELLSUP, true);
// Check the shifted formula cells now in A5:A8.
if (!checkFormula(*m_pDoc, ScAddress(0,4,0), "'file:///extdata.fake'#$Data.A1"))
@@ -1049,7 +1049,7 @@ void Test::testSharedFormulasDeleteColumns()
CPPUNIT_ASSERT_EQUAL(11.0, m_pDoc->GetValue(ScAddress(2,0,0)));
// Delete column B.
- rFunc.DeleteCells(ScRange(1,0,0,1,MAXROW,0), &aMark, DEL_CELLSLEFT, true, true);
+ rFunc.DeleteCells(ScRange(1,0,0,1,MAXROW,0), &aMark, DEL_CELLSLEFT, true);
CPPUNIT_ASSERT_EQUAL(OUString("#REF!"), m_pDoc->GetString(ScAddress(1,0,0)));
// The reference should still point to row 1 but the column status should be set to 'deleted'.
@@ -1092,7 +1092,7 @@ void Test::testSharedFormulasDeleteColumns()
}
// Delete column B.
- rFunc.DeleteCells(ScRange(1,0,0,1,MAXROW,0), &aMark, DEL_CELLSLEFT, true, true);
+ rFunc.DeleteCells(ScRange(1,0,0,1,MAXROW,0), &aMark, DEL_CELLSLEFT, true);
for (SCROW i = 0; i <= 1; ++i)
{