openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1531285 - /openoffice/trunk/main/sw/source/core/layout/paintfrm.cxx
Date Fri, 11 Oct 2013 13:08:48 GMT
Author: alg
Date: Fri Oct 11 13:08:48 2013
New Revision: 1531285

URL: http://svn.apache.org/r1531285
Log:
i29105 when a page background garphic is set in sw, use GlobalRetoucheColor as fallback for
draw object text edit

Modified:
    openoffice/trunk/main/sw/source/core/layout/paintfrm.cxx

Modified: openoffice/trunk/main/sw/source/core/layout/paintfrm.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/layout/paintfrm.cxx?rev=1531285&r1=1531284&r2=1531285&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/layout/paintfrm.cxx (original)
+++ openoffice/trunk/main/sw/source/core/layout/paintfrm.cxx Fri Oct 11 13:08:48 2013
@@ -6383,10 +6383,27 @@ const Color& SwPageFrm::GetDrawBackgrdCo
     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;
 }
 
 /*************************************************************************



Mime
View raw message