summaryrefslogtreecommitdiff
path: root/sc/qa/unit/ucalc.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-22 14:24:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-23 12:00:27 +0000
commitc80fe3937b94df56d7f0dedc85ddf11b48b5e8b5 (patch)
treef51724ae3d3ca35a6b6e12faaba1401927a4beac /sc/qa/unit/ucalc.cxx
parent8ab1fe71f546dd5f8d3ec8f53a0fb31e24d55adc (diff)
convert ScMatrixMode to scoped enum
and fix a bug in ScChangeActionContent::SetValueString where it was passing the grammar as the ScMatrixMode to the ScFormulaCell constructor. Change-Id: I7c1a174cdd8365dedc30cff0b26e3079bb8b84f3 Reviewed-on: https://gerrit.libreoffice.org/35552 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/qa/unit/ucalc.cxx')
-rw-r--r--sc/qa/unit/ucalc.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index b7a3be681357..8a0b48508017 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -94,6 +94,11 @@
#include <utility>
#include <vector>
+static std::ostream& operator<<(std::ostream& os, ScMatrixMode mode)
+{
+ os << (int) mode; return os;
+}
+
struct TestImpl
{
ScDocShellRef m_xDocShell;
@@ -1955,12 +1960,12 @@ void Test::testMatrixEditable()
ScFormulaCell* pFC = m_pDoc->GetFormulaCell(ScAddress(0,2,0));
CPPUNIT_ASSERT(pFC);
CPPUNIT_ASSERT_EQUAL_MESSAGE("A3 should be matrix origin.",
- MM_FORMULA, static_cast<ScMatrixMode>(pFC->GetMatrixFlag()));
+ ScMatrixMode::Formula, pFC->GetMatrixFlag());
pFC = m_pDoc->GetFormulaCell(ScAddress(0,3,0));
CPPUNIT_ASSERT(pFC);
CPPUNIT_ASSERT_EQUAL_MESSAGE("A4 should be matrix reference.",
- MM_REFERENCE, static_cast<ScMatrixMode>(pFC->GetMatrixFlag()));
+ ScMatrixMode::Reference, pFC->GetMatrixFlag());
// Check to make sure A3:A4 combined is editable.
ScEditableTester aTester;