Tag: cws_dev300_dba31b
User: oj      
Date: 2008-08-13 08:59:47+0000
Modified:
   dba/reportdesign/source/ui/report/ReportSection.cxx

Log:
 #i92318# use backcolor from report def when backcolor of section is trans

File Changes:

Directory: /dba/reportdesign/source/ui/report/
==============================================

File [changed]: ReportSection.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ReportSection.cxx?r1=1.11&r2=1.11.18.1
Delta lines:  +15 -6
--------------------
--- ReportSection.cxx   2008-06-25 11:37:18+0000        1.11
+++ ReportSection.cxx   2008-08-13 08:59:44+0000        1.11.18.1
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: ReportSection.cxx,v $
- * $Revision: 1.11 $
+ * $Revision: 1.11.18.1 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -158,7 +158,10 @@
             OSL_ENSURE(pTargetPaintWindow, "BeginDrawLayers: Got no 
SdrPaintWindow (!)");
             // draw background self using wallpaper
             OutputDevice& rTargetOutDev = 
pTargetPaintWindow->GetTargetOutputDevice();
-            rTargetOutDev.DrawWallpaper(rRect, 
Wallpaper(Color(m_xSection->getBackColor())));
+            sal_Int32 nColor = m_xSection->getBackColor();
+            if ( nColor == COL_TRANSPARENT )
+                nColor = 
getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_BACKCOLOR);
+            rTargetOutDev.DrawWallpaper(rRect, Wallpaper(Color(nColor)));
         }
 
         // do paint (unbuffered) and mark repaint end
@@ -220,7 +223,10 @@
        m_pView->SetGridFront( FALSE );
        m_pView->SetDragStripes( TRUE );
        m_pView->SetPageVisible();
-       m_pView->SetApplicationDocumentColor(m_xSection->getBackColor());
+    sal_Int32 nColor = m_xSection->getBackColor();
+    if ( nColor == COL_TRANSPARENT )
+        nColor = 
getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_BACKCOLOR);
+       m_pView->SetApplicationDocumentColor(nColor);
 
     const sal_Int32 nLeftMargin = 
getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_LEFTMARGIN);
        const sal_Int32 nRightMargin = 
getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_RIGHTMARGIN);
@@ -488,9 +494,12 @@
 {
        if ( m_xSection.is() )
        {
-               if ( _rEvent.Source == m_xSection )
+               if ( _rEvent.Source == m_xSection || PROPERTY_BACKCOLOR == 
_rEvent.PropertyName )
                {
-                       
m_pView->SetApplicationDocumentColor(m_xSection->getBackColor());
+            sal_Int32 nColor = m_xSection->getBackColor();
+            if ( nColor == COL_TRANSPARENT )
+                nColor = 
getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_BACKCOLOR);
+                       m_pView->SetApplicationDocumentColor(nColor);
                        Invalidate(INVALIDATE_NOCHILDREN|INVALIDATE_NOERASE);
                }
                else




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to