diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-09-25 21:40:33 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-09-27 17:43:51 +0200 |
commit | 690228ad4dd4cf10ad6292686d4aad8dcc9e2793 (patch) | |
tree | ec96802c3a25625c2d73198c6ca926a3acbad245 /sc/qa | |
parent | 1e2bbf4bc723a9838bb8786908682ea2dd841866 (diff) |
add a unit test for fdo#66646
Change-Id: I15bef4e0422261ec473263ac8fc239604146f864
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 21 | ||||
-rw-r--r-- | sc/qa/unit/ucalc.hxx | 2 |
2 files changed, 23 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 433107352f0f..b0b6f32d05ca 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -4202,6 +4202,27 @@ void Test::testCondFormatInsertRow() m_pDoc->DeleteTab(0); } +void Test::testMixData() +{ + m_pDoc->InsertTab(0, "Test"); + + m_pDoc->SetValue(1,0,0,2); + m_pDoc->SetValue(0,1,0,3); + ScDocument aClipDoc(SCDOCMODE_CLIP); + copyToClip(m_pDoc, ScRange(0,0,0,1,0,0), &aClipDoc); + + ScDocument aMixDoc(SCDOCMODE_CLIP); + copyToClip(m_pDoc, ScRange(0,1,0,1,1,0), &aMixDoc); + + pasteFromClip(m_pDoc, ScRange(0,1,0,1,1,0), &aClipDoc); + m_pDoc->MixDocument(ScRange(0,1,0,1,1,0), 1, false, &aMixDoc); + + CPPUNIT_ASSERT_EQUAL(2.0, m_pDoc->GetValue(1,1,0)); + CPPUNIT_ASSERT_EQUAL(3.0, m_pDoc->GetValue(0,1,0)); + + m_pDoc->DeleteTab(0); +} + void Test::printRange(ScDocument* pDoc, const ScRange& rRange, const char* pCaption) { SCROW nRow1 = rRange.aStart.Row(), nRow2 = rRange.aEnd.Row(); diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx index 698d6837827b..3c46cab60b0a 100644 --- a/sc/qa/unit/ucalc.hxx +++ b/sc/qa/unit/ucalc.hxx @@ -224,6 +224,8 @@ public: void testSharedFormulasCopyPaste(); void testFormulaPosition(); + void testMixData(); + /** * Make sure the sheet streams are invalidated properly. */ |