diff options
author | Armin Le Grand <alg@apache.org> | 2013-10-11 13:08:48 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-11 15:25:06 +0100 |
commit | 331216e2361eb682c7bc21c92345110d380503ed (patch) | |
tree | 499e255df0ba323bec89b390fd4075fd1991cc33 /sw | |
parent | 9b03a3688ff9c55293eccbb77dd24845c7fed6bf (diff) |
Resolves: #i29105# when a page background graphic is set in sw...
use GlobalRetoucheColor as fallback for draw object text edit
(cherry picked from commit 85388f93f40c4cb36d2bb9103d5264f476c2afe6)
Conflicts:
sw/source/core/layout/paintfrm.cxx
Change-Id: Ic7db0f2cf25727baa47e0cfeca4655549a820a85
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index d9d38d768a51..ccd82264189f 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -7134,10 +7134,27 @@ const Color& SwPageFrm::GetDrawBackgrdColor() const const XFillGradientItem* pFillGradientItem; const Color* pDummyColor; SwRect aDummyRect; + if ( GetBackgroundBrush( pBrushItem, pFillStyleItem, pFillGradientItem, pDummyColor, aDummyRect, true) ) - return pBrushItem->GetColor(); - else - return aGlobalRetoucheColor; + { + const Graphic* pGraphic = pBrushItem->GetGraphic(); + + if(pGraphic) + { + // #i29105# when a graphic is set, it may be possible to calculate a single + // color which looks good in all places of the graphic. Since it is + // planned to have text edit on the overlay one day and the fallback + // to aGlobalRetoucheColor returns something useful, just use that + // for now. + } + else + { + // not a graphic, use (hopefully) initialized color + return pBrushItem->GetColor(); + } + } + + return aGlobalRetoucheColor; } /************************************************************************* |