Tag: cws_src680_rpt23fix02
User: oj      
Date: 2007-07-23 11:59:24+0000
Modified:
   dba/reportdesign/source/ui/report/ReportSection.cxx

Log:
 #i79128# paint problem with sdrview solved

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.2&r2=1.2.4.1
Delta lines:  +27 -2
--------------------
--- ReportSection.cxx   2007-07-09 11:56:32+0000        1.2
+++ ReportSection.cxx   2007-07-23 11:59:20+0000        1.2.4.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: ReportSection.cxx,v $
  *
- *  $Revision: 1.2 $
+ *  $Revision: 1.2.4.1 $
  *
- *  last change: $Author: rt $ $Date: 2007/07/09 11:56:32 $
+ *  last change: $Author: oj $ $Date: 2007/07/23 11:59:20 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -71,6 +71,7 @@
 #ifndef _SVX_ADJITEM_HXX
 #include <svx/adjitem.hxx>
 #endif
+#include <svx/sdrpaintwindow.hxx>
 #ifndef _COM_SUN_STAR_DATATRANSFER_CLIPBOARD_XCLIPBOARD_HPP_
 #include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
 #endif
@@ -189,6 +190,30 @@
                uno::Reference<report::XReportDefinition> xReportDefinition = 
m_xSection->getReportDefinition();
                m_pPage->SetSize( Size( 
getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width,2*m_xSection->getHeight())
 );
                const Size aPageSize = m_pPage->GetSize();
+         // repaint, get PageView and prepare Region
+        SdrPageView* pPgView = m_pView->GetSdrPageView();
+        const Region aPaintRectRegion(rRect);
+
+        // #i74769#
+        SdrPaintWindow* pTargetPaintWindow = 0;
+
+        // mark repaint start
+        if(pPgView)
+        {
+            pTargetPaintWindow = pPgView->GetView().BeginDrawLayers(this, 
aPaintRectRegion);
+            OSL_ENSURE(pTargetPaintWindow, "BeginDrawLayers: Got no 
SdrPaintWindow (!)");
+            // draw background self using wallpaper
+            OutputDevice& rTargetOutDev = 
pTargetPaintWindow->GetTargetOutputDevice();
+            rTargetOutDev.DrawWallpaper(rRect, 
Wallpaper(Color(m_xSection->getBackColor())));
+        }
+
+        // do paint (unbuffered) and mark repaint end
+        if(pPgView)
+        {
+            pPgView->DrawLayer(0, this);
+            pPgView->GetView().EndDrawLayers(*pTargetPaintWindow);
+        }
+
                
                const sal_Int32 nLeftMargin = 
getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN);
                const sal_Int32 nRightMargin = 
getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN);




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

Reply via email to