diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-04-20 23:42:45 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-04-21 14:39:30 +0000 |
commit | 61381728047e627cfc66c32aa148a20786c99da0 (patch) | |
tree | 5b7ae1ba2370e9d1e596b7debdd02b3248783be7 | |
parent | 04946086b0b08d1ab0de2a91959299312f140ed4 (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>
-rw-r--r-- | sw/source/core/unocore/unoframe.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index d62fd2915dfc..1bcdc23bfb21 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); |