summaryrefslogtreecommitdiff
path: root/sc/qa/extras/new_cond_format.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2015-03-29 23:10:51 +0200
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2015-03-30 04:34:26 +0200
commitb48cd09e419efc012fe4719afafc9a8ddbf875f9 (patch)
tree467c6ee84a48d11bba5eb2290b3823b8e669dc8e /sc/qa/extras/new_cond_format.cxx
parente49808edc46c75ae2bd351ca71f09fb43c3b9051 (diff)
work on initial colorscale properties tests
Change-Id: Ifc71437b8c7dfd70bf733863713ada4ad605abad
Diffstat (limited to 'sc/qa/extras/new_cond_format.cxx')
-rw-r--r--sc/qa/extras/new_cond_format.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/sc/qa/extras/new_cond_format.cxx b/sc/qa/extras/new_cond_format.cxx
index 3f67d38e8f66..c4876e6615b3 100644
--- a/sc/qa/extras/new_cond_format.cxx
+++ b/sc/qa/extras/new_cond_format.cxx
@@ -38,6 +38,7 @@ public:
void testCondFormatProperties();
void testCondFormatXIndex();
void testDataBarProperties();
+ void testColorScaleProperties();
CPPUNIT_TEST_SUITE(ScConditionalFormatTest);
CPPUNIT_TEST(testRequestCondFormatListFromSheet);
@@ -46,6 +47,7 @@ public:
CPPUNIT_TEST(testCondFormatProperties);
CPPUNIT_TEST(testCondFormatXIndex);
CPPUNIT_TEST(testDataBarProperties);
+ CPPUNIT_TEST(testColorScaleProperties);
CPPUNIT_TEST_SUITE_END();
private:
@@ -259,6 +261,25 @@ void ScConditionalFormatTest::testDataBarProperties()
}
}
+void ScConditionalFormatTest::testColorScaleProperties()
+{
+ uno::Reference<sheet::XConditionalFormats> xCondFormatList =
+ getConditionalFormatList(init(3));
+
+ uno::Sequence<uno::Reference<sheet::XConditionalFormat> > xCondFormats =
+ xCondFormatList->getConditionalFormats();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xCondFormats.getLength());
+
+ uno::Reference<sheet::XConditionalFormat> xCondFormat = xCondFormats[0];
+ CPPUNIT_ASSERT(xCondFormat.is());
+
+ uno::Type aType = xCondFormat->getElementType();
+ CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.beans.XPropertySet"), aType.getTypeName());
+
+ CPPUNIT_ASSERT(xCondFormat->hasElements());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xCondFormat->getCount());
+}
+
void ScConditionalFormatTest::setUp()
{
nTest++;