Kaydet (Commit) 8d3c6cd8 authored tarafından Markus Mohrhard's avatar Markus Mohrhard Kaydeden (comit) Andras Timar

add test for duplicated conditional formats

Conflicts:
	sc/qa/unit/ucalc.cxx
	sc/qa/unit/ucalc.hxx

Change-Id: If6d24cba87eebf6ddbb0d5392d653890ff99ef04
üst 0e26ab0a
......@@ -4946,6 +4946,28 @@ void Test::testCondFormatInsertRow()
m_pDoc->DeleteTab(0);
}
void Test::testCopySheetCondFormat()
{
m_pDoc->InsertTab(0, "Test");
ScConditionalFormat* pFormat = new ScConditionalFormat(1, m_pDoc);
ScRange aCondFormatRange(0,0,0,3,3,0);
ScRangeList aRangeList(aCondFormatRange);
pFormat->AddRange(aRangeList);
ScCondFormatEntry* pEntry = new ScCondFormatEntry(SC_COND_DIRECT,"=B2","",m_pDoc,ScAddress(0,0,0),ScGlobal::GetRscString(STR_STYLENAME_RESULT));
pFormat->AddEntry(pEntry);
m_pDoc->AddCondFormat(pFormat, 0);
ScDocument aDoc;
aDoc.TransferTab(m_pDoc, 0, 0, true);
ScConditionalFormatList* pList = aDoc.GetCondFormList(0);
CPPUNIT_ASSERT_EQUAL(size_t(1), pList->size());
m_pDoc->DeleteTab(0);
}
void Test::testMixData()
{
m_pDoc->InsertTab(0, "Test");
......
......@@ -301,6 +301,7 @@ public:
void testCondFormatINSDEL();
void testCondFormatInsertRow();
void testCondFormatInsertCol();
void testCopySheetCondFormat();
CPPUNIT_TEST_SUITE(Test);
#if CALC_TEST_PERF
......@@ -412,6 +413,7 @@ public:
CPPUNIT_TEST(testCellTextWidth);
CPPUNIT_TEST(testEditTextIterator);
CPPUNIT_TEST(testCondFormatINSDEL);
CPPUNIT_TEST(testCopySheetCondFormat);
CPPUNIT_TEST_SUITE_END();
private:
......
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