kbrown / rpms / libreoffice

Forked from rpms/libreoffice 2 years ago
Clone

Blame SOURCES/0076-fdo-80986-disable-highlight-DOCX-import.patch

f085be
From 4336ba9770efb61d4131c005fb1d16ab2be20928 Mon Sep 17 00:00:00 2001
f085be
From: =?UTF-8?q?Zolnai=20Tam=C3=A1s?= <tamas.zolnai@collabora.com>
f085be
Date: Mon, 4 Aug 2014 11:02:55 +0200
f085be
Subject: [PATCH 076/137] fdo#80986: disable highlight DOCX import
f085be
f085be
Highlight support is not implemented fully, so
f085be
it seems better to disable DOCX import of it until
f085be
it is finished.
f085be
Highlight can't be modified on the UI and is not
f085be
saved to ODT/DOC (regression).
f085be
f085be
Regression from:
f085be
8b949134441056a1455d67ddfdd7e0bc5f2ee682
f085be
f085be
(cherry picked from commit b5e60724ac73bb0e62b249145a8931fd6166bb69)
f085be
f085be
Conflicts:
f085be
	sw/qa/extras/ooxmlexport/ooxmlexport.cxx
f085be
f085be
Change-Id: I94891769766ae90017e8afa70e65d080d5270202
f085be
Reviewed-on: https://gerrit.libreoffice.org/10721
f085be
Reviewed-by: Michael Stahl <mstahl@redhat.com>
f085be
Tested-by: Michael Stahl <mstahl@redhat.com>
f085be
---
f085be
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx     | 2 ++
f085be
 writerfilter/source/dmapper/DomainMapper.cxx | 2 +-
f085be
 2 files changed, 3 insertions(+), 1 deletion(-)
f085be
f085be
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
f085be
index 4db47e5..b269a11 100644
f085be
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
f085be
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
f085be
@@ -1540,6 +1540,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo69636, "fdo69636.docx")
f085be
     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"));
f085be
 }
f085be
 
f085be
+/*
f085be
 DECLARE_OOXMLEXPORT_TEST(testCharHighlight, "char_highlight.docx")
f085be
 {
f085be
     const uno::Reference< text::XTextRange > xPara = getParagraph(1);
f085be
@@ -1586,6 +1587,7 @@ DECLARE_OOXMLEXPORT_TEST(testCharHighlight, "char_highlight.docx")
f085be
         CPPUNIT_ASSERT_EQUAL(sal_Int32(0x0000ff), getProperty<sal_Int32>(xRun,"CharBackColor"));
f085be
     }
f085be
 }
f085be
+*/
f085be
 
f085be
 DECLARE_OOXMLEXPORT_TEST(testFontNameIsEmpty, "font-name-is-empty.docx")
f085be
 {
f085be
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
f085be
index b9b1adf..aa6067d 100644
f085be
--- a/writerfilter/source/dmapper/DomainMapper.cxx
f085be
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
f085be
@@ -2102,7 +2102,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
f085be
         {
f085be
             sal_Int32 nColor = 0;
f085be
             if( (mbIsHighlightSet = getColorFromIndex(nIntValue, nColor)) )
f085be
-                rContext->Insert(PROP_CHAR_HIGHLIGHT, uno::makeAny( nColor ));
f085be
+                rContext->Insert(PROP_CHAR_BACK_COLOR, uno::makeAny( nColor ));
f085be
             else if (mnBackgroundColor)
f085be
                 rContext->Insert(PROP_CHAR_BACK_COLOR, uno::makeAny( mnBackgroundColor ));
f085be
         }
f085be
-- 
f085be
1.9.3
f085be