summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-03-17 00:46:09 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-03-17 00:58:50 +0000
commit01667d040d9280ee2d918a4bc4a5147e870c039c (patch)
tree9aa1f0d5196e9ae81838ae7a024e2f8cbd8c658a
parented8a337cf6d13eda49d394558d83766131f83e54 (diff)
add test for tdf#106459
Change-Id: I2a8c8d5fe253c08c5e3c7b57e6df677ebe7e384d Reviewed-on: https://gerrit.libreoffice.org/35305 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--sc/qa/unit/ucalc.hxx2
-rw-r--r--sc/qa/unit/ucalc_formula.cxx21
2 files changed, 23 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index 92f0d6dd04d5..c48a25f126af 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -134,6 +134,7 @@ public:
void testFormulaCreateStringFromTokens();
void testFormulaParseReference();
void testFetchVectorRefArray();
+ void testGroupConverter3D();
void testFormulaHashAndTag();
void testFormulaTokenEquality();
void testFormulaRefData();
@@ -529,6 +530,7 @@ public:
CPPUNIT_TEST(testFormulaCreateStringFromTokens);
CPPUNIT_TEST(testFormulaParseReference);
CPPUNIT_TEST(testFetchVectorRefArray);
+ CPPUNIT_TEST(testGroupConverter3D);
// CPPUNIT_TEST(testFormulaHashAndTag);
CPPUNIT_TEST(testFormulaTokenEquality);
CPPUNIT_TEST(testFormulaRefData);
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 7604e08bb4a6..6c288bce48e4 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -781,6 +781,27 @@ void Test::testFetchVectorRefArray()
m_pDoc->DeleteTab(0);
}
+void Test::testGroupConverter3D()
+{
+ m_pDoc->InsertTab(0, "Test");
+ m_pDoc->InsertTab(1, "Test2");
+
+ m_pDoc->SetValue(1, 0, 0, 1.0);
+ m_pDoc->SetValue(1, 0, 1, 2.0);
+
+ for (SCROW nRow = 0; nRow < 200; ++nRow)
+ {
+ OUString aFormula = "=SUM(Test.B" + OUString::number(nRow+1) + ":Test2.B" + OUString::number(nRow+1) + ")";
+ m_pDoc->SetString(0, nRow, 0, aFormula);
+ }
+
+ double nVal = m_pDoc->GetValue(0, 0, 0);
+ CPPUNIT_ASSERT_EQUAL(3.0, nVal);
+
+ m_pDoc->DeleteTab(1);
+ m_pDoc->DeleteTab(0);
+}
+
void Test::testFormulaHashAndTag()
{
m_pDoc->InsertTab(0, "Test");