diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-03-11 16:35:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-03-12 07:31:50 +0100 |
commit | 9d4c36d7914e2746a751a56de01063c9159f0f99 (patch) | |
tree | dc1723268647e1600db2ccaae5400ad0e72524fe /sc/qa/unit | |
parent | 31bf558349d9ab2634e9a866edf79bc115d649ce (diff) |
Revert "loplugin:constfields in sc"
This reverts commit fb1d3b580763a333bbbfe115d09e1b5cd8849675.
Now that we know that making fields has negative side effects
like disabling assignment operator generation.
Change-Id: Ib48334ffbeb2c768896dd8ced6818aa0b9910b0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90333
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/qa/unit')
-rw-r--r-- | sc/qa/unit/helper/csv_handler.hxx | 10 | ||||
-rw-r--r-- | sc/qa/unit/helper/qahelper.hxx | 14 | ||||
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 12 | ||||
-rw-r--r-- | sc/qa/unit/ucalc.hxx | 2 | ||||
-rw-r--r-- | sc/qa/unit/ucalc_column.cxx | 4 | ||||
-rw-r--r-- | sc/qa/unit/ucalc_condformat.cxx | 4 | ||||
-rw-r--r-- | sc/qa/unit/ucalc_formula.cxx | 46 | ||||
-rw-r--r-- | sc/qa/unit/ucalc_pivottable.cxx | 8 |
8 files changed, 50 insertions, 50 deletions
diff --git a/sc/qa/unit/helper/csv_handler.hxx b/sc/qa/unit/helper/csv_handler.hxx index cadcf0050d8b..cbd2b9bd09e5 100644 --- a/sc/qa/unit/helper/csv_handler.hxx +++ b/sc/qa/unit/helper/csv_handler.hxx @@ -149,11 +149,11 @@ public: } private: - ScDocument* const mpDoc; + ScDocument* mpDoc; SCCOL mnCol; SCROW mnRow; - SCTAB const mnTab; - StringType const meStringType; + SCTAB mnTab; + StringType meStringType; }; class conditional_format_handler @@ -194,10 +194,10 @@ public: } private: - ScDocument* const mpDoc; + ScDocument* mpDoc; SCCOL mnCol; SCROW mnRow; - SCTAB const mnTab; + SCTAB mnTab; }; #endif diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx index 4cf5ddea1a40..1a721287418f 100644 --- a/sc/qa/unit/helper/qahelper.hxx +++ b/sc/qa/unit/helper/qahelper.hxx @@ -73,12 +73,12 @@ struct TestParam { struct RowData { - SCROW const nStartRow; - SCROW const nEndRow; - SCTAB const nTab; - int const nExpectedHeight; // -1 for default height - int const nCheck; // currently only CHECK_OPTIMAL ( we could add CHECK_MANUAL etc.) - bool const bOptimal; + SCROW nStartRow; + SCROW nEndRow; + SCTAB nTab; + int nExpectedHeight; // -1 for default height + int nCheck; // currently only CHECK_OPTIMAL ( we could add CHECK_MANUAL etc.) + bool bOptimal; }; const char* sTestDoc; int nImportType; @@ -165,7 +165,7 @@ class SCQAHELPER_DLLPUBLIC ScBootstrapFixture : public test::BootstrapFixture { static const FileFormat aFileFormats[]; protected: - OUString const m_aBaseString; + OUString m_aBaseString; ScDocShellRef load( bool bReadWrite, const OUString& rURL, const OUString& rFilter, const OUString &rUserData, diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 1b62cc1eecb4..9b6f41a3e284 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -505,8 +505,8 @@ void Test::testRowForHeight() struct Check { - sal_uLong const nHeight; - SCROW const nRow; + sal_uLong nHeight; + SCROW nRow; }; std::vector<Check> aChecks = { @@ -604,8 +604,8 @@ void Test::testSelectionFunction() struct Check { - ScSubTotalFunc const meFunc; - double const mfExpected; + ScSubTotalFunc meFunc; + double mfExpected; }; { @@ -3613,8 +3613,8 @@ void Test::testCopyPasteSkipEmpty() struct Check { const char* mpStr; - Color const maColor; - bool const mbHasNote; + Color maColor; + bool mbHasNote; }; struct TestRange diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx index 45790021e943..ad04681d61f0 100644 --- a/sc/qa/unit/ucalc.hxx +++ b/sc/qa/unit/ucalc.hxx @@ -26,7 +26,7 @@ class ScUndoCut; class FormulaGrammarSwitch { ScDocument* mpDoc; - formula::FormulaGrammar::Grammar const meOldGrammar; + formula::FormulaGrammar::Grammar meOldGrammar; public: FormulaGrammarSwitch(ScDocument* pDoc, formula::FormulaGrammar::Grammar eGrammar); ~FormulaGrammarSwitch(); diff --git a/sc/qa/unit/ucalc_column.cxx b/sc/qa/unit/ucalc_column.cxx index db096184f52b..97dfa38030c9 100644 --- a/sc/qa/unit/ucalc_column.cxx +++ b/sc/qa/unit/ucalc_column.cxx @@ -101,8 +101,8 @@ void Test::testSetFormula() static struct aInputs { - SCROW const nRow; - SCCOL const nCol; + SCROW nRow; + SCCOL nCol; const char* aFormula1; // Represents the formula that is input to SetFormula function. const char* aFormula2; // Represents the formula that is actually stored in the cell. formula::FormulaGrammar::Grammar const eGram; diff --git a/sc/qa/unit/ucalc_condformat.cxx b/sc/qa/unit/ucalc_condformat.cxx index ed1b0fcc00b8..24b091603b63 100644 --- a/sc/qa/unit/ucalc_condformat.cxx +++ b/sc/qa/unit/ucalc_condformat.cxx @@ -591,8 +591,8 @@ namespace { struct ScDataBarLengthData { - double const nVal; - double const nLength; + double nVal; + double nLength; }; void testDataBarLengthImpl(ScDocument* pDoc, const ScDataBarLengthData* pData, const ScRange& rRange, diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 17e8bde4fc53..f9babfa4772d 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -137,11 +137,11 @@ void Test::testFormulaCreateStringFromTokens() // Insert DB ranges. static const struct { const char* pName; - SCTAB const nTab; - SCCOL const nCol1; - SCROW const nRow1; - SCCOL const nCol2; - SCROW const nRow2; + SCTAB nTab; + SCCOL nCol1; + SCROW nRow1; + SCCOL nCol2; + SCROW nRow2; } aDBs[] = { { "Table1", 0, 0, 0, 10, 10 }, { "Table2", 1, 0, 0, 10, 10 }, @@ -859,7 +859,7 @@ void Test::testFormulaHashAndTag() static const struct { const char* pFormula; - ScFormulaVectorState const eState; + ScFormulaVectorState eState; } aVectorTests[] = { { "=SUM(1;2;3;4;5)", FormulaVectorEnabled }, { "=NOW()", FormulaVectorDisabled }, @@ -893,7 +893,7 @@ void Test::testFormulaTokenEquality() { const char* mpFormula1; const char* mpFormula2; - bool const mbEqual; + bool mbEqual; }; static const FormulaTokenEqualityTest aTests[] = { @@ -1009,8 +1009,8 @@ void Test::testFormulaCompilerJumpReordering() { struct TokenCheck { - OpCode const meOp; - StackVar const meType; + OpCode meOp; + StackVar meType; }; // Set separators first. @@ -1085,11 +1085,11 @@ void Test::testFormulaCompilerImplicitIntersection2Param() { struct TestCaseFormula { - OUString const aFormula; - ScAddress const aCellAddress; - ScRange const aSumRange; - bool const bStartColRel; // SumRange-StartCol - bool const bEndColRel; // SumRange-EndCol + OUString aFormula; + ScAddress aCellAddress; + ScRange aSumRange; + bool bStartColRel; // SumRange-StartCol + bool bEndColRel; // SumRange-EndCol }; m_pDoc->InsertTab(0, "Formula"); @@ -1211,10 +1211,10 @@ void Test::testFormulaCompilerImplicitIntersection1ParamNoChange() { struct TestCaseFormulaNoChange { - OUString const aFormula; - ScAddress const aCellAddress; - bool const bMatrixFormula; - bool const bForcedArray; + OUString aFormula; + ScAddress aCellAddress; + bool bMatrixFormula; + bool bForcedArray; }; m_pDoc->InsertTab(0, "Formula"); @@ -1308,9 +1308,9 @@ void Test::testFormulaCompilerImplicitIntersection1ParamWithChange() { struct TestCaseFormula { - OUString const aFormula; - ScAddress const aCellAddress; - ScAddress const aArgAddr; + OUString aFormula; + ScAddress aCellAddress; + ScAddress aArgAddr; }; m_pDoc->InsertTab(0, "Formula"); @@ -1406,8 +1406,8 @@ void Test::testFormulaCompilerImplicitIntersectionOperators() { struct TestCase { - OUString const formula[3]; - double const result[3]; + OUString formula[3]; + double result[3]; }; m_pDoc->InsertTab(0, "Test"); diff --git a/sc/qa/unit/ucalc_pivottable.cxx b/sc/qa/unit/ucalc_pivottable.cxx index 905a26ec0143..e8327f65c0f5 100644 --- a/sc/qa/unit/ucalc_pivottable.cxx +++ b/sc/qa/unit/ucalc_pivottable.cxx @@ -37,14 +37,14 @@ namespace { struct DPFieldDef { const char* pName; - sheet::DataPilotFieldOrientation const eOrient; + sheet::DataPilotFieldOrientation eOrient; /** * Function for data field. It's used only for data field. When 0, the * default function (SUM) is used. */ - ScGeneralFunction const eFunc; - bool const bRepeatItemLabels; + ScGeneralFunction eFunc; + bool bRepeatItemLabels; }; template<size_t Size> @@ -2264,7 +2264,7 @@ void Test::testFuncGETPIVOTDATALeafAccess() struct Check { const char* mpFormula; - double const mfResult; + double mfResult; }; static const Check aChecks[] = { |