oox/source/export/drawingml.cxx | 11 +++++++++++ sd/qa/unit/data/odp/tdf128096.odp |binary sd/qa/unit/export-tests-ooxml2.cxx | 16 ++++++++++++++++ 3 files changed, 27 insertions(+)
New commits: commit 3e0811660ba4cecd0ab27918c27a5ddab47cc5c5 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Fri Oct 11 17:43:46 2019 +0200 Commit: Xisco Faulí <xiscofa...@libreoffice.org> CommitDate: Sun Oct 13 20:36:39 2019 +0200 tdf#128096: pptx: export highlight Change-Id: If3084f7ffaceb774dba1b1f195229313a8f1d04a Reviewed-on: https://gerrit.libreoffice.org/80670 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofa...@libreoffice.org> diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 6e114430dc20..83c709c4633e 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1874,6 +1874,17 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool } } + if (GetProperty(rXPropSet, "CharBackColor")) + { + ::Color color(*o3tl::doAccess<sal_uInt32>(mAny)); + if( color != COL_AUTO ) + { + mpFS->startElementNS(XML_a, XML_highlight); + WriteColor( color ); + mpFS->endElementNS( XML_a, XML_highlight ); + } + } + if (underline && ((bCheckDirect && GetPropertyAndState(rXPropSet, rXPropState, "CharUnderlineColor", eState) diff --git a/sd/qa/unit/data/odp/tdf128096.odp b/sd/qa/unit/data/odp/tdf128096.odp new file mode 100644 index 000000000000..827239973c84 Binary files /dev/null and b/sd/qa/unit/data/odp/tdf128096.odp differ diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index bdfae4ab25ec..78452a763f01 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -163,6 +163,7 @@ public: void testTdf118768(); void testTdf118836(); void testTdf116350TextEffects(); + void testTdf128096(); void testTdf120573(); void testTdf118825(); void testTdf119118(); @@ -262,6 +263,7 @@ public: CPPUNIT_TEST(testTdf118768); CPPUNIT_TEST(testTdf118836); CPPUNIT_TEST(testTdf116350TextEffects); + CPPUNIT_TEST(testTdf128096); CPPUNIT_TEST(testTdf120573); CPPUNIT_TEST(testTdf118825); CPPUNIT_TEST(testTdf119118); @@ -2059,6 +2061,20 @@ void SdOOXMLExportTest2::testTdf116350TextEffects() xDocShRef->DoClose(); } +void SdOOXMLExportTest2::testTdf128096() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/tdf128096.odp"), ODP); + utl::TempFile tempFile; + xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile); + xDocShRef->DoClose(); + + xmlDocPtr pXmlDocContent1 = parseExport(tempFile, "ppt/slides/slide1.xml"); + assertXPath(pXmlDocContent1, "//p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:r/a:rPr/a:highlight/a:srgbClr", "val", "ffff00"); + + // Check that underlined content is also highlighted + xmlDocPtr pXmlDocContent2 = parseExport(tempFile, "ppt/slides/slide2.xml"); + assertXPath(pXmlDocContent2, "//p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:r/a:rPr/a:highlight/a:srgbClr", "val", "ffff00"); +} void SdOOXMLExportTest2::testTdf120573() { ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc( "sd/qa/unit/data/pptx/tdf120573.pptx" ), PPTX ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits