summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-04-20 23:42:45 +0200
committerMichael Stahl <mstahl@redhat.com>2015-04-21 00:33:59 +0200
commit09f0919f9a1686f6c1492777307e77f841294192 (patch)
tree80ece6341c7e39103cef282dd641e43fdaa616e3
parentc3e49660e782816d1203cb936156ef6d6a1ad572 (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
-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 197a83b77d32..2ea6eae00bda 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);