Kaydet (Commit) 09f0919f authored tarafından Michael Stahl's avatar Michael Stahl

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 5aa360ca)

Change-Id: I4ca59d8932a8e5d034c35543a54528198ad7d51c
üst c3e49660
...@@ -459,9 +459,15 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI ...@@ -459,9 +459,15 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
{ {
// No fill transparency is given. On the other hand, we have a // No fill transparency is given. On the other hand, we have a
// BackColorTransparency, so use that. // 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); sal_Int8 nGraphicTransparency(0);
*pColTrans >>= nGraphicTransparency; *pColTrans >>= nGraphicTransparency;
rToSet.Put(XFillTransparenceItem(nGraphicTransparency)); if (aXFillStyleItem.GetValue() != drawing::FillStyle_BITMAP)
{
rToSet.Put(XFillTransparenceItem(nGraphicTransparency));
}
if (aXFillStyleItem.GetValue() == drawing::FillStyle_SOLID) if (aXFillStyleItem.GetValue() == drawing::FillStyle_SOLID)
{ {
aBrush.PutValue(*pColTrans, MID_BACK_COLOR_TRANSPARENCY); aBrush.PutValue(*pColTrans, MID_BACK_COLOR_TRANSPARENCY);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment