diff options
author | Eike Rathke <erack@redhat.com> | 2015-11-16 13:19:20 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-11-16 13:25:50 +0100 |
commit | 311b5b69f032134457184255920ff1083c9afed2 (patch) | |
tree | 27401c4d1189ac27ca282200f828871336a6cbb6 /sc | |
parent | 49257e1da7e371fdea0fac080116b0511789cac7 (diff) |
unit test for tdf#95670
Change-Id: I5874a7fea97311b0e69dbeae8923517a08b63c9a
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/ucalc_formula.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 7a0158e7b6b0..ffcf83434119 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -3431,6 +3431,14 @@ void Test::testFuncSUMPRODUCT() sal_uInt16 nError = m_pDoc->GetErrCode(aPos); CPPUNIT_ASSERT_MESSAGE("Formula result should be a propagated error", nError); + // Test ForceArray propagation of SUMPRODUCT parameters to ABS and + operator. + // => ABS({-3,4})*({-3,4}+{-3,4}) => {3,4}*{-6,8} => {-18,32} => 14 + m_pDoc->SetValue(ScAddress(4,0,0), -3.0); // E1 + m_pDoc->SetValue(ScAddress(4,1,0), 4.0); // E2 + // Non-intersecting formula in F3. + m_pDoc->SetString(ScAddress(5,2,0), "=SUMPRODUCT(ABS(E1:E2);E1:E2+E1:E2)"); + CPPUNIT_ASSERT_EQUAL(14.0, m_pDoc->GetValue(ScAddress(5,2,0))); + m_pDoc->DeleteTab(0); } |