diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2015-04-02 16:53:58 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-02 17:31:25 +0200 |
commit | 60e48509fa4a200d96887eb4137c6b3b2788b608 (patch) | |
tree | fe867e7523cfae725bfad4d560cafecd74b5524d /sc/qa | |
parent | ae7cfa6a9bef89bbe0f7d827925b606a3f59adef (diff) |
add test for remaining databar properties
Change-Id: I7188af55ebc48838ea236d482e8809a43a99ba9d
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/extras/new_cond_format.cxx | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/sc/qa/extras/new_cond_format.cxx b/sc/qa/extras/new_cond_format.cxx index e067080b4ef9..b7798f2c1710 100644 --- a/sc/qa/extras/new_cond_format.cxx +++ b/sc/qa/extras/new_cond_format.cxx @@ -302,6 +302,61 @@ void ScConditionalFormatTest::testDataBarProperties() testDataBarEntries(xPropSet, "", sheet::DataBarEntryType::DATABAR_AUTO, "", sheet::DataBarEntryType::DATABAR_MAX); } + { + uno::Any aAny = xCondFormat->getByIndex(1); + CPPUNIT_ASSERT(aAny.hasValue()); + CPPUNIT_ASSERT(aAny >>= xPropSet); + testAxisPosition(xPropSet, sheet::DataBarAxis::AXIS_AUTOMATIC); + testShowValue(xPropSet, true); + testUseGradient(xPropSet, true); + testPositiveColor(xPropSet, COL_LIGHTBLUE); + testNegativeColor(xPropSet, COL_LIGHTRED); + testAxisColor(xPropSet, COL_BLACK); + testDataBarEntries(xPropSet, "", sheet::DataBarEntryType::DATABAR_MIN, + "90", sheet::DataBarEntryType::DATABAR_PERCENTILE); + } + { + uno::Any aAny = xCondFormat->getByIndex(2); + CPPUNIT_ASSERT(aAny.hasValue()); + CPPUNIT_ASSERT(aAny >>= xPropSet); + testAxisPosition(xPropSet, sheet::DataBarAxis::AXIS_AUTOMATIC); + testShowValue(xPropSet, true); + testUseGradient(xPropSet, true); + testPositiveColor(xPropSet, COL_LIGHTBLUE); + testNegativeColor(xPropSet, COL_LIGHTRED); + testAxisColor(xPropSet, COL_BLACK); + testDataBarEntries(xPropSet, "2", sheet::DataBarEntryType::DATABAR_VALUE, + "80", sheet::DataBarEntryType::DATABAR_PERCENT); + } + { + uno::Any aAny = xCondFormat->getByIndex(3); + CPPUNIT_ASSERT(aAny.hasValue()); + CPPUNIT_ASSERT(aAny >>= xPropSet); + testAxisPosition(xPropSet, sheet::DataBarAxis::AXIS_AUTOMATIC); + testShowValue(xPropSet, true); + testUseGradient(xPropSet, true); + testPositiveColor(xPropSet, COL_LIGHTBLUE); + testNegativeColor(xPropSet, COL_LIGHTRED); + testAxisColor(xPropSet, COL_BLACK); + /* + * TODO: implement FORMULA + testDataBarEntries(xPropSet, "=A1", sheet::DataBarEntryType::DATABAR_FORMULA, + "", sheet::DataBarEntryType::DATABAR_AUTO); + */ + } + { + uno::Any aAny = xCondFormat->getByIndex(4); + CPPUNIT_ASSERT(aAny.hasValue()); + CPPUNIT_ASSERT(aAny >>= xPropSet); + testAxisPosition(xPropSet, sheet::DataBarAxis::AXIS_MIDDLE); + testShowValue(xPropSet, true); + testUseGradient(xPropSet, false); + testPositiveColor(xPropSet, sal_uInt32(10092390)); + testNegativeColor(xPropSet, sal_uInt32(52428)); + testAxisColor(xPropSet, sal_uInt32(16777113)); + testDataBarEntries(xPropSet, "", sheet::DataBarEntryType::DATABAR_AUTO, + "", sheet::DataBarEntryType::DATABAR_AUTO); + } } void ScConditionalFormatTest::testColorScaleProperties() |