summaryrefslogtreecommitdiff
path: root/chart2/qa/extras
diff options
context:
space:
mode:
authorAron Budea <aron.budea@collabora.com>2017-11-03 02:08:00 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-12-20 00:07:03 +0100
commit021081823aeebcfa395662d0c04535a243977c2e (patch)
treeb6e08286577e42a722e48a2839f99a74aeb6490b /chart2/qa/extras
parent9e7caee0173c5ec2d8b5cfa6aedfd1c9674d442b (diff)
tdf#105517: overwrite existing scheme colors in vector
Theme overrides stopped working once ClrScheme::maClrScheme was changed to vector, and colors were always appended to it. Regression from f3121049828596b369e3ea844355d61666e49795. Change-Id: Iae850dcabf57b12d8a564e84acf38d9988cfe963 Reviewed-on: https://gerrit.libreoffice.org/44242 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'chart2/qa/extras')
-rw-r--r--chart2/qa/extras/chart2import.cxx30
-rw-r--r--chart2/qa/extras/data/pptx/tdf105517.pptxbin0 -> 37194 bytes
2 files changed, 30 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 9b95105640f8..a49e80e1b867 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -62,6 +62,7 @@ public:
void testFdo54361();
void testFdo54361_1();
void testTdf86624(); // manually placed legends
+ void testTdf105517();
void testTdf106217();
void testAutoBackgroundXLSX();
void testChartAreaStyleBackgroundXLSX();
@@ -129,6 +130,7 @@ public:
CPPUNIT_TEST(testFdo54361);
CPPUNIT_TEST(testFdo54361_1);
CPPUNIT_TEST(testTdf86624);
+ CPPUNIT_TEST(testTdf105517);
CPPUNIT_TEST(testTdf106217);
CPPUNIT_TEST(testAutoBackgroundXLSX);
CPPUNIT_TEST(testChartAreaStyleBackgroundXLSX);
@@ -747,6 +749,34 @@ void Chart2ImportTest::testTdf86624()
CPPUNIT_ASSERT(aPos.Y > 4000); // real value for ms is above 7000
}
+void Chart2ImportTest::testTdf105517()
+{
+ load("/chart2/qa/extras/data/pptx/", "tdf105517.pptx");
+ Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xChartDoc.is());
+
+ Reference<chart2::XCoordinateSystemContainer> xCoordContainer(xChartDoc->getFirstDiagram(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xCoordContainer.is());
+ Reference<chart2::XChartTypeContainer> xChartTypeContainer(xCoordContainer->getCoordinateSystems()[0], uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xChartTypeContainer.is());
+ Reference<chart2::XDataSeriesContainer> xDSContainer(xChartTypeContainer->getChartTypes()[0], uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xDSContainer.is());
+ Reference<beans::XPropertySet> xPropSet1(xDSContainer->getDataSeries()[0], uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xPropSet1.is());
+
+ long lineColor;
+ xPropSet1->getPropertyValue("Color") >>= lineColor;
+ // incorrect line color was 0x4a7ebb due to not handling themeOverride
+ CPPUNIT_ASSERT_EQUAL(lineColor, long(0xeaa700));
+
+ Reference<beans::XPropertySet> xPropSet2(xDSContainer->getDataSeries()[1], uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xPropSet2.is());
+
+ xPropSet2->getPropertyValue("Color") >>= lineColor;
+ // incorrect line color was 0x98b855
+ CPPUNIT_ASSERT_EQUAL(lineColor, long(0x1e69a8));
+}
+
void Chart2ImportTest::testTdf106217()
{
load("/chart2/qa/extras/data/pptx/", "tdf106217.pptx");
diff --git a/chart2/qa/extras/data/pptx/tdf105517.pptx b/chart2/qa/extras/data/pptx/tdf105517.pptx
new file mode 100644
index 000000000000..ff9d747f0349
--- /dev/null
+++ b/chart2/qa/extras/data/pptx/tdf105517.pptx
Binary files differ