compilerplugins/clang/unusedenumconstants.py | 3 +++ sc/qa/unit/helper/csv_handler.hxx | 7 ++----- sc/qa/unit/helper/qahelper.cxx | 2 +- sc/qa/unit/helper/qahelper.hxx | 4 ++-- sc/qa/unit/subsequent_filters-test.cxx | 12 ++++++------ 5 files changed, 14 insertions(+), 14 deletions(-)
New commits: commit 408c0a7693316f0e23080be52db9bef720ed2cb4 Author: Noel Grandin <[email protected]> Date: Mon Feb 20 11:44:56 2017 +0200 convert StringType to scoped enum and drop unused FormulaValue enumerator Change-Id: Ide6026b841db224947d7d559c110dfc7da3cd975 Reviewed-on: https://gerrit.libreoffice.org/34467 Tested-by: Jenkins <[email protected]> Reviewed-by: Noel Grandin <[email protected]> diff --git a/compilerplugins/clang/unusedenumconstants.py b/compilerplugins/clang/unusedenumconstants.py index 089927e..4404081 100755 --- a/compilerplugins/clang/unusedenumconstants.py +++ b/compilerplugins/clang/unusedenumconstants.py @@ -116,6 +116,7 @@ def is_ignore(srcLoc): "codemaker/source/javamaker/classfile.hxx", # AccessFlags "basic/source/inc/filefmt.hxx", # FileOffset "basic/source/inc/opcodes.hxx", # SbiOpcode + "sc/source/filter/inc/flttypes.hxx", # BiffTyp # unit test code "cppu/source/uno/check.cxx", # general weird nonsense going on @@ -145,6 +146,8 @@ def is_ignore(srcLoc): "connectivity/source/inc/odbc/OTools.hxx", # ODBC3SQLFunctionId "include/formula/grammar.hxx", # FormulaGrammar::Grammar "basic/source/sbx/sbxres.hxx", # StringId + "sc/source/core/tool/chartpos.cxx", # CellState + "sc/source/core/data/global2.cxx", # State # Windows or OSX only "include/canvas/rendering/icolorbuffer.hxx", "include/vcl/commandevent.hxx", diff --git a/sc/qa/unit/helper/csv_handler.hxx b/sc/qa/unit/helper/csv_handler.hxx index a840d3e..ff4bd3d 100644 --- a/sc/qa/unit/helper/csv_handler.hxx +++ b/sc/qa/unit/helper/csv_handler.hxx @@ -112,7 +112,7 @@ public: CPPUNIT_ASSERT_MESSAGE(createErrorMessage(mnCol, mnRow, mnTab).getStr(), false); } } - else if (meStringType == PureString) + else if (meStringType == StringType::PureString) { OUString aCSVString(p, n, RTL_TEXTENCODING_UTF8); OUString aString = mpDoc->GetString(mnCol, mnRow, mnTab); @@ -135,12 +135,9 @@ public: OUString aString; switch (meStringType) { - case StringValue: + case StringType::StringValue: aString = mpDoc->GetString(mnCol, mnRow, mnTab); break; - case FormulaValue: - mpDoc->GetFormula(mnCol, mnRow, mnTab, aString); - break; default: break; } diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index f8bdd11..b0a4847 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -169,7 +169,7 @@ void testFormats(ScBootstrapFixture* pTest, ScDocument* pDoc, sal_Int32 nFormat) //test Sheet1 with csv file OUString aCSVFileName; pTest->createCSVPath("numberFormat.", aCSVFileName); - testFile(aCSVFileName, *pDoc, 0, PureString); + testFile(aCSVFileName, *pDoc, 0, StringType::PureString); //need to test the color of B3 //it's not a font color! //formatting for B5: # ??/100 gets lost during import diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx index 061b7b5..a4a93c2 100644 --- a/sc/qa/unit/helper/qahelper.hxx +++ b/sc/qa/unit/helper/qahelper.hxx @@ -65,7 +65,7 @@ #define FORMAT_XLSB 9 #define FORMAT_FODS 10 -enum StringType { PureString, FormulaValue, StringValue }; +enum class StringType { PureString, StringValue }; SCQAHELPER_DLLPUBLIC bool testEqualsWithTolerance( long nVal1, long nVal2, long nTol ); @@ -119,7 +119,7 @@ SCQAHELPER_DLLPUBLIC std::ostream& operator<<(std::ostream& rStrm, const OpCode& SCQAHELPER_DLLPUBLIC void loadFile(const OUString& aFileName, std::string& aContent); -SCQAHELPER_DLLPUBLIC void testFile(OUString& aFileName, ScDocument& rDoc, SCTAB nTab, StringType aStringFormat = StringValue); +SCQAHELPER_DLLPUBLIC void testFile(OUString& aFileName, ScDocument& rDoc, SCTAB nTab, StringType aStringFormat = StringType::StringValue); //need own handler because conditional formatting strings must be generated SCQAHELPER_DLLPUBLIC void testCondFile(OUString& aFileName, ScDocument* pDoc, SCTAB nTab); diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index af75775..ff9717d 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -547,13 +547,13 @@ void ScFiltersTest::testFunctionsODS() testFile(aCSVFileName, rDoc, 1); //test mathematical functions createCSVPath("mathematical-functions.", aCSVFileName); - testFile(aCSVFileName, rDoc, 2, PureString); + testFile(aCSVFileName, rDoc, 2, StringType::PureString); //test information functions createCSVPath("information-functions.", aCSVFileName); testFile(aCSVFileName, rDoc, 3); // text functions createCSVPath("text-functions.", aCSVFileName); - testFile(aCSVFileName, rDoc, 4, PureString); + testFile(aCSVFileName, rDoc, 4, StringType::PureString); // statistical functions createCSVPath("statistical-functions.", aCSVFileName); testFile(aCSVFileName, rDoc, 5); @@ -578,7 +578,7 @@ void ScFiltersTest::testFunctionsODS() xDocSh->DoHardRecalc(true); ScDocument& rDoc3 = xDocSh->GetDocument(); createCSVPath("date-time-functions.", aCSVFileName); - testFile(aCSVFileName, rDoc3, 0, PureString); + testFile(aCSVFileName, rDoc3, 0, StringType::PureString); xDocSh->DoClose(); @@ -631,13 +631,13 @@ void ScFiltersTest::testCachedFormulaResultsODS() testFile(aCSVFileName, rDoc, 1); //test cached formula results of mathematical functions createCSVPath("mathematical-functions.", aCSVFileName); - testFile(aCSVFileName, rDoc, 2, PureString); + testFile(aCSVFileName, rDoc, 2, StringType::PureString); //test cached formula results of information functions createCSVPath("information-functions.", aCSVFileName); testFile(aCSVFileName, rDoc, 3); // text functions createCSVPath("text-functions.", aCSVFileName); - testFile(aCSVFileName, rDoc, 4, PureString); + testFile(aCSVFileName, rDoc, 4, StringType::PureString); xDocSh->DoClose(); } @@ -1480,7 +1480,7 @@ void ScFiltersTest::testBrokenQuotesCSV() OUString aCSVPath; createCSVPath( aSheet2CSV, aCSVPath ); // fdo#48621 - testFile( aCSVPath, rDoc, 0, PureString); + testFile( aCSVPath, rDoc, 0, StringType::PureString); xDocSh->DoClose(); } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
