summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorTünde Tóth <toth.tunde@nisz.hu>2023-04-19 14:48:33 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2023-04-26 11:59:06 +0200
commiteba5256cba797c67e13d8fc99cb213d6113fcb6a (patch)
tree534eabbc83c2fbe5768621e32787218e9a615226 /sc
parent4eb9164a087ba223b3fa92714626bbe6fb90fabf (diff)
tdf#91332 XLSX export: fix missing solidFill
Background color of shape inherited from theme lost after export. Regression from commit bc0a9076aa43a0782bcf81e55d3f84f6af0f68e8 "ooxml: Preserve shape theme attribute for solid fill". Change-Id: I2d8298ac17332ba3ad6a627ce8b07c23087ac7b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150674 Tested-by: Jenkins 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/+/151038
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/data/xlsx/tdf91332.xlsxbin0 -> 11375 bytes
-rw-r--r--sc/qa/unit/subsequent_export_test2.cxx21
2 files changed, 21 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xlsx/tdf91332.xlsx b/sc/qa/unit/data/xlsx/tdf91332.xlsx
new file mode 100644
index 000000000000..5f1d119e8ee7
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/tdf91332.xlsx
Binary files differ
diff --git a/sc/qa/unit/subsequent_export_test2.cxx b/sc/qa/unit/subsequent_export_test2.cxx
index f97dc4b643d3..32f557463ed3 100644
--- a/sc/qa/unit/subsequent_export_test2.cxx
+++ b/sc/qa/unit/subsequent_export_test2.cxx
@@ -185,6 +185,7 @@ public:
void testTdf130104_XLSXIndent();
void testWholeRowBold();
void testXlsxRowsOrder();
+ void testTdf91332();
void testTdf91286();
void testTdf148820();
void testEmbeddedTextInDecimal();
@@ -315,6 +316,7 @@ public:
CPPUNIT_TEST(testTdf130104_XLSXIndent);
CPPUNIT_TEST(testWholeRowBold);
CPPUNIT_TEST(testXlsxRowsOrder);
+ CPPUNIT_TEST(testTdf91332);
CPPUNIT_TEST(testTdf91286);
CPPUNIT_TEST(testTdf148820);
CPPUNIT_TEST(testEmbeddedTextInDecimal);
@@ -2814,6 +2816,25 @@ void ScExportTest2::testXlsxRowsOrder()
save("Calc Office Open XML");
}
+void ScExportTest2::testTdf91332()
+{
+ createScDoc("xlsx/tdf91332.xlsx");
+ saveAndReload("Calc Office Open XML");
+
+ uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
+ uno::Reference<drawing::XDrawPage> xPage(xDoc->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xShapeProps(xPage->getByIndex(0), uno::UNO_QUERY_THROW);
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: rgba[90cf47ff]
+ // - Actual : rgba[ffffffff]
+ // i.e. fill color inherited from theme lost after export.
+ Color nColor;
+ xShapeProps->getPropertyValue("FillColor") >>= nColor;
+ CPPUNIT_ASSERT_EQUAL(Color(0x90cf47), nColor);
+}
+
void ScExportTest2::testTdf91286()
{
createScDoc("ods/tdf91286.ods");