summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorAron Budea <aron.budea@collabora.com>2017-11-03 02:08:00 +0100
committerAndras Timar <andras.timar@collabora.com>2018-01-17 08:43:39 +0100
commit9d772cdaa8ff1a18b9acac32a0f53b1419211922 (patch)
tree5f026dd390aa5da6d0646415f5407c1b70b32003 /chart2
parentcd2ee5fab4a30bd56daabce03e75561541ffabb0 (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. Reviewed-on: https://gerrit.libreoffice.org/44242 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 021081823aeebcfa395662d0c04535a243977c2e) Change-Id: Iae850dcabf57b12d8a564e84acf38d9988cfe963 Reviewed-on: https://gerrit.libreoffice.org/46845 Reviewed-by: Aron Budea <aron.budea@collabora.com> Tested-by: Aron Budea <aron.budea@collabora.com> (cherry picked from commit 1006025df2b6d02ef0762dde227456717d30b1dc)
Diffstat (limited to 'chart2')
-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 ca690298827e..b0f98a642f85 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -63,6 +63,7 @@ public:
void testFdo54361();
void testFdo54361_1();
void testTdf86624(); // manually placed legends
+ void testTdf105517();
void testTdf106217();
void testAutoBackgroundXLSX();
void testChartAreaStyleBackgroundXLSX();
@@ -127,6 +128,7 @@ public:
CPPUNIT_TEST(testFdo54361);
CPPUNIT_TEST(testFdo54361_1);
CPPUNIT_TEST(testTdf86624);
+ CPPUNIT_TEST(testTdf105517);
CPPUNIT_TEST(testTdf106217);
CPPUNIT_TEST(testAutoBackgroundXLSX);
CPPUNIT_TEST(testChartAreaStyleBackgroundXLSX);
@@ -743,6 +745,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