summaryrefslogtreecommitdiff
path: root/sc/qa/unit/ucalc.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-09-14 15:22:20 +0200
committerEike Rathke <erack@redhat.com>2016-09-23 15:22:38 +0000
commit3e22dfa5eb1ccebdc719a671d23bde7ccab256fb (patch)
treec3890b2a33cc298ad786c50a9d5879531fc6afc4 /sc/qa/unit/ucalc.cxx
parent7d8196ea2f4ec3634dbad7367345e62c4ea9893d (diff)
convert formula error codes to scoped enum
Change-Id: I5ff214bf1ec9031e30344bc125bc99916fd11bfb Reviewed-on: https://gerrit.libreoffice.org/28897 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/qa/unit/ucalc.cxx')
-rw-r--r--sc/qa/unit/ucalc.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 7e8654f3ea0e..0db6a1c270be 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -900,12 +900,12 @@ void Test::testValueIterator()
bool bHas = false;
size_t nCheckPos = 0;
double fVal;
- sal_uInt16 nErr;
+ FormulaError nErr;
for (bHas = aIter.GetFirst(fVal, nErr); bHas; bHas = aIter.GetNext(fVal, nErr), ++nCheckPos)
{
CPPUNIT_ASSERT_MESSAGE("Iteration longer than expected.", nCheckPos < nCheckLen);
CPPUNIT_ASSERT_EQUAL(aChecks[nCheckPos], fVal);
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(0), nErr);
+ CPPUNIT_ASSERT_EQUAL(0, (int)nErr);
}
}
@@ -5776,8 +5776,8 @@ void Test::testFormulaWizardSubformula()
m_pDoc->SetString(ScAddress(1,2,0), "=gibberish"); // B3
ScSimpleFormulaCalculator aFCell1( m_pDoc, ScAddress(0,0,0), "=B1:B3", true );
- sal_uInt16 nErrCode = aFCell1.GetErrCode();
- CPPUNIT_ASSERT( nErrCode == 0 || aFCell1.IsMatrix() );
+ FormulaError nErrCode = aFCell1.GetErrCode();
+ CPPUNIT_ASSERT( nErrCode == FormulaError::NONE || aFCell1.IsMatrix() );
CPPUNIT_ASSERT_EQUAL( OUString("{1;#DIV/0!;#NAME?}"), aFCell1.GetString().getString() );
m_pDoc->SetString(ScAddress(1,0,0), "=NA()"); // B1
@@ -5785,7 +5785,7 @@ void Test::testFormulaWizardSubformula()
m_pDoc->SetString(ScAddress(1,2,0), "=1+2"); // B3
ScSimpleFormulaCalculator aFCell2( m_pDoc, ScAddress(0,0,0), "=B1:B3", true );
nErrCode = aFCell2.GetErrCode();
- CPPUNIT_ASSERT( nErrCode == 0 || aFCell2.IsMatrix() );
+ CPPUNIT_ASSERT( nErrCode == FormulaError::NONE || aFCell2.IsMatrix() );
CPPUNIT_ASSERT_EQUAL( OUString("{#N/A;2;3}"), aFCell2.GetString().getString() );
m_pDoc->DeleteTab(0);