summaryrefslogtreecommitdiff
path: root/chart2/qa/extras/chart2import.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-04-30 01:38:44 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-05-01 02:31:58 +0200
commit5d185dc3b443a99dad0b192319c22dca615ce51d (patch)
tree2559ce3bb4159fc9e26d07f278f0f35a0144946b /chart2/qa/extras/chart2import.cxx
parent200963d3019b7d296f4e22c5e6874eef8b84012b (diff)
add test for fdo#78041
Change-Id: I08d30102b2218584af2fb800a657728bec42ec18
Diffstat (limited to 'chart2/qa/extras/chart2import.cxx')
-rw-r--r--chart2/qa/extras/chart2import.cxx27
1 files changed, 27 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 4d7f4b0bf6a3..c30f201db7ed 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -18,12 +18,15 @@
#include <com/sun/star/chart2/XInternalDataProvider.hpp>
#include <com/sun/star/chart/XChartDataArray.hpp>
+#include <com/sun/star/util/Color.hpp>
+
class Chart2ImportTest : public ChartTest
{
public:
void Fdo60083();
void testSteppedLines();
void testErrorBarRange();
+ void testErrorBarFormatting();
void testODSChartSeries();
void testXLSXChartSeries();
void testXLSChartSeries();
@@ -41,6 +44,7 @@ public:
CPPUNIT_TEST(Fdo60083);
CPPUNIT_TEST(testSteppedLines);
CPPUNIT_TEST(testErrorBarRange);
+ CPPUNIT_TEST(testErrorBarFormatting);
CPPUNIT_TEST(testODSChartSeries);
CPPUNIT_TEST(testXLSXChartSeries);
CPPUNIT_TEST(testXLSChartSeries);
@@ -147,6 +151,29 @@ void Chart2ImportTest::testErrorBarRange()
CPPUNIT_ASSERT_EQUAL(aRangePos, OUString("$Sheet1.$C$2:$C$4"));
}
+void Chart2ImportTest::testErrorBarFormatting()
+{
+ load("/chart2/qa/extras/data/ods/", "error_bar_properties.ods");
+ uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
+ CPPUNIT_ASSERT(xChartDoc.is());
+
+ Reference< chart2::XDataSeries > xDataSeries = getDataSeriesFromDoc( xChartDoc, 0 );
+ CPPUNIT_ASSERT( xDataSeries.is() );
+
+ Reference< beans::XPropertySet > xPropSet( xDataSeries, UNO_QUERY_THROW );
+ CPPUNIT_ASSERT( xPropSet.is() );
+
+ // test that y error bars are there
+ Reference< beans::XPropertySet > xErrorBarYProps;
+ xPropSet->getPropertyValue("ErrorBarY") >>= xErrorBarYProps;
+ CPPUNIT_ASSERT(xErrorBarYProps.is());
+
+ util::Color aColor;
+ xErrorBarYProps->getPropertyValue("LineColor") >>= aColor;
+ sal_uInt32 nColorValue = aColor;
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(0xff3333), nColorValue);
+}
+
// stepped line interpolation
void Chart2ImportTest::testSteppedLines()
{