[Libreoffice-commits] core.git: oox/source

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Tue Oct 15 09:22:41 UTC 2019


 oox/source/export/drawingml.cxx |   17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

New commits:
commit 54c8a62d630b67847528f82402d802a4da48eac2
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Mon Oct 14 16:07:14 2019 +0200
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Tue Oct 15 11:21:33 2019 +0200

    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 at collabora.com>

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 );
+            }
         }
     }
 


More information about the Libreoffice-commits mailing list