summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-20 11:44:56 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-20 12:23:59 +0000
commit408c0a7693316f0e23080be52db9bef720ed2cb4 (patch)
treea5beddbd132e0818ed5a3a978bca57bb521b1ac3 /sc
parent2009cf1b1c50976abd7714a2fc11046e12da8da7 (diff)
convert StringType to scoped enum
and drop unused FormulaValue enumerator Change-Id: Ide6026b841db224947d7d559c110dfc7da3cd975 Reviewed-on: https://gerrit.libreoffice.org/34467 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/helper/csv_handler.hxx7
-rw-r--r--sc/qa/unit/helper/qahelper.cxx2
-rw-r--r--sc/qa/unit/helper/qahelper.hxx4
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx12
4 files changed, 11 insertions, 14 deletions
diff --git a/sc/qa/unit/helper/csv_handler.hxx b/sc/qa/unit/helper/csv_handler.hxx
index a840d3e6f935..ff4bd3dc95c5 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 f8bdd1166d01..b0a4847cebcb 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 061b7b5a6c80..a4a93c24bee9 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 af7577503aa7..ff9717d44a7d 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();
}