diff options
author | Tünde Tóth <tundeth@gmail.com> | 2020-04-22 16:00:49 +0200 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2020-04-28 14:53:39 +0200 |
commit | 50670fc723066c0598ed8f482c575bfb290d6a05 (patch) | |
tree | ed208c82f06197e0b9d597a538e97b72cd8b9bb5 /chart2/qa/extras | |
parent | 47c2a85b41d669281b0e9f0063f024360485f0d5 (diff) |
tdf#132355 fix X axis position of stock charts
Set the ShiftedCategoryPosition for true in case of stock chart.
Regression from commit: 111c260ab2883b7906f1a66e222dbf4dc3c58c4f
(tdf#127777 OOXML chart export: fix "CrossBetween" for not imported charts)
Change-Id: I7ced1b03158908e838f7bb44c89dea23c5b347b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92759
Reviewed-by: Balazs Varga <balazs.varga991@gmail.com>
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: László Németh <nemeth@numbertext.org>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93045
Tested-by: Jenkins
Diffstat (limited to 'chart2/qa/extras')
-rw-r--r-- | chart2/qa/extras/chart2import.cxx | 18 | ||||
-rw-r--r-- | chart2/qa/extras/data/odt/stock_chart_LO_6_2.odt | bin | 0 -> 16810 bytes |
2 files changed, 18 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index 5f91d39890ea..e637c3272d33 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -153,6 +153,7 @@ public: void testTdf121991(); void testTdf125444PercentageCustomLabel(); void testTdf123206CustomLabelField(); + void testStockChartShiftedCategoryPosition(); CPPUNIT_TEST_SUITE(Chart2ImportTest); CPPUNIT_TEST(Fdo60083); @@ -255,6 +256,8 @@ public: CPPUNIT_TEST(testTdf121991); CPPUNIT_TEST(testTdf125444PercentageCustomLabel); CPPUNIT_TEST(testTdf123206CustomLabelField); + CPPUNIT_TEST(testStockChartShiftedCategoryPosition); + CPPUNIT_TEST_SUITE_END(); private: @@ -2380,6 +2383,21 @@ void Chart2ImportTest::testTdf123206CustomLabelField() } +void Chart2ImportTest::testStockChartShiftedCategoryPosition() +{ + load("/chart2/qa/extras/data/odt/", "stock_chart_LO_6_2.odt"); + + uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + Reference<chart2::XAxis> xAxis = getAxisFromDoc(xChartDoc, 0, 0, 0); + CPPUNIT_ASSERT(xAxis.is()); + + chart2::ScaleData aScaleData = xAxis->getScaleData(); + CPPUNIT_ASSERT(aScaleData.Categories.is()); + CPPUNIT_ASSERT(aScaleData.ShiftedCategoryPosition); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/chart2/qa/extras/data/odt/stock_chart_LO_6_2.odt b/chart2/qa/extras/data/odt/stock_chart_LO_6_2.odt Binary files differnew file mode 100644 index 000000000000..06e15a6b0ddc --- /dev/null +++ b/chart2/qa/extras/data/odt/stock_chart_LO_6_2.odt |