summaryrefslogtreecommitdiff
path: root/chart2/qa/extras/chart2import.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-02-22 21:14:22 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-02-23 01:59:41 +0100
commit391220ef21d7d99a968437893ee1e783cdcdaf59 (patch)
tree5f95e1e2d05b0610d353d068402722f3ec512c3e /chart2/qa/extras/chart2import.cxx
parent599472a13e3c5ba669d995c913ad415bd674a16c (diff)
add test for bnc#864396
Change-Id: I38d77a11acf6684cb583ba3e5ffb80f30f3f2fdc
Diffstat (limited to 'chart2/qa/extras/chart2import.cxx')
-rw-r--r--chart2/qa/extras/chart2import.cxx23
1 files changed, 20 insertions, 3 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 9ca95b616435..2d4259b1102b 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -33,6 +33,7 @@ public:
void testPPTXChartSeries();
void testPPTChartSeries();
void testODPChartSeries();
+ void testBnc864396();
CPPUNIT_TEST_SUITE(Chart2ImportTest);
CPPUNIT_TEST(Fdo60083);
@@ -50,9 +51,10 @@ public:
* this causes the UT to crash in sd.
* sd::DrawView::Notify tries to reset by calling sd::DrawViewShell::ResetActualPage
*/
-// CPPUNIT_TEST(testPPTChartSeries);
-// CPPUNIT_TEST(testPPTXChartSeries);
-// CPPUNIT_TEST(testODPChartSeries);
+ CPPUNIT_TEST(testPPTChartSeries);
+ CPPUNIT_TEST(testPPTXChartSeries);
+ CPPUNIT_TEST(testODPChartSeries);
+ CPPUNIT_TEST(testBnc864396);
CPPUNIT_TEST_SUITE_END();
private:
@@ -281,6 +283,21 @@ void Chart2ImportTest::testODPChartSeries()
}
+void Chart2ImportTest::testBnc864396()
+{
+ uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromImpress("/chart2/qa/extras/data/pptx/", "bnc864396.pptx"), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT(xChartDoc->hasInternalDataProvider());
+
+ uno::Reference< chart2::XInternalDataProvider > xDataProvider( xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW );
+ uno::Reference< chart::XChartDataArray > xChartDataArray(xDataProvider, uno::UNO_QUERY_THROW);
+ uno::Sequence< OUString > aRowLabels = xChartDataArray->getRowDescriptions();
+ for(sal_Int32 i = 0; i < aRowLabels.getLength(); ++i)
+ {
+ OUString aExpected = OUString("cat") + OUString::number(i+1);
+ CPPUNIT_ASSERT_EQUAL(aExpected, aRowLabels[i]);
+ }
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();