From 5dfd5755c709e91d2903bd7be4582f7832e89780 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 7 Jan 2019 16:32:18 +0100 Subject: oox smartart, org chart: fix font color when defined with quick styles createStyleMatrixContext() assumed that contains , but it contains instead. This resulted in a 0 mnThemedIdx, which meant that since commit 89206c472ecf18bfde6824cea8004921cd404365 (bnc#862510: PPTX import: Wrong text color inside shape, 2014-12-21) we ignored the theme color in oox::drawingml::Shape::createAndInsert(). Change-Id: I81045fa58df5cb9e31a4ed3f1b1625224bcd06ad Reviewed-on: https://gerrit.libreoffice.org/65938 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- sd/qa/unit/import-tests-smartart.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'sd/qa') diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx index 98df02de2fc9..1cde30c4e140 100644 --- a/sd/qa/unit/import-tests-smartart.cxx +++ b/sd/qa/unit/import-tests-smartart.cxx @@ -700,6 +700,17 @@ void SdImportTestSmartArt::testOrgChart() CPPUNIT_ASSERT(xManager.is()); CPPUNIT_ASSERT_EQUAL(OUString("Manager"), xManager->getString()); + uno::Reference xParaEnumAccess(xManager, uno::UNO_QUERY); + uno::Reference xParaEnum = xParaEnumAccess->createEnumeration(); + uno::Reference xPara(xParaEnum->nextElement(), uno::UNO_QUERY); + uno::Reference xRunEnumAccess(xPara, uno::UNO_QUERY); + uno::Reference xRunEnum = xRunEnumAccess->createEnumeration(); + uno::Reference xRun(xRunEnum->nextElement(), uno::UNO_QUERY); + sal_Int32 nActualColor = xRun->getPropertyValue("CharColor").get(); + // Without the accompanying fix in place, this test would have failed: the + // "Manager" font color was black, not white. + CPPUNIT_ASSERT_EQUAL(static_cast(0xffffff), nActualColor); + uno::Reference xManagerShape(xManager, uno::UNO_QUERY); CPPUNIT_ASSERT(xManagerShape.is()); -- cgit