diff options
author | Justin Luth <justin_luth@sil.org> | 2022-02-23 20:45:04 +0200 |
---|---|---|
committer | Justin Luth <jluth@mail.com> | 2022-02-23 20:52:31 +0100 |
commit | dfd0717b3f55eeb15a5634e52d7d0ed544d17578 (patch) | |
tree | 99fd24c0133a9098846d416786e472e0f474b842 /chart2/qa | |
parent | ea1600eb54fac1ac980339535e25cce00f59b711 (diff) |
tdf#127720 chart2: create new columns for error bars
This is basically a copy/paste of the bubble chart fix
for tdf#103984 against the same LO 4.4 regression.
No exist unit tests had error bars. Very interesting.
make CppunitTest_chart2_import CPPUNIT_TEST_NAME=testPPTXChartErrorBars
Change-Id: I81ff91ee2ba75277502a8e261106bf5837a8903b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130444
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'chart2/qa')
-rw-r--r-- | chart2/qa/extras/chart2import.cxx | 15 | ||||
-rw-r--r-- | chart2/qa/extras/data/pptx/tdf127720.pptx | bin | 0 -> 38935 bytes |
2 files changed, 15 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index 0c129d26978b..70cb393ba7b6 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -50,6 +50,7 @@ public: void testDOCXChartSeries(); void testDOCXChartEmptySeries(); void testTdf81396(); + void testPPTXChartErrorBars(); void testDOCXChartValuesSize(); void testPPTXChartSeries(); void testPPTXSparseChartSeries(); @@ -147,6 +148,7 @@ public: CPPUNIT_TEST(testDOCXChartSeries); CPPUNIT_TEST(testDOCXChartEmptySeries); CPPUNIT_TEST(testTdf81396); + CPPUNIT_TEST(testPPTXChartErrorBars); CPPUNIT_TEST(testDOCXChartValuesSize); CPPUNIT_TEST(testPPTChartSeries); CPPUNIT_TEST(testPPTXChartSeries); @@ -481,6 +483,19 @@ void Chart2ImportTest::testTdf81396() CPPUNIT_ASSERT_EQUAL(105.210801910481, aDataSeriesYValues[0][0]); } +void Chart2ImportTest::testPPTXChartErrorBars() +{ + load(u"/chart2/qa/extras/data/pptx/", "tdf127720.pptx"); + Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + uno::Reference< chart::XChartDataArray > xDataArray(xChartDoc->getDataProvider(), UNO_QUERY_THROW); + Sequence<OUString> aColumnDesc = xDataArray->getColumnDescriptions(); + // Number of columns = 4 (Y-values, X-values and positive/negative error bars). + // Without the fix there would only be 2 columns (no error range). + CPPUNIT_ASSERT_EQUAL_MESSAGE("There must be 4 columns and descriptions", static_cast<sal_Int32>(4), aColumnDesc.getLength()); +} + void Chart2ImportTest::testDOCXChartValuesSize() { load( u"/chart2/qa/extras/data/docx/", "bubblechart.docx" ); diff --git a/chart2/qa/extras/data/pptx/tdf127720.pptx b/chart2/qa/extras/data/pptx/tdf127720.pptx Binary files differnew file mode 100644 index 000000000000..b10a4c5ab4ed --- /dev/null +++ b/chart2/qa/extras/data/pptx/tdf127720.pptx |