summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorTünde Tóth <toth.tunde@nisz.hu>2022-02-18 10:30:54 +0100
committerAndras Timar <andras.timar@collabora.com>2022-03-09 09:17:16 +0100
commitda4ade51efe0b444094ceafce129972432f73405 (patch)
tree40f3049dc12e5e943cdf535f7b07388084755175 /sd
parent781562d55e80aaa853d42fe33c6f546aa55a1061 (diff)
tdf#103800 PPTX shape import: fix regression of text color
defined by list styles. Properties in a:lstStyle of p:txBody should take precedence over the same properties defined in a:fontRef of style elements. Change-Id: I02cc886eb9eba94f49fe413a63bf7c46c9e3c127 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130237 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/+/130712 Tested-by: Jenkins
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/tdf103800.pptxbin0 -> 30131 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx17
2 files changed, 17 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf103800.pptx b/sd/qa/unit/data/pptx/tdf103800.pptx
new file mode 100644
index 000000000000..91f8bb719fef
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf103800.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 5035fa6cedb8..e49892d3a738 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -189,6 +189,7 @@ public:
void testTdf99729();
void testTdf89927();
void testTdf135843();
+ void testTdf103800();
CPPUNIT_TEST_SUITE(SdImportTest);
@@ -258,6 +259,7 @@ public:
CPPUNIT_TEST(testTdf99729);
CPPUNIT_TEST(testTdf89927);
CPPUNIT_TEST(testTdf135843);
+ CPPUNIT_TEST(testTdf103800);
CPPUNIT_TEST_SUITE_END();
};
@@ -1983,6 +1985,21 @@ void SdImportTest::testTdf135843()
xDocShRef->DoClose();
}
+void SdImportTest::testTdf103800()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf103800.pptx"), PPTX);
+ uno::Reference< beans::XPropertySet > xShape(getShapeFromPage(0, 0, xDocShRef));
+ uno::Reference< text::XTextRange > xParagraph(getParagraphFromShape(0, xShape));
+ uno::Reference< text::XTextRange > xRun(getRunFromParagraph(0, xParagraph));
+ uno::Reference< beans::XPropertySet > xPropSet(xRun, uno::UNO_QUERY_THROW);
+
+ Color nCharColor;
+ xPropSet->getPropertyValue("CharColor") >>= nCharColor;
+ CPPUNIT_ASSERT_EQUAL(Color(0xC00000), nCharColor);
+
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();