summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-03-05 12:07:32 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-03-06 07:56:54 +0100
commit6e39ea83a269ac56cbcf81084217457feabf5d47 (patch)
tree797acb30aeb7d54443d02b96ebfba289730fcd66
parent2082dc5421a7d1e8447cddfca96df084abdc3cbc (diff)
improve chart2 import test
Change-Id: I0de697ccf779163408755bcd677b2af2e74bd18f
-rw-r--r--chart2/qa/extras/chart2import.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 1a6db5be6cd5..e30e1a03390d 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -27,6 +27,7 @@
#include <com/sun/star/chart2/XChartTypeContainer.hpp>
#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
+#include <com/sun/star/chart/ErrorBarStyle.hpp>
#include <comphelper/processfactory.hxx>
@@ -73,6 +74,25 @@ void Chart2ImportTest::Fdo60083()
Reference< beans::XPropertySet > xErrorBarYProps;
xPropSet->getPropertyValue("ErrorBarY") >>= xErrorBarYProps;
CPPUNIT_ASSERT(xErrorBarYProps.is());
+ {
+ sal_Int32 nErrorBarStyle;
+ xErrorBarYProps->getPropertyValue("ErrorBarStyle") >>= nErrorBarStyle;
+ CPPUNIT_ASSERT_EQUAL(nErrorBarStyle, static_cast<sal_Int32>(chart::ErrorBarStyle::RELATIVE));
+
+ double nVal;
+ xErrorBarYProps->getPropertyValue("PositiveError") >>= nVal;
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(5.0, nVal, 1e-8);
+
+ xErrorBarYProps->getPropertyValue("NegativeError") >>= nVal;
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(5.0, nVal, 1e-8);
+
+ sal_Bool bVal;
+ xErrorBarYProps->getPropertyValue("ShowPositiveError") >>= bVal;
+ CPPUNIT_ASSERT_EQUAL(static_cast<bool>(bVal), true);
+
+ xErrorBarYProps->getPropertyValue("ShowNegativeError") >>= bVal;
+ CPPUNIT_ASSERT_EQUAL(static_cast<bool>(bVal), true);
+ }
// test that x error bars are not imported
Reference< beans::XPropertySet > xErrorBarXProps;