[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/source
Armin Le Grand
alg at apache.org
Fri Oct 11 07:08:11 PDT 2013
sw/source/core/layout/paintfrm.cxx | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
New commits:
commit 85388f93f40c4cb36d2bb9103d5264f476c2afe6
Author: Armin Le Grand <alg at apache.org>
Date: Fri Oct 11 13:08:48 2013 +0000
i29105 when a page background garphic is set in sw, use GlobalRetoucheColor as fallback for draw object text edit
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 83df988..3ff19d7 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -6383,10 +6383,27 @@ const Color& SwPageFrm::GetDrawBackgrdColor() const
const SvxBrushItem* pBrushItem;
const Color* pDummyColor;
SwRect aDummyRect;
+
if ( GetBackgroundBrush( pBrushItem, pDummyColor, aDummyRect, true) )
- return pBrushItem->GetColor();
- else
- return aGlobalRetoucheColor;
+ {
+ const Graphic* pGraphic = pBrushItem->GetGraphic();
+
+ if(pGraphic)
+ {
+ // #29105# 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;
}
/*************************************************************************
More information about the Libreoffice-commits
mailing list