summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga991@gmail.com>2020-09-11 14:14:13 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2020-09-29 16:54:49 +0200
commit1208b154c44a4e930fc630e062273d91b21edb0a (patch)
treed98c996db0976081368019760ddfc7657c9ecdbd /chart2
parentd67809efc6b372f5c8ddfa88551fcc89efe48cdc (diff)
tdf#136267 OOXML Chart Import: create main category axis labels once
because InternalDataProvider can not handle different category names on the primary and secondary category axis. Revert e0b0502516a10181bbd1737b93b38b2bba4c98e8 commit, except the relevant unit test. Regression from commit: e0b0502516a10181bbd1737b93b38b2bba4c98e8 (tdf#128016 Chart OOXML Import: fix duplicated category labels) Also fix tdf#129994 (FILEOPEN - hang at import time), which is a a regression from commit fa0a981af41a2606541eec1cb20a379a739691e0 (tdf#114166 DOCX chart import: fix missing complex categories) Change-Id: I5d049e760eb1a647ea774be264349a2f16f15f5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102463 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103617 Tested-by: Jenkins
Diffstat (limited to 'chart2')
-rw-r--r--chart2/qa/extras/chart2export.cxx11
-rw-r--r--chart2/qa/extras/data/xlsx/tdf136267.xlsxbin0 -> 31986 bytes
-rw-r--r--chart2/source/tools/ExplicitCategoriesProvider.cxx1
3 files changed, 12 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index 2459a2b3089b..b1bc22c61469 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -172,6 +172,7 @@ public:
void testTdf133190();
void testTdf133191();
void testTdf132594();
+ void testTdf136267();
CPPUNIT_TEST_SUITE(Chart2ExportTest);
CPPUNIT_TEST(testErrorBarXLSX);
@@ -307,6 +308,7 @@ public:
CPPUNIT_TEST(testTdf133190);
CPPUNIT_TEST(testTdf133191);
CPPUNIT_TEST(testTdf132594);
+ CPPUNIT_TEST(testTdf136267);
CPPUNIT_TEST_SUITE_END();
@@ -2816,6 +2818,15 @@ void Chart2ExportTest::testTdf132594()
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:cat", 1);
}
+void Chart2ExportTest::testTdf136267()
+{
+ load("/chart2/qa/extras/data/xlsx/", "tdf136267.xlsx");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ assertXPathContent(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:cat/c:strRef/c:strCache/c:pt/c:v", "John");
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/data/xlsx/tdf136267.xlsx b/chart2/qa/extras/data/xlsx/tdf136267.xlsx
new file mode 100644
index 000000000000..741a33c429b9
--- /dev/null
+++ b/chart2/qa/extras/data/xlsx/tdf136267.xlsx
Binary files differ
diff --git a/chart2/source/tools/ExplicitCategoriesProvider.cxx b/chart2/source/tools/ExplicitCategoriesProvider.cxx
index c0b232240710..bf65f58ec850 100644
--- a/chart2/source/tools/ExplicitCategoriesProvider.cxx
+++ b/chart2/source/tools/ExplicitCategoriesProvider.cxx
@@ -55,6 +55,7 @@ ExplicitCategoriesProvider::ExplicitCategoriesProvider( const Reference< chart2:
{
if( xCooSysModel.is() )
{
+ // TODO: handle different category names on the primary and secondary category axis.
uno::Reference< XAxis > xAxis( xCooSysModel->getAxisByDimension(0,0) );
if( xAxis.is() )
{