summaryrefslogtreecommitdiffstats
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-01-29 13:02:45 +0100
committerMiklos Vajna <vmiklos@suse.cz>2013-01-29 15:21:00 +0100
commit80f5a837f2d42cc2bc972dcfe88e5f39aa514d9c (patch)
tree3541fd52c8b4f85740cbd0766e4af3677919448b /sw
parentsw: import draw:fill-gradient-name for Writer textframes (diff)
downloadcore-80f5a837f2d42cc2bc972dcfe88e5f39aa514d9c.tar.gz
core-80f5a837f2d42cc2bc972dcfe88e5f39aa514d9c.zip
SwFrm::PaintBackground: paint gradients in one go
Painting only the necessary regions works fine normal background color, but not for gradients, as the result is obviously different in case of gradients. Change-Id: I624410ed08604c13a810f784d6226d592295c5d3
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/paintfrm.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index e0d024699a68..d6e1106fd945 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -6181,12 +6181,13 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
if ( pPage->GetSortedObjs() )
::lcl_SubtractFlys( this, pPage, aRect, aRegion );
+ /// OD 06.08.2002 #99657# - determine, if background transparency
+ /// have to be considered for drawing.
+ /// --> Status Quo: background transparency have to be
+ /// considered for fly frames
+ const sal_Bool bConsiderBackgroundTransparency = IsFlyFrm();
+ if (!pFillStyleItem || pFillStyleItem->GetValue() != XFILL_GRADIENT || !pFillGradientItem)
{
- /// OD 06.08.2002 #99657# - determine, if background transparency
- /// have to be considered for drawing.
- /// --> Status Quo: background transparency have to be
- /// considered for fly frames
- const sal_Bool bConsiderBackgroundTransparency = IsFlyFrm();
for ( sal_uInt16 i = 0; i < aRegion.size(); ++i )
{
if ( 1 < aRegion.size() )
@@ -6204,6 +6205,11 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
bConsiderBackgroundTransparency );
}
}
+ else
+ {
+ ::DrawGraphic( pItem, pFillStyleItem, pFillGradientItem, pOut, aOrigBackRect, aRect, GRFNUM_NO,
+ bConsiderBackgroundTransparency );
+ }
if( pCol )
delete pNewItem;
}