[Libreoffice-commits] core.git: chart2/qa chart2/source
Balazs Varga (via logerrit)
logerrit at kemper.freedesktop.org
Wed Nov 13 10:00:42 UTC 2019
chart2/qa/extras/chart2import.cxx | 17 +++++++++++++++++
chart2/qa/extras/data/odt/tdf128733.odt |binary
chart2/source/tools/AxisHelper.cxx | 1 +
3 files changed, 18 insertions(+)
New commits:
commit 71f9961488232697bcdb37db349569a20f15bb2d
Author: Balazs Varga <balazs.varga991 at gmail.com>
AuthorDate: Tue Nov 12 14:05:19 2019 +0100
Commit: László Németh <nemeth at numbertext.org>
CommitDate: Wed Nov 13 10:59:57 2019 +0100
tdf#128733 Chart import: fix secondary X axis
shiftedcategoryposition value. When inserting secondary axes it applies
the ShiftedCategoryPosition of the main axis.
Regression from the commit 111c260ab2883b7906f1a66e222dbf4dc3c58c4f
(tdf#127777 OOXML chart export: fix "CrossBetween" for not imported
charts)
Change-Id: Ia043fe2873f633cbd5f7db206cf9d1b0d2f8c34c
Reviewed-on: https://gerrit.libreoffice.org/82511
Reviewed-by: László Németh <nemeth at numbertext.org>
Tested-by: László Németh <nemeth at numbertext.org>
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 665b9f96e62d..f4bfb53fbf34 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -135,6 +135,7 @@ public:
void testTdf114179();
void testTdf124243();
void testTdf127393();
+ void testTdf128733();
void testTdf128432();
void testTdf128627();
void testTdf128634();
@@ -231,6 +232,7 @@ public:
CPPUNIT_TEST(testTdf114179);
CPPUNIT_TEST(testTdf124243);
CPPUNIT_TEST(testTdf127393);
+ CPPUNIT_TEST(testTdf128733);
CPPUNIT_TEST(testTdf128432);
CPPUNIT_TEST(testTdf128627);
CPPUNIT_TEST(testTdf128634);
@@ -2028,6 +2030,21 @@ void Chart2ImportTest::testTdf127393()
CPPUNIT_ASSERT(!aScaleData2.ShiftedCategoryPosition);
}
+void Chart2ImportTest::testTdf128733()
+{
+ load("/chart2/qa/extras/data/odt/", "tdf128733.odt");
+
+ Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xChartDoc.is());
+ // test secondary X axis ShiftedCategoryPosition value
+ Reference<chart2::XAxis> xAxis = getAxisFromDoc(xChartDoc, 0, 0, 1);
+ CPPUNIT_ASSERT(xAxis.is());
+
+ chart2::ScaleData aScaleData = xAxis->getScaleData();
+ CPPUNIT_ASSERT(aScaleData.Categories.is());
+ CPPUNIT_ASSERT(aScaleData.ShiftedCategoryPosition);
+}
+
void Chart2ImportTest::testTdf128432()
{
load("/chart2/qa/extras/data/ods/", "tdf128432.ods");
diff --git a/chart2/qa/extras/data/odt/tdf128733.odt b/chart2/qa/extras/data/odt/tdf128733.odt
new file mode 100644
index 000000000000..18aace26c02d
Binary files /dev/null and b/chart2/qa/extras/data/odt/tdf128733.odt differ
diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx
index 6ec3d44f48d4..75d51c610e11 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -364,6 +364,7 @@ Reference< XAxis > AxisHelper::createAxis(
aScale.AutoDateAxis = aMainScale.AutoDateAxis;
aScale.Categories = aMainScale.Categories;
aScale.Orientation = aMainScale.Orientation;
+ aScale.ShiftedCategoryPosition = aMainScale.ShiftedCategoryPosition;
xAxis->setScaleData( aScale );
More information about the Libreoffice-commits
mailing list