diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2019-10-14 16:07:14 +0200 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-10-15 11:21:33 +0200 |
commit | 54c8a62d630b67847528f82402d802a4da48eac2 (patch) | |
tree | d83ae79015787fa985bee07ae936377f9a5dba5d /oox | |
parent | 09cd127981c18ab847aab736980455efbbe4df54 (diff) |
tdf#128096: only use CharBackColor for highlight if exporting to pptx
Just in case, making sure highlight in docx export works as before
Change-Id: Ied42da1c5f286b80fc754a06357960e8334a765f
Reviewed-on: https://gerrit.libreoffice.org/80780
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/drawingml.cxx | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 168bb53e8217..fb5f6ed7a4cd 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1874,14 +1874,19 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool } } - if (GetProperty(rXPropSet, "CharBackColor")) + // tdf#128096, exporting XML_highlight to docx already works fine, + // so make sure this code is only run when exporting to pptx, just in case + if (GetDocumentType() == DOCUMENT_PPTX) { - ::Color color(*o3tl::doAccess<sal_uInt32>(mAny)); - if( color != COL_AUTO ) + if (GetProperty(rXPropSet, "CharBackColor")) { - mpFS->startElementNS(XML_a, XML_highlight); - WriteColor( color ); - mpFS->endElementNS( XML_a, XML_highlight ); + ::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 ); + } } } |