oox/source/drawingml/fillproperties.cxx      |    2 +-
 sw/qa/extras/ooxmlimport/data/tdf100830.docx |binary
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx     |    2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 24998064599e3371208ad8ae4b149d754828d35b
Author: lbenes <lukebe...@hotmail.com>
Date:   Thu Oct 6 15:57:22 2016 -0400

    tdf#102997 Fix Error in OOXML Transparency Conversion Math
    
    This fixes the import logic for tdf#100830 to handle transparencies other 
than 50%.
    
    (cherry picked from commit ade43e6a86e4f864e771f4b3008a428bc10fa55f)
    
    Conflicts:
        oox/source/drawingml/fillproperties.cxx
    
    Change-Id: If4e2e369a9674488878bb0a4378d48292ea4e0cb
    Reviewed-on: https://gerrit.libreoffice.org/29830
    Reviewed-by: Michael Stahl <mst...@redhat.com>
    Tested-by: Jenkins <c...@libreoffice.org>

diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index c283212..81a3747 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -655,7 +655,7 @@ void FillProperties::pushToPropMap( ShapePropertyMap& 
rPropMap,
                     }
 
                     if (maBlipProps.moAlphaModFix.has())
-                        rPropMap.setProperty(SHAPEPROP_FillTransparency, 
static_cast<sal_Int16>(maBlipProps.moAlphaModFix.get() / PER_PERCENT));
+                        rPropMap.setProperty(SHAPEPROP_FillTransparency, 
static_cast<sal_Int16>(100 - (maBlipProps.moAlphaModFix.get() / PER_PERCENT)));
                 }
             break;
 
diff --git a/sw/qa/extras/ooxmlimport/data/tdf100830.docx 
b/sw/qa/extras/ooxmlimport/data/tdf100830.docx
old mode 100644
new mode 100755
index a51b890..6c43217
Binary files a/sw/qa/extras/ooxmlimport/data/tdf100830.docx and 
b/sw/qa/extras/ooxmlimport/data/tdf100830.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 59a015b..417af48 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -3248,7 +3248,7 @@ DECLARE_OOXMLIMPORT_TEST(testTdf99140, "tdf99140.docx")
 DECLARE_OOXMLIMPORT_TEST(testTdf100830, "tdf100830.docx")
 {
     // FillTransparence wasn't imported, this was 0.
-    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(50), 
getProperty<sal_Int16>(getShape(1), "FillTransparence"));
+    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(30), 
getProperty<sal_Int16>(getShape(1), "FillTransparence"));
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to