diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-06-15 08:49:46 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-06-15 09:55:42 +0200 |
commit | 2f13dbac060ae6af7e25ad3eff675cc859cfb3ff (patch) | |
tree | 711fab4420d55602ba64e32a08720dbf0b7df139 | |
parent | 5e63c104a6c0eefd91d4e887bc5e8f96615e6467 (diff) |
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
-rw-r--r-- | sw/source/filter/ww8/wrtw8esh.cxx | 19 |
1 files changed, 14 insertions, 5 deletions
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 <frmfmt.hxx> #include <flyfrm.hxx> #include <pagefrm.hxx> +#include <frmatr.hxx> #include <fmtcntnt.hxx> #include <ndindex.hxx> #include <doc.hxx> @@ -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)) { |