summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2015-03-16 23:14:08 +0100
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2015-03-30 04:34:13 +0200
commit8a5482912b5091ede68b823e4e29cfb2f74c6315 (patch)
tree343a0cc79e9cca836f817cfa3fca4c77f0b841b0 /sc
parent0b8777dc19bb86fb196f45183cdc9fa8f764add3 (diff)
add test for one of the ScCondFormatsObj methods
Change-Id: I05fc54a2153fd90d03d2575bdd9bde30a54d71c1
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/extras/new_cond_format.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sc/qa/extras/new_cond_format.cxx b/sc/qa/extras/new_cond_format.cxx
index 3200998c81ea..cd4826c219c3 100644
--- a/sc/qa/extras/new_cond_format.cxx
+++ b/sc/qa/extras/new_cond_format.cxx
@@ -33,10 +33,12 @@ public:
uno::Reference< uno::XInterface > init();
void testRequestCondFormatListFromSheet();
void testCondFormatListProperties();
+ void testCondFormatListFormats();
CPPUNIT_TEST_SUITE(ScConditionalFormatTest);
CPPUNIT_TEST(testRequestCondFormatListFromSheet);
CPPUNIT_TEST(testCondFormatListProperties);
+ CPPUNIT_TEST(testCondFormatListFormats);
CPPUNIT_TEST_SUITE_END();
private:
@@ -104,6 +106,20 @@ void ScConditionalFormatTest::testCondFormatListProperties()
CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xCondFormat->getLength());
}
+void ScConditionalFormatTest::testCondFormatListFormats()
+{
+ uno::Reference<sheet::XConditionalFormats> xCondFormatList =
+ getConditionalFormatList(init());
+
+ uno::Sequence<uno::Reference<sheet::XConditionalFormat> > xCondFormats =
+ xCondFormatList->getConditionalFormats();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xCondFormats.getLength());
+ for (sal_Int32 i = 0, n = xCondFormats.getLength(); i < n; ++i)
+ {
+ CPPUNIT_ASSERT(xCondFormats[i].is());
+ }
+}
+
void ScConditionalFormatTest::setUp()
{
nTest++;