kbrown / rpms / libreoffice

Forked from rpms/libreoffice 2 years ago
Clone
Blob Blame History Raw
From 4336ba9770efb61d4131c005fb1d16ab2be20928 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolnai=20Tam=C3=A1s?= <tamas.zolnai@collabora.com>
Date: Mon, 4 Aug 2014 11:02:55 +0200
Subject: [PATCH 076/137] fdo#80986: disable highlight DOCX import

Highlight support is not implemented fully, so
it seems better to disable DOCX import of it until
it is finished.
Highlight can't be modified on the UI and is not
saved to ODT/DOC (regression).

Regression from:
8b949134441056a1455d67ddfdd7e0bc5f2ee682

(cherry picked from commit b5e60724ac73bb0e62b249145a8931fd6166bb69)

Conflicts:
	sw/qa/extras/ooxmlexport/ooxmlexport.cxx

Change-Id: I94891769766ae90017e8afa70e65d080d5270202
Reviewed-on: https://gerrit.libreoffice.org/10721
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
---
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx     | 2 ++
 writerfilter/source/dmapper/DomainMapper.cxx | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 4db47e5..b269a11 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -1540,6 +1540,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo69636, "fdo69636.docx")
     CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:pict/v:rect/v:textbox", "style").match("mso-layout-flow-alt:bottom-to-top"));
 }
 
+/*
 DECLARE_OOXMLEXPORT_TEST(testCharHighlight, "char_highlight.docx")
 {
     const uno::Reference< text::XTextRange > xPara = getParagraph(1);
@@ -1586,6 +1587,7 @@ DECLARE_OOXMLEXPORT_TEST(testCharHighlight, "char_highlight.docx")
         CPPUNIT_ASSERT_EQUAL(sal_Int32(0x0000ff), getProperty<sal_Int32>(xRun,"CharBackColor"));
     }
 }
+*/
 
 DECLARE_OOXMLEXPORT_TEST(testFontNameIsEmpty, "font-name-is-empty.docx")
 {
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index b9b1adf..aa6067d 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2102,7 +2102,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
         {
             sal_Int32 nColor = 0;
             if( (mbIsHighlightSet = getColorFromIndex(nIntValue, nColor)) )
-                rContext->Insert(PROP_CHAR_HIGHLIGHT, uno::makeAny( nColor ));
+                rContext->Insert(PROP_CHAR_BACK_COLOR, uno::makeAny( nColor ));
             else if (mnBackgroundColor)
                 rContext->Insert(PROP_CHAR_BACK_COLOR, uno::makeAny( mnBackgroundColor ));
         }
-- 
1.9.3