summaryrefslogtreecommitdiff
path: root/sc/qa/extras
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-01-31 12:31:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-31 19:37:29 +0100
commitc599e23a92310916d4e7f09c5aaf354d63973d0b (patch)
treed1e584a33e47f3fbbfcbdfcd9c3b9a14f7fcadd2 /sc/qa/extras
parentc82efb610bf556ea12cbe4f94568ac619897799f (diff)
loplugin:singlevalfields
Change-Id: I77ccf3f36363e182a644b98cdf720f1381a5cceb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87766 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/qa/extras')
-rw-r--r--sc/qa/extras/check_data_pilot_table.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sc/qa/extras/check_data_pilot_table.cxx b/sc/qa/extras/check_data_pilot_table.cxx
index 79fcd14c66ca..f13768ffbc87 100644
--- a/sc/qa/extras/check_data_pilot_table.cxx
+++ b/sc/qa/extras/check_data_pilot_table.cxx
@@ -64,7 +64,7 @@ public:
private:
uno::Reference<lang::XComponent> mxComponent;
uno::Reference<uno::XInterface> mxObject;
- int mMaxFieldIndex = 6;
+ static constexpr int MAX_FIELD_INDEX = 6;
};
CheckDataPilotTable::CheckDataPilotTable()
@@ -89,8 +89,8 @@ uno::Reference< uno::XInterface > CheckDataPilotTable::init()
sCellRangeAdress.Sheet = 0;
sCellRangeAdress.StartColumn = 1;
sCellRangeAdress.StartRow = 0;
- sCellRangeAdress.EndColumn = mMaxFieldIndex-1;
- sCellRangeAdress.EndRow = mMaxFieldIndex - 1;
+ sCellRangeAdress.EndColumn = MAX_FIELD_INDEX-1;
+ sCellRangeAdress.EndRow = MAX_FIELD_INDEX - 1;
// position of the data pilot table
table::CellAddress sCellAdress;
@@ -112,7 +112,7 @@ uno::Reference< uno::XInterface > CheckDataPilotTable::init()
CPPUNIT_ASSERT(aAny2 >>= oSheet2);
//Filling a table
- for (int i = 1; i < mMaxFieldIndex; i++)
+ for (int i = 1; i < MAX_FIELD_INDEX; i++)
{
oSheet->getCellByPosition(i, 0)->setFormula("Col" + OUString::number(i));
oSheet->getCellByPosition(0, i)->setFormula("Row" + OUString::number(i));
@@ -120,9 +120,9 @@ uno::Reference< uno::XInterface > CheckDataPilotTable::init()
oSheet2->getCellByPosition(0, i)->setFormula("Row" + OUString::number(i));
}
- for (int i = 1; i < mMaxFieldIndex; i++)
+ for (int i = 1; i < MAX_FIELD_INDEX; i++)
{
- for (int j = 1; j < mMaxFieldIndex; j++)
+ for (int j = 1; j < MAX_FIELD_INDEX; j++)
{
oSheet->getCellByPosition(i, j)->setValue(i * (j + 1));
oSheet2->getCellByPosition(i, j)->setValue(i * (j + 2));