Kaydet (Commit) 0544946e authored tarafından Miklos Vajna's avatar Miklos Vajna

SwFrm::PaintBackground: paint gradient in layout if SvxBrushItem wants it

Change-Id: I72eec18ac6265fd2e0df06eb68115d1d0034be15
üst 2a34dd72
...@@ -2076,7 +2076,7 @@ void DrawGraphic( const SvxBrushItem *pBrush, ...@@ -2076,7 +2076,7 @@ void DrawGraphic( const SvxBrushItem *pBrush,
/// draw poly-polygon transparent /// draw poly-polygon transparent
pOutDev->DrawTransparent( aDrawPoly, nTransparencyPercent ); pOutDev->DrawTransparent( aDrawPoly, nTransparencyPercent );
} }
else else if (!pBrush || pBrush->GetFillStyle() != drawing::FillStyle_GRADIENT)
{ {
SwRegionRects aRegion( rOut, 4 ); SwRegionRects aRegion( rOut, 4 );
if ( !bGrfIsTransparent ) if ( !bGrfIsTransparent )
...@@ -2089,6 +2089,8 @@ void DrawGraphic( const SvxBrushItem *pBrush, ...@@ -2089,6 +2089,8 @@ void DrawGraphic( const SvxBrushItem *pBrush,
pOutDev->DrawRect( aRegion[i].SVRect() ); pOutDev->DrawRect( aRegion[i].SVRect() );
} }
} }
else
pOutDev->DrawGradient(rOut.SVRect(), pBrush->GetGradient());
pOutDev ->Pop(); pOutDev ->Pop();
} }
...@@ -7065,7 +7067,7 @@ sal_Bool SwFrm::GetBackgroundBrush( const SvxBrushItem* & rpBrush, ...@@ -7065,7 +7067,7 @@ sal_Bool SwFrm::GetBackgroundBrush( const SvxBrushItem* & rpBrush,
if ( !rBack.GetColor().GetTransparency() || if ( !rBack.GetColor().GetTransparency() ||
rBack.GetGraphicPos() != GPOS_NONE || rBack.GetGraphicPos() != GPOS_NONE ||
rpCol || rpCol ||
(bConsiderBackgroundTransparency && (rBack.GetColor() != COL_TRANSPARENT)) (bConsiderBackgroundTransparency && (rBack.GetColor() != COL_TRANSPARENT || rBack.GetFillStyle() == drawing::FillStyle_GRADIENT))
) )
{ {
rpBrush = &rBack; rpBrush = &rBack;
......
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