summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-04-20 23:42:45 +0200
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2015-04-22 04:08:53 +0000
commit62de1313968453091a0cbacd1d8989daad44fe51 (patch)
treeebcdc3aa3014cfa28f413ae6c56beaa182396473 /sw
parentb2914050c0e2b3843f1067560a5de7dd8c76dd72 (diff)
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 <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 61381728047e627cfc66c32aa148a20786c99da0) Reviewed-on: https://gerrit.libreoffice.org/15468 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/unocore/unoframe.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 63fa7dfb9ac7..9185e3d0dafe 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -460,9 +460,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);