summaryrefslogtreecommitdiff
path: root/sc/qa/unit/ucalc.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-09-07 13:19:14 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-09-07 19:36:07 +0200
commitf0b0c7a23f2d36437d845b7f53defe25dfe8cef0 (patch)
treec7d88f1f1934e774c752ba2d4c763a9a745097c2 /sc/qa/unit/ucalc.cxx
parentb2111e6b15b7a2ee3849d48605f3d6507463028b (diff)
add test for duplicated conditional formats
Change-Id: If6d24cba87eebf6ddbb0d5392d653890ff99ef04
Diffstat (limited to 'sc/qa/unit/ucalc.cxx')
-rw-r--r--sc/qa/unit/ucalc.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index f90c544f20ec..3f88cf5cf81d 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -7096,6 +7096,28 @@ void Test::testCondCopyPasteSingleCell()
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::testIconSet()
{
m_pDoc->InsertTab(0, "Test");