From 2f13dbac060ae6af7e25ad3eff675cc859cfb3ff Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 15 Jun 2012 08:49:46 +0100 Subject: n#325936 fix ww8 export of fly frames with transparent background in headers Regression from commit ed8b5f2d -- to be safe, reverted only for fly frames in headers. Change-Id: Ia538b69bb913567c7d087d40afc7f0a141b7a0ed --- sw/source/filter/ww8/wrtw8esh.cxx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'sw') diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index e47d88105e92..d4d78017ef51 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -77,6 +77,7 @@ #include #include #include +#include #include #include #include @@ -1763,16 +1764,24 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, rPropOpt.AddOpt( ESCHER_Prop_dxTextRight, 0 ); } - SvxBrushItem aBrush(rWrt.TrueFrameBgBrush(rFmt)); - WriteBrushAttr(aBrush, rPropOpt); - - const SdrObject* pObj = rFmt.FindRealSdrObject(); - // SwWW8ImplReader::Read_GrafLayer() imports these as opaque // unconditionally, so if both are true, don't export the property. bool bIsInHeader = lcl_isInHeader(rFmt); bool bIsThrought = rFmt.GetSurround().GetValue() == SURROUND_THROUGHT; + if (bIsInHeader) + { + const SvxBrushItem& rBrush(rFmt.GetBackground()); + WriteBrushAttr(rBrush, rPropOpt); + } + else + { + SvxBrushItem aBrush(rWrt.TrueFrameBgBrush(rFmt)); + WriteBrushAttr(aBrush, rPropOpt); + } + + const SdrObject* pObj = rFmt.FindRealSdrObject(); + if( pObj && (pObj->GetLayer() == GetHellLayerId() || pObj->GetLayer() == GetInvisibleHellId() ) && !(bIsInHeader && bIsThrought)) { -- cgit