diff options
author | Eike Rathke <erack@redhat.com> | 2015-06-19 12:38:15 +0000 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-06-19 12:40:37 +0000 |
commit | b36dbb499e19fe8a497a48d7c78ad3cb5d40a83d (patch) | |
tree | 3e31cab6268950d19576ed92a46bf76f193e636a /sc/qa/unit/ucalc.cxx | |
parent | 3bc5d730dc2c7a093b9c490dc329c3429ce4f183 (diff) |
Revert "tdf#90290 reduce some copy&paste code in ucalc."
This reverts commit 26dacbb13d7d40b5ed2bf934dbf94b35919d0562.
Change-Id: Ic8ebd787cf920041540b35ffd75e3f136872274d
Reviewed-on: https://gerrit.libreoffice.org/16374
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.cxx | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 3c598f63e7ba..f00e3a0a2faa 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -3792,16 +3792,19 @@ void Test::testCutPasteRefUndo() m_pDoc->CopyFromClip(ScAddress(2,1,0), aMark, IDF_CONTENTS, pUndoDoc, &aClipDoc, true, false); CPPUNIT_ASSERT_EQUAL(12.0, m_pDoc->GetValue(0,1,0)); - checkFormula(*m_pDoc, ScAddress(0,1,0), "C2", "A2 should be referencing C2."); + if (!checkFormula(*m_pDoc, ScAddress(0,1,0), "C2")) + CPPUNIT_FAIL("A2 should be referencing C2."); // At this point, the ref undo document should contain a formula cell at A2 that references B2. - checkFormula(*pUndoDoc, ScAddress(0,1,0), "B2", "A2 in the undo document should be referencing B2."); + if (!checkFormula(*pUndoDoc, ScAddress(0,1,0), "B2")) + CPPUNIT_FAIL("A2 in the undo document should be referencing B2."); ScUndoPaste aUndo(&getDocShell(), ScRange(ScAddress(2,1,0)), aMark, pUndoDoc, NULL, IDF_CONTENTS, NULL, false, NULL); aUndo.Undo(); // Now A2 should be referencing B2 once again. - checkFormula(*m_pDoc, ScAddress(0,1,0), "B2", "A2 should be referencing B2 after undo."); + if (!checkFormula(*m_pDoc, ScAddress(0,1,0), "B2")) + CPPUNIT_FAIL("A2 should be referencing B2 after undo."); m_pDoc->DeleteTab(0); } @@ -3824,8 +3827,10 @@ void Test::testMoveRefBetweenSheets() CPPUNIT_ASSERT_EQUAL(30.0, m_pDoc->GetValue(ScAddress(0,2,0))); // These formulas should not display the sheet name. - checkFormula(*m_pDoc, ScAddress(0,1,0), "A1", "Wrong formula!"); - checkFormula(*m_pDoc, ScAddress(0,2,0), "SUM(A1:C1)", "Wrong formula!"); + if (!checkFormula(*m_pDoc, ScAddress(0,1,0), "A1")) + CPPUNIT_FAIL("Wrong formula!"); + if (!checkFormula(*m_pDoc, ScAddress(0,2,0), "SUM(A1:C1)")) + CPPUNIT_FAIL("Wrong formula!"); // Move Test1.A2:A3 to Test2.A2:A3. ScDocFunc& rFunc = getDocShell().GetDocFunc(); @@ -3837,8 +3842,10 @@ void Test::testMoveRefBetweenSheets() CPPUNIT_ASSERT_EQUAL(30.0, m_pDoc->GetValue(ScAddress(0,2,1))); // The reference in the pasted formula should display sheet name after the move. - checkFormula(*m_pDoc, ScAddress(0,1,1), "Test1.A1", "Wrong formula!"); - checkFormula(*m_pDoc, ScAddress(0,2,1), "SUM(Test1.A1:C1)", "Wrong formula!"); + if (!checkFormula(*m_pDoc, ScAddress(0,1,1), "Test1.A1")) + CPPUNIT_FAIL("Wrong formula!"); + if (!checkFormula(*m_pDoc, ScAddress(0,2,1), "SUM(Test1.A1:C1)")) + CPPUNIT_FAIL("Wrong formula!"); m_pDoc->DeleteTab(1); m_pDoc->DeleteTab(0); |