summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2015-03-16 23:14:08 +0100
committerJan Holesovsky <kendy@collabora.com>2015-04-09 11:39:21 +0200
commit09502902eecc7f40b93fa82103b69bbd5372d1c0 (patch)
tree4d1e73b370f0722601c2daed35b86e90961ed972
parentintegrate ScConditionalFormat UNO object correctly (diff)
downloadcore-09502902eecc7f40b93fa82103b69bbd5372d1c0.tar.gz
core-09502902eecc7f40b93fa82103b69bbd5372d1c0.zip
add test for one of the ScCondFormatsObj methods
Change-Id: I05fc54a2153fd90d03d2575bdd9bde30a54d71c1
-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++;