summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2019-10-11 17:43:46 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2019-10-15 11:21:50 +0200
commit63fff549e05e6007d9692996274982afeb34cd7f (patch)
tree02cb5e9fa0fb3a93f909dfdae90e3d4f10bdd807 /oox
parent198fc5e09784afe32cf681f65009e5ac43e67ba4 (diff)
tdf#128096: pptx: export highlight
Reviewed-on: https://gerrit.libreoffice.org/80670 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> (cherry picked from commit 3e0811660ba4cecd0ab27918c27a5ddab47cc5c5) Change-Id: If3084f7ffaceb774dba1b1f195229313a8f1d04a Reviewed-on: https://gerrit.libreoffice.org/80740 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/drawingml.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index de0c65cbcd8d..2d7b300e51e3 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1839,6 +1839,22 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
}
}
+ // 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)
+ {
+ 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)