Kaydet (Commit) 690228ad authored tarafından Markus Mohrhard's avatar Markus Mohrhard

add a unit test for fdo#66646

Change-Id: I15bef4e0422261ec473263ac8fc239604146f864
üst 1e2bbf4b
......@@ -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();
......
......@@ -224,6 +224,8 @@ public:
void testSharedFormulasCopyPaste();
void testFormulaPosition();
void testMixData();
/**
* Make sure the sheet streams are invalidated properly.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment