incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1333411 - in /incubator/ooo/trunk/main: editeng/inc/editeng/ editeng/source/editeng/ editeng/source/outliner/ svx/inc/svx/ svx/inc/svx/sdr/overlay/ svx/source/sdr/overlay/ svx/source/svdraw/
Date Thu, 03 May 2012 11:59:33 GMT
Author: alg
Date: Thu May  3 11:59:32 2012
New Revision: 1333411

URL: http://svn.apache.org/viewvc?rev=1333411&view=rev
Log:
#118905# changed EditEngine to be able to paint to overlay (VirtualDevice) directly, not only
to Window. Removed the no longer needed switch between buffered and unbuffered overlay, this
removes the flickering white block.

Modified:
    incubator/ooo/trunk/main/editeng/inc/editeng/editview.hxx
    incubator/ooo/trunk/main/editeng/inc/editeng/outliner.hxx
    incubator/ooo/trunk/main/editeng/source/editeng/editview.cxx
    incubator/ooo/trunk/main/editeng/source/editeng/impedit.cxx
    incubator/ooo/trunk/main/editeng/source/editeng/impedit.hxx
    incubator/ooo/trunk/main/editeng/source/editeng/impedit3.cxx
    incubator/ooo/trunk/main/editeng/source/editeng/impedit4.cxx
    incubator/ooo/trunk/main/editeng/source/outliner/outlvw.cxx
    incubator/ooo/trunk/main/svx/inc/svx/sdr/overlay/overlaymanager.hxx
    incubator/ooo/trunk/main/svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx
    incubator/ooo/trunk/main/svx/inc/svx/sdrpaintwindow.hxx
    incubator/ooo/trunk/main/svx/inc/svx/svdedxv.hxx
    incubator/ooo/trunk/main/svx/inc/svx/svdpagv.hxx
    incubator/ooo/trunk/main/svx/inc/svx/svdpntv.hxx
    incubator/ooo/trunk/main/svx/source/sdr/overlay/overlaymanager.cxx
    incubator/ooo/trunk/main/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
    incubator/ooo/trunk/main/svx/source/svdraw/sdrpaintwindow.cxx
    incubator/ooo/trunk/main/svx/source/svdraw/svdedxv.cxx
    incubator/ooo/trunk/main/svx/source/svdraw/svdpagv.cxx
    incubator/ooo/trunk/main/svx/source/svdraw/svdpntv.cxx

Modified: incubator/ooo/trunk/main/editeng/inc/editeng/editview.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/editeng/inc/editeng/editview.hxx?rev=1333411&r1=1333410&r2=1333411&view=diff
==============================================================================
--- incubator/ooo/trunk/main/editeng/inc/editeng/editview.hxx (original)
+++ incubator/ooo/trunk/main/editeng/inc/editeng/editview.hxx Thu May  3 11:59:32 2012
@@ -53,6 +53,7 @@ class SvKeyValueIterator;
 class SfxStyleSheet;
 class Font;
 class FontList;
+class OutputDevice;
 
 #ifndef _EDITDATA_HXX
 #include <editeng/editdata.hxx>
@@ -93,7 +94,7 @@ public:
 	void			SetWindow( Window* pWin );
 	Window*			GetWindow() const;
 
-	void			Paint( const Rectangle& rRect );
+	void			Paint( const Rectangle& rRect, OutputDevice* pTargetDevice = 0 );
 	void			Invalidate();
 	Pair			Scroll( long nHorzScroll, long nVertScroll, sal_uInt8 nRangeCheck = RGCHK_NEG );
 

Modified: incubator/ooo/trunk/main/editeng/inc/editeng/outliner.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/editeng/inc/editeng/outliner.hxx?rev=1333411&r1=1333410&r2=1333411&view=diff
==============================================================================
--- incubator/ooo/trunk/main/editeng/inc/editeng/outliner.hxx (original)
+++ incubator/ooo/trunk/main/editeng/inc/editeng/outliner.hxx Thu May  3 11:59:32 2012
@@ -259,7 +259,7 @@ public:
 
 	void        Scroll( long nHorzScroll, long nVertScroll );
 
-	void        Paint( const Rectangle& rRect );
+	void        Paint( const Rectangle& rRect, OutputDevice* pTargetDevice = 0 );
 	sal_Bool        PostKeyEvent( const KeyEvent& rKEvt );
 	sal_Bool        MouseButtonDown( const MouseEvent& );
 	sal_Bool        MouseButtonUp( const MouseEvent& );

Modified: incubator/ooo/trunk/main/editeng/source/editeng/editview.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/editeng/source/editeng/editview.cxx?rev=1333411&r1=1333410&r2=1333411&view=diff
==============================================================================
--- incubator/ooo/trunk/main/editeng/source/editeng/editview.cxx (original)
+++ incubator/ooo/trunk/main/editeng/source/editeng/editview.cxx Thu May  3 11:59:32 2012
@@ -296,11 +296,11 @@ sal_uInt16 EditView::GetSelectedScriptTy
 	return PIMPEE->GetScriptType( pImpEditView->GetEditSelection() );
 }
 
-void EditView::Paint( const Rectangle& rRect )
+void EditView::Paint( const Rectangle& rRect, OutputDevice* pTargetDevice )
 {
 	DBG_CHKTHIS( EditView, 0 );
 	DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
-	PIMPEE->Paint( pImpEditView, rRect );
+	PIMPEE->Paint( pImpEditView, rRect, pTargetDevice );
 }
 
 void EditView::SetEditEngine( EditEngine* pEditEng )

Modified: incubator/ooo/trunk/main/editeng/source/editeng/impedit.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/editeng/source/editeng/impedit.cxx?rev=1333411&r1=1333410&r2=1333411&view=diff
==============================================================================
--- incubator/ooo/trunk/main/editeng/source/editeng/impedit.cxx (original)
+++ incubator/ooo/trunk/main/editeng/source/editeng/impedit.cxx Thu May  3 11:59:32 2012
@@ -131,7 +131,7 @@ void ImpEditView::SetEditSelection( cons
 }
 
 
-void ImpEditView::DrawSelection( EditSelection aTmpSel, Region* pRegion )
+void ImpEditView::DrawSelection( EditSelection aTmpSel, Region* pRegion, OutputDevice* pTargetDevice
)
 {
     if ( GetSelectionMode() == EE_SELMODE_HIDDEN )
         return;
@@ -148,8 +148,9 @@ void ImpEditView::DrawSelection( EditSel
 	if ( pRegion )
 		pPolyPoly = new PolyPolygon;
 
-	sal_Bool bClipRegion = pOutWin->IsClipRegion();
-	Region aOldRegion = pOutWin->GetClipRegion();
+	OutputDevice* pTarget = pTargetDevice ? pTargetDevice : pOutWin;
+	sal_Bool bClipRegion = pTarget->IsClipRegion();
+	Region aOldRegion = pTarget->GetClipRegion();
 
 	if ( !pRegion )
 	{
@@ -166,7 +167,7 @@ void ImpEditView::DrawSelection( EditSel
 	    Rectangle aTmpOutArea( aOutArea );
 	    if ( aTmpOutArea.GetWidth() > pEditEngine->pImpEditEngine->GetPaperSize().Width()
)
 		    aTmpOutArea.Right() = aTmpOutArea.Left() + pEditEngine->pImpEditEngine->GetPaperSize().Width();
-		pOutWin->IntersectClipRegion( aTmpOutArea );
+		pTarget->IntersectClipRegion( aTmpOutArea );
 
 		if ( pOutWin->GetCursor() )
 			pOutWin->GetCursor()->Hide();
@@ -246,7 +247,7 @@ void ImpEditView::DrawSelection( EditSel
                 Range aLineXPosStartEnd = pEditEngine->pImpEditEngine->GetLineXPosStartEnd(
pTmpPortion, pLine );
                 aTopLeft.X() = aLineXPosStartEnd.Min();
                 aBottomRight.X() = aLineXPosStartEnd.Max();
-                ImplDrawHighlightRect( pOutWin, aTopLeft, aBottomRight, pPolyPoly );
+                ImplDrawHighlightRect( pTarget, aTopLeft, aBottomRight, pPolyPoly );
             }
             else
             {
@@ -267,7 +268,7 @@ void ImpEditView::DrawSelection( EditSel
                     Point aPt1( Min( nX1, nX2 ), aTopLeft.Y() );
                     Point aPt2( Max( nX1, nX2 ), aBottomRight.Y() );
 
-                    ImplDrawHighlightRect( pOutWin, aPt1, aPt2, pPolyPoly );
+                    ImplDrawHighlightRect( pTarget, aPt1, aPt2, pPolyPoly );
 
                     nTmpStartIndex = nTmpEndIndex;
                 }
@@ -287,30 +288,30 @@ void ImpEditView::DrawSelection( EditSel
 			pOutWin->GetCursor()->Show();
 
 		if ( bClipRegion )
-			pOutWin->SetClipRegion( aOldRegion );
+			pTarget->SetClipRegion( aOldRegion );
 		else
-			pOutWin->SetClipRegion();
+			pTarget->SetClipRegion();
 	}
 }
 
-void ImpEditView::ImplDrawHighlightRect( Window* _pOutWin, const Point& rDocPosTopLeft,
const Point& rDocPosBottomRight, PolyPolygon* pPolyPoly )
+void ImpEditView::ImplDrawHighlightRect( OutputDevice* _pTarget, const Point& rDocPosTopLeft,
const Point& rDocPosBottomRight, PolyPolygon* pPolyPoly )
 {
 	if ( rDocPosTopLeft.X() != rDocPosBottomRight.X() )
 	{
-	    sal_Bool bPixelMode = _pOutWin->GetMapMode() == MAP_PIXEL;
+	    sal_Bool bPixelMode = _pTarget->GetMapMode() == MAP_PIXEL;
 
         Point aPnt1( GetWindowPos( rDocPosTopLeft ) );
 		Point aPnt2( GetWindowPos( rDocPosBottomRight ) );
 
 		if ( !IsVertical() )
 		{
-			lcl_AllignToPixel( aPnt1, _pOutWin, +1, 0 );
-			lcl_AllignToPixel( aPnt2, _pOutWin, 0, ( bPixelMode ? 0 : -1 ) );
+			lcl_AllignToPixel( aPnt1, _pTarget, +1, 0 );
+			lcl_AllignToPixel( aPnt2, _pTarget, 0, ( bPixelMode ? 0 : -1 ) );
 		}
 		else
 		{
-			lcl_AllignToPixel( aPnt1, _pOutWin, 0, +1 );
-			lcl_AllignToPixel( aPnt2, _pOutWin, ( bPixelMode ? 0 : +1 ), 0 );
+			lcl_AllignToPixel( aPnt1, _pTarget, 0, +1 );
+			lcl_AllignToPixel( aPnt2, _pTarget, ( bPixelMode ? 0 : +1 ), 0 );
 		}
 
 		Rectangle aRect( aPnt1, aPnt2 );
@@ -325,7 +326,21 @@ void ImpEditView::ImplDrawHighlightRect(
 		}
 		else
 		{
-			_pOutWin->Invert( aRect );
+			Window* pWindow = dynamic_cast< Window* >(_pTarget);
+
+			if(pWindow)
+			{
+				pWindow->Invert( aRect );
+			}
+			else
+			{
+				_pTarget->Push(PUSH_LINECOLOR|PUSH_FILLCOLOR|PUSH_RASTEROP);
+				_pTarget->SetLineColor();
+				_pTarget->SetFillColor(COL_BLACK);
+				_pTarget->SetRasterOp(ROP_INVERT);
+				_pTarget->DrawRect(aRect);
+				_pTarget->Pop();
+			}
 		}
 	}
 }

Modified: incubator/ooo/trunk/main/editeng/source/editeng/impedit.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/editeng/source/editeng/impedit.hxx?rev=1333411&r1=1333410&r2=1333411&view=diff
==============================================================================
--- incubator/ooo/trunk/main/editeng/source/editeng/impedit.hxx (original)
+++ incubator/ooo/trunk/main/editeng/source/editeng/impedit.hxx Thu May  3 11:59:32 2012
@@ -261,7 +261,7 @@ protected:
 	void ShowDDCursor( const Rectangle& rRect );
 	void HideDDCursor();
 
-    void ImplDrawHighlightRect( Window* pOutWin, const Point& rDocPosTopLeft, const Point&
rDocPosBottomRight, PolyPolygon* pPolyPoly );
+    void ImplDrawHighlightRect( OutputDevice* _pTarget, const Point& rDocPosTopLeft,
const Point& rDocPosBottomRight, PolyPolygon* pPolyPoly );
 
 public:
 					ImpEditView( EditView* pView, EditEngine* pEng, Window* pWindow );
@@ -309,7 +309,7 @@ public:
 	sal_Bool		HasSelection() const { return aEditSelection.HasRange(); }
 
 	void			DrawSelection() { DrawSelection( aEditSelection ); }
-	void			DrawSelection( EditSelection, Region* pRegion = NULL );
+	void			DrawSelection( EditSelection, Region* pRegion = NULL, OutputDevice* pTargetDevice
= NULL );
 	Region*			CalcSelectedRegion();
 
 	Window*			GetWindow()	const 			{ return pOutWin; }
@@ -747,7 +747,7 @@ public:
 	void					FormatDoc();
 	void					FormatFullDoc();
 	void					UpdateViews( EditView* pCurView = 0 );
-	void					Paint( ImpEditView* pView, const Rectangle& rRect, sal_Bool bUseVirtDev = sal_False
);
+	void					Paint( ImpEditView* pView, const Rectangle& rRect, OutputDevice* pTargetDevice
= 0, sal_Bool bUseVirtDev = sal_False );
 	void					Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aStartPos, sal_Bool bStripOnly
= sal_False, short nOrientation = 0 );
 
 	sal_Bool				MouseButtonUp( const MouseEvent& rMouseEvent, EditView* pView );

Modified: incubator/ooo/trunk/main/editeng/source/editeng/impedit3.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/editeng/source/editeng/impedit3.cxx?rev=1333411&r1=1333410&r2=1333411&view=diff
==============================================================================
--- incubator/ooo/trunk/main/editeng/source/editeng/impedit3.cxx (original)
+++ incubator/ooo/trunk/main/editeng/source/editeng/impedit3.cxx Thu May  3 11:59:32 2012
@@ -305,7 +305,7 @@ void ImpEditEngine::UpdateViews( EditVie
 			aClipRec = pView->pImpEditView->GetWindowPos( aClipRec );
 
 			if ( ( pView == pCurView )  )
-				Paint( pView->pImpEditView, aClipRec, sal_True );
+				Paint( pView->pImpEditView, aClipRec, 0, sal_True );
 			else
 				pView->GetWindow()->Invalidate( aClipRec );
 		}
@@ -3602,7 +3602,7 @@ void ImpEditEngine::Paint( OutputDevice*
 		pOutDev->SetFont( aOldFont );
 }
 
-void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRec, sal_Bool bUseVirtDev
)
+void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRec, OutputDevice* pTargetDevice,
sal_Bool bUseVirtDev )
 {
 	DBG_ASSERT( pView, "Keine View - Kein Paint!" );
 	DBG_CHKOBJ( GetEditEnginePtr(), EditEngine, 0 );
@@ -3614,11 +3614,11 @@ void ImpEditEngine::Paint( ImpEditView* 
 	Rectangle aClipRec( pView->GetOutputArea() );
 	aClipRec.Intersection( rRec );
 
-	Window* pOutWin = pView->GetWindow();
+	OutputDevice* pTarget = pTargetDevice ? pTargetDevice : pView->GetWindow();
 
 	if ( bUseVirtDev )
 	{
-		Rectangle aClipRecPixel( pOutWin->LogicToPixel( aClipRec ) );
+		Rectangle aClipRecPixel( pTarget->LogicToPixel( aClipRec ) );
 		if ( !IsVertical() )
 		{
 			// etwas mehr, falls abgerundet!
@@ -3633,7 +3633,7 @@ void ImpEditEngine::Paint( ImpEditView* 
 
 		// Wenn aClipRecPixel > XXXX, dann invalidieren ?!
 
-		VirtualDevice* pVDev = GetVirtualDevice( pOutWin->GetMapMode(), pOutWin->GetDrawMode()
);
+		VirtualDevice* pVDev = GetVirtualDevice( pTarget->GetMapMode(), pTarget->GetDrawMode()
);
 		pVDev->SetDigitLanguage( GetRefDevice()->GetDigitLanguage() );
 
 		{
@@ -3696,7 +3696,7 @@ void ImpEditEngine::Paint( ImpEditView* 
 		// da sonst die Zeile darunter auch ausgegeben werden muss:
 		Rectangle aTmpRec( Point( 0, 0 ), aClipRec.GetSize() );
 
-		aClipRec = pOutWin->PixelToLogic( aClipRecPixel );
+		aClipRec = pTarget->PixelToLogic( aClipRecPixel );
 		Point aStartPos;
 		if ( !IsVertical() )
 		{
@@ -3721,38 +3721,38 @@ void ImpEditEngine::Paint( ImpEditView* 
 		if ( GetTextRanger() )
 		{
 			// Some problems here with push/pop, why?!
-//			pOutWin->Push( PUSH_CLIPREGION|PUSH_MAPMODE );
-			bClipRegion = pOutWin->IsClipRegion();
-			aOldRegion = pOutWin->GetClipRegion();
+//			pTarget->Push( PUSH_CLIPREGION|PUSH_MAPMODE );
+			bClipRegion = pTarget->IsClipRegion();
+			aOldRegion = pTarget->GetClipRegion();
 			// Wie bekomme ich das Polygon an die richtige Stelle????
 			// Das Polygon bezieht sich auf die View, nicht auf das Window
 			// => Origin umsetzen...
-			aOldMapMode = pOutWin->GetMapMode();
+			aOldMapMode = pTarget->GetMapMode();
 			Point aOrigin = aOldMapMode.GetOrigin();
 			Point aViewPos = pView->GetOutputArea().TopLeft();
 			aOrigin.Move( aViewPos.X(), aViewPos.Y() );
 			aClipRec.Move( -aViewPos.X(), -aViewPos.Y() );
 			MapMode aNewMapMode( aOldMapMode );
 			aNewMapMode.SetOrigin( aOrigin );
-			pOutWin->SetMapMode( aNewMapMode );
-			pOutWin->SetClipRegion( Region( GetTextRanger()->GetPolyPolygon() ) );
+			pTarget->SetMapMode( aNewMapMode );
+			pTarget->SetClipRegion( Region( GetTextRanger()->GetPolyPolygon() ) );
 		}
 
-		pOutWin->DrawOutDev( aClipRec.TopLeft(), aClipRec.GetSize(),
+		pTarget->DrawOutDev( aClipRec.TopLeft(), aClipRec.GetSize(),
 							Point(0,0), aClipRec.GetSize(), *pVDev );
 
 		if ( GetTextRanger() )
 		{
-//			pOutWin->Pop();
+//			pTarget->Pop();
 			if ( bClipRegion )
-				pOutWin->SetClipRegion( aOldRegion );
+				pTarget->SetClipRegion( aOldRegion );
 			else
-				pOutWin->SetClipRegion();
-			pOutWin->SetMapMode( aOldMapMode );
+				pTarget->SetClipRegion();
+			pTarget->SetMapMode( aOldMapMode );
 		}
 
 
-		pView->DrawSelection();
+		pView->DrawSelection(pView->GetEditSelection(), 0, pTarget);
 	}
 	else
 	{
@@ -3782,18 +3782,18 @@ void ImpEditEngine::Paint( ImpEditView* 
 				aClipRec.Right() = nMaxX;
 		}
 
-		sal_Bool bClipRegion = pOutWin->IsClipRegion();
-		Region aOldRegion = pOutWin->GetClipRegion();
-		pOutWin->IntersectClipRegion( aClipRec );
+		sal_Bool bClipRegion = pTarget->IsClipRegion();
+		Region aOldRegion = pTarget->GetClipRegion();
+		pTarget->IntersectClipRegion( aClipRec );
 
-		Paint( pOutWin, aClipRec, aStartPos );
+		Paint( pTarget, aClipRec, aStartPos );
 
 		if ( bClipRegion )
-			pOutWin->SetClipRegion( aOldRegion );
+			pTarget->SetClipRegion( aOldRegion );
 		else
-			pOutWin->SetClipRegion();
+			pTarget->SetClipRegion();
 
-		pView->DrawSelection();
+		pView->DrawSelection(pView->GetEditSelection(), 0, pTarget);
 	}
 
 }

Modified: incubator/ooo/trunk/main/editeng/source/editeng/impedit4.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/editeng/source/editeng/impedit4.cxx?rev=1333411&r1=1333410&r2=1333411&view=diff
==============================================================================
--- incubator/ooo/trunk/main/editeng/source/editeng/impedit4.cxx (original)
+++ incubator/ooo/trunk/main/editeng/source/editeng/impedit4.cxx Thu May  3 11:59:32 2012
@@ -2521,7 +2521,7 @@ void ImpEditEngine::DoOnlineSpelling( Co
 								// in Fensterkoordinaten umwandeln....
 								aClipRec.SetPos( pView->pImpEditView->GetWindowPos( aClipRec.TopLeft() ) );
 								// Wenn Selektion, dann VDev...
-								Paint( pView->pImpEditView, aClipRec, pView->HasSelection() );
+								Paint( pView->pImpEditView, aClipRec, 0, pView->HasSelection() );
 							}
 						}
 					}

Modified: incubator/ooo/trunk/main/editeng/source/outliner/outlvw.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/editeng/source/outliner/outlvw.cxx?rev=1333411&r1=1333410&r2=1333411&view=diff
==============================================================================
--- incubator/ooo/trunk/main/editeng/source/outliner/outlvw.cxx (original)
+++ incubator/ooo/trunk/main/editeng/source/outliner/outlvw.cxx Thu May  3 11:59:32 2012
@@ -87,7 +87,7 @@ OutlinerView::~OutlinerView()
 	delete pEditView;
 }
 
-void OutlinerView::Paint( const Rectangle& rRect )
+void OutlinerView::Paint( const Rectangle& rRect, OutputDevice* pTargetDevice )
 {
 	DBG_CHKTHIS(OutlinerView,0);
 
@@ -96,7 +96,7 @@ void OutlinerView::Paint( const Rectangl
 	if( pOwner->bFirstParaIsEmpty )
 		pOwner->Insert( String() );
 
-	pEditView->Paint( rRect );
+	pEditView->Paint( rRect, pTargetDevice );
 }
 
 sal_Bool OutlinerView::PostKeyEvent( const KeyEvent& rKEvt )

Modified: incubator/ooo/trunk/main/svx/inc/svx/sdr/overlay/overlaymanager.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/inc/svx/sdr/overlay/overlaymanager.hxx?rev=1333411&r1=1333410&r2=1333411&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/inc/svx/sdr/overlay/overlaymanager.hxx (original)
+++ incubator/ooo/trunk/main/svx/inc/svx/sdr/overlay/overlaymanager.hxx Thu May  3 11:59:32
2012
@@ -88,12 +88,7 @@ namespace sdr
             double getDiscreteOne() const;
 
 		public:
-			// when handing over another OverlayManager at construction, the OverlayObjects
-			// will be taken over from it. The new one will have added all OverlayObjects
-			// while the handed over one will have none
-			OverlayManager(
-				OutputDevice& rOutputDevice,
-				OverlayManager* pOldOverlayManager = 0);
+			OverlayManager(OutputDevice& rOutputDevice);
 			virtual ~OverlayManager();
 
 			// access to current ViewInformation2D; this call checks and evtl. updates ViewInformation2D

Modified: incubator/ooo/trunk/main/svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx?rev=1333411&r1=1333410&r2=1333411&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx (original)
+++ incubator/ooo/trunk/main/svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx Thu May  3
11:59:32 2012
@@ -71,12 +71,8 @@ namespace sdr
 			void ImpSaveBackground(const Region& rRegion, OutputDevice* pPreRenderDevice = 0L);
 
 		public:
-			// when handing over another OverlayManager at construction, the OverlayObjects
-			// will be taken over from it. The new one will have added all OverlayObjects
-			// while the handed over one will have none
 			OverlayManagerBuffered(
-				OutputDevice& rOutputDevice, 
-				OverlayManager* pOldOverlayManager = 0,
+                OutputDevice& rOutputDevice,
 				bool bRefreshWithPreRendering = false);
 			virtual ~OverlayManagerBuffered();
 

Modified: incubator/ooo/trunk/main/svx/inc/svx/sdrpaintwindow.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/inc/svx/sdrpaintwindow.hxx?rev=1333411&r1=1333410&r2=1333411&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/inc/svx/sdrpaintwindow.hxx (original)
+++ incubator/ooo/trunk/main/svx/inc/svx/sdrpaintwindow.hxx Thu May  3 11:59:32 2012
@@ -94,18 +94,7 @@ private:
     bool mbUseBuffer;
 
 	// helpers
-	/** Create mpOverlayManager member on demand.
-        @param bUseBuffer
-            Specifies whether to use the buffered (OverlayManagerBuffered)
-            or the unbuffered (OverlayManager) version of the overlay
-            manager.  When this values is different from that of the
-            previous call then the overlay manager is replaced by the
-            specified one.
-
-            The bUseBuffer flag will typically change its value when text
-            editing is started or stopped.
-    */
-    void impCreateOverlayManager(const bool bUseBuffer);
+    void impCreateOverlayManager();
 
 public:
 	SdrPaintWindow(SdrPaintView& rNewPaintView, OutputDevice& rOut);
@@ -118,7 +107,7 @@ public:
 	// OVERLAYMANAGER
 	::sdr::overlay::OverlayManager* GetOverlayManager() const;
 	// #i73602# add flag if buffer shall be used
-	void DrawOverlay(const Region& rRegion, bool bUseBuffer);
+	void DrawOverlay(const Region& rRegion);
 	void HideOverlay(const Region& rRegion);
 
 	// calculate visible area and return

Modified: incubator/ooo/trunk/main/svx/inc/svx/svdedxv.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/inc/svx/svdedxv.hxx?rev=1333411&r1=1333410&r2=1333411&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/inc/svx/svdedxv.hxx (original)
+++ incubator/ooo/trunk/main/svx/inc/svx/svdedxv.hxx Thu May  3 11:59:32 2012
@@ -122,7 +122,7 @@ protected:
 	// Eine neue OutlinerView auf dem Heap anlegen und alle erforderlichen Parameter setzen.
 	// pTextEditObj, pTextEditPV und pTextEditOutliner muessen initiallisiert sein.
 	OutlinerView* ImpMakeOutlinerView(Window* pWin, sal_Bool bNoPaint, OutlinerView* pGivenView)
const;
-	void ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectangle& rRect) const;
+	void ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectangle& rRect, OutputDevice&
rTargetDevice) const;
 	void ImpInvalidateOutlinerView(OutlinerView& rOutlView) const;
 
 	// Feststellen, ob der gesamte Text markiert ist. Liefert auch sal_True wenn
@@ -146,6 +146,11 @@ protected:
 	virtual ~SdrObjEditView();
 
 public:
+	////////////////////////////////////////////////////////////////////////////////////////////////////
+	// used to call the old ImpPaintOutlinerView. Will be replaced when the
+	// outliner will be displayed on the overlay in edit mode.
+	void TextEditDrawing(SdrPaintWindow& rPaintWindow) const;
+
 	// Actionhandling fuer Macromodus
 	virtual sal_Bool IsAction() const;
 	virtual void MovAction(const Point& rPnt);

Modified: incubator/ooo/trunk/main/svx/inc/svx/svdpagv.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/inc/svx/svdpagv.hxx?rev=1333411&r1=1333410&r2=1333411&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/inc/svx/svdpagv.hxx (original)
+++ incubator/ooo/trunk/main/svx/inc/svx/svdpagv.hxx Thu May  3 11:59:32 2012
@@ -119,7 +119,6 @@ public:
     */
     const SdrPageWindow* FindPatchedPageWindow( const OutputDevice& rOutDev ) const;
 
-	void PaintOutlinerView(OutputDevice* pOut, const Rectangle& rRect) const;
 private:
 	SVX_DLLPRIVATE SdrPageWindow& CreateNewPageWindowEntry(SdrPaintWindow& rPaintWindow);
 

Modified: incubator/ooo/trunk/main/svx/inc/svx/svdpntv.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/inc/svx/svdpntv.hxx?rev=1333411&r1=1333410&r2=1333411&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/inc/svx/svdpntv.hxx (original)
+++ incubator/ooo/trunk/main/svx/inc/svx/svdpntv.hxx Thu May  3 11:59:32 2012
@@ -399,11 +399,6 @@ public:
 
 protected:
 	////////////////////////////////////////////////////////////////////////////////////////////////////
-	// used to call the old PaintOutlinerView at the single PageViews. Will be replaced when
the
-	// outliner will be displayed on the overlay in edit mode.
-	void ImpTextEditDrawing(SdrPaintWindow& rPaintWindow) const;
-
-	////////////////////////////////////////////////////////////////////////////////////////////////////
 	// used to paint the form layer after the PreRender device is flushed (painted) to the window.
 	void ImpFormLayerDrawing(SdrPaintWindow& rPaintWindow) const;
 

Modified: incubator/ooo/trunk/main/svx/source/sdr/overlay/overlaymanager.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/sdr/overlay/overlaymanager.cxx?rev=1333411&r1=1333410&r2=1333411&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/sdr/overlay/overlaymanager.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/sdr/overlay/overlaymanager.cxx Thu May  3 11:59:32
2012
@@ -123,9 +123,7 @@ namespace sdr
             return mfDiscreteOne; 
         }
 
-		OverlayManager::OverlayManager(
-			OutputDevice& rOutputDevice,
-			OverlayManager* pOldOverlayManager)
+		OverlayManager::OverlayManager(OutputDevice& rOutputDevice)
 		:	Scheduler(),
 			rmOutputDevice(rOutputDevice),
 			maOverlayObjects(),
@@ -148,29 +146,6 @@ namespace sdr
 			    xProperties[0].Value <<= true;
                 maViewInformation2D = drawinglayer::geometry::ViewInformation2D(xProperties);
             }
-
-			if(pOldOverlayManager)
-			{
-				// take over OverlayObjects from given OverlayManager. Copy
-				// the vector of pointers
-				maOverlayObjects = pOldOverlayManager->maOverlayObjects;
-				const sal_uInt32 nSize(maOverlayObjects.size());
-
-				if(nSize)
-				{
-					for(OverlayObjectVector::iterator aIter(maOverlayObjects.begin()); aIter != maOverlayObjects.end();
aIter++)
-					{
-						OSL_ENSURE(*aIter, "Corrupted OverlayObject List (!)");
-						OverlayObject& rCandidate = **aIter;
-
-						// remove from old and add to new OverlayManager
-						pOldOverlayManager->impApplyRemoveActions(rCandidate);
-						impApplyAddActions(rCandidate);
-					}
-
-					pOldOverlayManager->maOverlayObjects.clear();
-				}
-			}
 		}
 
 		const drawinglayer::geometry::ViewInformation2D OverlayManager::getCurrentViewInformation2D()
const

Modified: incubator/ooo/trunk/main/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/sdr/overlay/overlaymanagerbuffered.cxx?rev=1333411&r1=1333410&r2=1333411&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/sdr/overlay/overlaymanagerbuffered.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/sdr/overlay/overlaymanagerbuffered.cxx Thu May  3
11:59:32 2012
@@ -421,9 +421,8 @@ namespace sdr
 
 		OverlayManagerBuffered::OverlayManagerBuffered(
 			OutputDevice& rOutputDevice, 
-			OverlayManager* pOldOverlayManager,
 			bool bRefreshWithPreRendering)
-		:	OverlayManager(rOutputDevice, pOldOverlayManager),
+		:	OverlayManager(rOutputDevice),
 			mbRefreshWithPreRendering(bRefreshWithPreRendering)
 		{
 			// Init timer

Modified: incubator/ooo/trunk/main/svx/source/svdraw/sdrpaintwindow.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/sdrpaintwindow.cxx?rev=1333411&r1=1333410&r2=1333411&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/sdrpaintwindow.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/sdrpaintwindow.cxx Thu May  3 11:59:32 2012
@@ -104,20 +104,8 @@ void SdrPreRenderDevice::OutputPreRender
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 
-void SdrPaintWindow::impCreateOverlayManager(const bool bUseBuffer)
+void SdrPaintWindow::impCreateOverlayManager()
 {
-    // When the buffer usage has changed then we have to create a new
-    // overlay manager.  Save the current one so that later we can move its
-    // overlay objects to the new one.
-    sdr::overlay::OverlayManager* pOldOverlayManager = NULL;
-    
-	if(mbUseBuffer != bUseBuffer)
-    {
-        mbUseBuffer = bUseBuffer;
-        pOldOverlayManager = mpOverlayManager;
-        mpOverlayManager = NULL;
-    }
-
 	// not yet one created?
 	if(!mpOverlayManager)
 	{
@@ -132,7 +120,7 @@ void SdrPaintWindow::impCreateOverlayMan
 				// if that refresh itself will use a 2nd vdev to avoid flickering.
 				// Also hand over the evtl. existing old OverlayManager; this means to take over 
 				// the registered OverlayObjects from it
-				mpOverlayManager = new ::sdr::overlay::OverlayManagerBuffered(GetOutputDevice(), pOldOverlayManager,
true);
+				mpOverlayManager = new ::sdr::overlay::OverlayManagerBuffered(GetOutputDevice(), true);
 			}
 			else
 			{
@@ -140,7 +128,7 @@ void SdrPaintWindow::impCreateOverlayMan
 				// take place
 				// Also hand over the evtl. existing old OverlayManager; this means to take over 
 				// the registered OverlayObjects from it
-				mpOverlayManager = new ::sdr::overlay::OverlayManager(GetOutputDevice(), pOldOverlayManager);
+				mpOverlayManager = new ::sdr::overlay::OverlayManager(GetOutputDevice());
 			}
 
 			OSL_ENSURE(mpOverlayManager, "SdrPaintWindow::SdrPaintWindow: Could not allocate an overlayManager
(!)");
@@ -166,14 +154,6 @@ void SdrPaintWindow::impCreateOverlayMan
 			mpOverlayManager->setStripeLengthPixel(GetPaintView().getOptionsDrawinglayer().GetStripeLength());
 		}
 	}
-
-	// OverlayObjects are transfered for the evtl. newly created OverlayManager by handing over
-	// at construction time
-	if(pOldOverlayManager)
-    {
-        // The old overlay manager is not used anymore and can be (has to be) deleted.
-        delete pOldOverlayManager;
-    }
 }
 
 SdrPaintWindow::SdrPaintWindow(SdrPaintView& rNewPaintView, OutputDevice& rOut)
@@ -202,7 +182,7 @@ SdrPaintWindow::~SdrPaintWindow()
 	if(!mpOverlayManager)
 	{
         // Create buffered overlay manager by default.
-		const_cast< SdrPaintWindow* >(this)->impCreateOverlayManager(true);
+		const_cast< SdrPaintWindow* >(this)->impCreateOverlayManager();
 	}
 
 	return mpOverlayManager;
@@ -264,15 +244,15 @@ void SdrPaintWindow::OutputPreRenderDevi
 }
 
 // #i73602# add flag if buffer shall be used
-void SdrPaintWindow::DrawOverlay(const Region& rRegion, bool bUseBuffer)
+void SdrPaintWindow::DrawOverlay(const Region& rRegion)
 {
 	// ## force creation of OverlayManager since the first repaint needs to
 	// save the background to get a controlled start into overlay mechanism
-	impCreateOverlayManager(bUseBuffer);
+	impCreateOverlayManager();
 
 	if(mpOverlayManager && !OutputToPrinter())
 	{
-		if(mpPreRenderDevice && bUseBuffer)
+		if(mpPreRenderDevice)
 		{
 			mpOverlayManager->completeRedraw(rRegion, &mpPreRenderDevice->GetPreRenderDevice());
 		}

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdedxv.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdedxv.cxx?rev=1333411&r1=1333410&r2=1333411&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdedxv.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdedxv.cxx Thu May  3 11:59:32 2012
@@ -304,73 +304,99 @@ void SdrObjEditView::ModelHasChanged()
 //
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 
-void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectangle&
rRect) const
+void SdrObjEditView::TextEditDrawing(SdrPaintWindow& rPaintWindow) const
 {
-    Window* pWin = rOutlView.GetWindow();
-
-	if(pWin)
+	// draw old text edit stuff
+	if(IsTextEdit())
 	{
-		const SdrTextObj* pText = PTR_CAST(SdrTextObj,GetTextEditObject());
-		bool bTextFrame(pText && pText->IsTextFrame());
-		bool bFitToSize(0 != (pTextEditOutliner->GetControlWord() & EE_CNTRL_STRETCHING));
-		bool bModifyMerk(pTextEditOutliner->IsModified()); // #43095#
-		Rectangle aBlankRect(rOutlView.GetOutputArea());
-		aBlankRect.Union(aMinTextEditArea);
-		Rectangle aPixRect(pWin->LogicToPixel(aBlankRect));
-		aBlankRect.Intersection(rRect);
-		rOutlView.GetOutliner()->SetUpdateMode(sal_True); // Bugfix #22596#
-		rOutlView.Paint(aBlankRect);
+		const SdrOutliner* pActiveOutliner = GetTextEditOutliner();
 
-		if(!bModifyMerk) 
+		if(pActiveOutliner)
 		{
-			// #43095#
-			pTextEditOutliner->ClearModifyFlag(); 
-		}
+			const sal_uInt32 nViewAnz(pActiveOutliner->GetViewCount());
 
-		if(bTextFrame && !bFitToSize) 
-		{
-			aPixRect.Left()--;
-			aPixRect.Top()--;
-			aPixRect.Right()++;
-			aPixRect.Bottom()++;
-			sal_uInt16 nPixSiz(rOutlView.GetInvalidateMore() - 1);
-			
-			{ 
-				// xPixRect Begrenzen, wegen Treiberproblem bei zu weit hinausragenden Pixelkoordinaten
-				Size aMaxXY(pWin->GetOutputSizePixel());
-				long a(2 * nPixSiz);
-				long nMaxX(aMaxXY.Width() + a);
-				long nMaxY(aMaxXY.Height() + a);
-
-				if (aPixRect.Left  ()<-a) aPixRect.Left()=-a;
-				if (aPixRect.Top   ()<-a) aPixRect.Top ()=-a;
-				if (aPixRect.Right ()>nMaxX) aPixRect.Right ()=nMaxX;
-				if (aPixRect.Bottom()>nMaxY) aPixRect.Bottom()=nMaxY;
-			}
+			if(nViewAnz)
+			{
+				const Region& rRedrawRegion = rPaintWindow.GetRedrawRegion();
+				const Rectangle aCheckRect(rRedrawRegion.GetBoundRect());
 
-			Rectangle aOuterPix(aPixRect);
-			aOuterPix.Left()-=nPixSiz;
-			aOuterPix.Top()-=nPixSiz;
-			aOuterPix.Right()+=nPixSiz;
-			aOuterPix.Bottom()+=nPixSiz;
+				for(sal_uInt32 i(0); i < nViewAnz; i++) 
+				{
+					OutlinerView* pOLV = pActiveOutliner->GetView(i);
 
-			bool bMerk(pWin->IsMapModeEnabled());
-			pWin->EnableMapMode(sal_False);
-			PolyPolygon aPolyPoly( 2 );
+					if(pOLV->GetWindow() == &rPaintWindow.GetOutputDevice()) 
+					{
+						ImpPaintOutlinerView(*pOLV, aCheckRect, rPaintWindow.GetTargetOutputDevice());
+						return;
+					}
+				}
+			}
+		}
+	}
+}
 
-			svtools::ColorConfig aColorConfig;
-			Color aHatchCol( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor );
-			const Hatch aHatch( HATCH_SINGLE, aHatchCol, 3, 450 );
-
-			aPolyPoly.Insert( aOuterPix );
-			aPolyPoly.Insert( aPixRect );
-			pWin->DrawHatch( aPolyPoly, aHatch );
+void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectangle&
rRect, OutputDevice& rTargetDevice) const
+{
+	const SdrTextObj* pText = PTR_CAST(SdrTextObj,GetTextEditObject());
+	bool bTextFrame(pText && pText->IsTextFrame());
+	bool bFitToSize(0 != (pTextEditOutliner->GetControlWord() & EE_CNTRL_STRETCHING));
+	bool bModifyMerk(pTextEditOutliner->IsModified()); // #43095#
+	Rectangle aBlankRect(rOutlView.GetOutputArea());
+	aBlankRect.Union(aMinTextEditArea);
+	Rectangle aPixRect(rTargetDevice.LogicToPixel(aBlankRect));
+	aBlankRect.Intersection(rRect);
+	rOutlView.GetOutliner()->SetUpdateMode(sal_True); // Bugfix #22596#
+	rOutlView.Paint(aBlankRect, &rTargetDevice);
+
+	if(!bModifyMerk) 
+	{
+		// #43095#
+		pTextEditOutliner->ClearModifyFlag(); 
+	}
+
+	if(bTextFrame && !bFitToSize) 
+	{
+		aPixRect.Left()--;
+		aPixRect.Top()--;
+		aPixRect.Right()++;
+		aPixRect.Bottom()++;
+		sal_uInt16 nPixSiz(rOutlView.GetInvalidateMore() - 1);
+			
+		{ 
+			// xPixRect Begrenzen, wegen Treiberproblem bei zu weit hinausragenden Pixelkoordinaten
+			Size aMaxXY(rTargetDevice.GetOutputSizePixel());
+			long a(2 * nPixSiz);
+			long nMaxX(aMaxXY.Width() + a);
+			long nMaxY(aMaxXY.Height() + a);
+
+			if (aPixRect.Left  ()<-a) aPixRect.Left()=-a;
+			if (aPixRect.Top   ()<-a) aPixRect.Top ()=-a;
+			if (aPixRect.Right ()>nMaxX) aPixRect.Right ()=nMaxX;
+			if (aPixRect.Bottom()>nMaxY) aPixRect.Bottom()=nMaxY;
+		}
+
+		Rectangle aOuterPix(aPixRect);
+		aOuterPix.Left()-=nPixSiz;
+		aOuterPix.Top()-=nPixSiz;
+		aOuterPix.Right()+=nPixSiz;
+		aOuterPix.Bottom()+=nPixSiz;
+
+		bool bMerk(rTargetDevice.IsMapModeEnabled());
+		rTargetDevice.EnableMapMode(sal_False);
+		PolyPolygon aPolyPoly( 2 );
+
+		svtools::ColorConfig aColorConfig;
+		Color aHatchCol( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor );
+		const Hatch aHatch( HATCH_SINGLE, aHatchCol, 3, 450 );
+
+		aPolyPoly.Insert( aOuterPix );
+		aPolyPoly.Insert( aPixRect );
+		rTargetDevice.DrawHatch( aPolyPoly, aHatch );
 
-			pWin->EnableMapMode(bMerk);
-		}
-		
-		rOutlView.ShowCursor();
+		rTargetDevice.EnableMapMode(bMerk);
 	}
+		
+	rOutlView.ShowCursor();
 }
 
 void SdrObjEditView::ImpInvalidateOutlinerView(OutlinerView& rOutlView) const

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdpagv.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdpagv.cxx?rev=1333411&r1=1333410&r2=1333411&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdpagv.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdpagv.cxx Thu May  3 11:59:32 2012
@@ -46,8 +46,6 @@
 #include "svx/svditer.hxx"
 #include <svx/svdogrp.hxx>
 #include <svx/svdtypes.hxx>
-
-#include <svx/svdotext.hxx> // fuer PaintOutlinerView
 #include <svx/svdoole2.hxx>
 
 // #110094#
@@ -321,22 +319,6 @@ void SdrPageView::InvalidateAllWin(const
 	}
 }
 
-void SdrPageView::PaintOutlinerView(OutputDevice* pOut, const Rectangle& rRect) const
-{
-	if (GetView().pTextEditOutliner==NULL) return;
-	//const SdrObject* pTextObjTmp=GetView().GetTextEditObject();
-	//const SdrTextObj* pText=PTR_CAST(SdrTextObj,pTextObjTmp);
-	//FASTBOOL bTextFrame=pText!=NULL && pText->IsTextFrame();
-	sal_uIntPtr nViewAnz=GetView().pTextEditOutliner->GetViewCount();
-	for (sal_uIntPtr i=0; i<nViewAnz; i++) {
-		OutlinerView* pOLV=GetView().pTextEditOutliner->GetView(i);
-		if (pOLV->GetWindow()==pOut) {
-			GetView().ImpPaintOutlinerView(*pOLV, rRect);
-			return;
-		}
-	}
-}
-
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 
 void SdrPageView::PrePaint()

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdpntv.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdpntv.cxx?rev=1333411&r1=1333410&r2=1333411&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdpntv.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdpntv.cxx Thu May  3 11:59:32 2012
@@ -912,36 +912,16 @@ void SdrPaintView::EndCompleteRedraw(Sdr
 		// look for active TextEdit. As long as this cannot be painted to a VDev,
 		// it cannot get part of buffering. In that case, output evtl. prerender
 		// early and paint text edit to window.
-		const bool bTextEditActive(IsTextEdit() && GetTextEditPageView());
-
-		if(bTextEditActive)
+		if(IsTextEdit() && GetSdrPageView())
 		{
-			// output PreRendering and destroy it so that it is not used for FormLayer
-			// or overlay
-			rPaintWindow.OutputPreRenderDevice(rPaintWindow.GetRedrawRegion());
-
-			// draw old text edit stuff before overlay to have it as part of the background
-			// ATM. This will be changed to have the text editing on the overlay, bit it
-			// is not an easy thing to do, see BegTextEdit and the OutlinerView stuff used...
-			if(bTextEditActive)
-			{
-				ImpTextEditDrawing(rPaintWindow);
-			}
-
-			// draw Overlay directly to window. This will save the contents of the window
-			// in the RedrawRegion to the overlay background buffer, too.
-			// This may lead to problems when reading from the screen is slow from the
-			// graphics driver/graphiccard combination.
-			rPaintWindow.DrawOverlay(rPaintWindow.GetRedrawRegion(), false);
+			static_cast< SdrView* >(this)->TextEditDrawing(rPaintWindow);
 		}
-		else
-		{
-			// draw Overlay, also to PreRender device if exists
-			rPaintWindow.DrawOverlay(rPaintWindow.GetRedrawRegion(), true);
 
-			// output PreRendering
-			rPaintWindow.OutputPreRenderDevice(rPaintWindow.GetRedrawRegion());
-		}
+		// draw Overlay, also to PreRender device if exists
+		rPaintWindow.DrawOverlay(rPaintWindow.GetRedrawRegion());
+
+		// output PreRendering
+		rPaintWindow.OutputPreRenderDevice(rPaintWindow.GetRedrawRegion());
 	}
 }
 
@@ -1026,23 +1006,6 @@ void SdrPaintView::EndDrawLayers(SdrPain
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 
-void SdrPaintView::ImpTextEditDrawing(SdrPaintWindow& rPaintWindow) const
-{
-	// draw old text edit stuff
-	if(IsTextEdit())
-	{
-		SdrPageView* pPageView = GetTextEditPageView();
-
-		if(pPageView)
-		{
-			// paint TextEdit directly to the destination OutDev
-			const Region& rRedrawRegion = rPaintWindow.GetRedrawRegion();
-			const Rectangle aCheckRect(rRedrawRegion.GetBoundRect());
-			pPageView->PaintOutlinerView(&rPaintWindow.GetOutputDevice(), aCheckRect);
-		}
-	}
-}
-
 void SdrPaintView::ImpFormLayerDrawing(SdrPaintWindow& rPaintWindow) const
 {
 	if(mpPageView)



Mime
View raw message