sw/source/core/unocore/unoframe.cxx |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 61381728047e627cfc66c32aa148a20786c99da0
Author: Michael Stahl <mst...@redhat.com>
Date:   Mon Apr 20 23:42:45 2015 +0200

    tdf#90640: sw: ODF import: ignore style:background-transparency for
    
    ... bitmap backgrounds of frames.  OOo/LO versions <= 4.3 wrongly write
    fo:background-color="transparent" style:background-transparency="100%"
    for bitmap backgrounds, because of a stupid API implementation with
    SvxBrushItem.  They overwrite that with draw:opacity="100%" on the child
    element style:background-image, which we don't read if we see draw:fill
    attributes, so ignore the background-transparency in that case.
    
    (regression from 5aa360cae0383f270c12708e7e94179a7fde6711)
    
    Change-Id: I4ca59d8932a8e5d034c35543a54528198ad7d51c
    (cherry picked from commit 09f0919f9a1686f6c1492777307e77f841294192)
    Reviewed-on: https://gerrit.libreoffice.org/15463
    Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>
    Tested-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/sw/source/core/unocore/unoframe.cxx 
b/sw/source/core/unocore/unoframe.cxx
index d62fd291..1bcdc23 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -459,9 +459,15 @@ bool 
BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
         {
             // No fill transparency is given.  On the other hand, we have a
             // BackColorTransparency, so use that.
+            // tdf#90640 tdf#90130: this is necessary for LO 4.4.0 - 4.4.2
+            // that forgot to write draw:opacity into documents
+            // but: the value was *always* wrong for bitmaps! => ignore it
             sal_Int8 nGraphicTransparency(0);
             *pColTrans >>= nGraphicTransparency;
-            rToSet.Put(XFillTransparenceItem(nGraphicTransparency));
+            if (aXFillStyleItem.GetValue() != drawing::FillStyle_BITMAP)
+            {
+                rToSet.Put(XFillTransparenceItem(nGraphicTransparency));
+            }
             if (aXFillStyleItem.GetValue() == drawing::FillStyle_SOLID)
             {
                 aBrush.PutValue(*pColTrans, MID_BACK_COLOR_TRANSPARENCY);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to