diff options
author | Armin Le Grand <alg@apache.org> | 2012-05-03 10:59:32 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-03-11 07:50:32 +0000 |
commit | 3137258e346a9c16b2e61747fd926a1e7d358d02 (patch) | |
tree | 02a19c5f59b7f6e4528f35ad8cc0c8785598ce8b /svx | |
parent | 6874c25f98dcfe5116d96a1282c4231c3f2d623a (diff) |
Resolves: #i118905# Changed EditEngine to be able to paint to overlay directly
i.e. paint to VirtualDevice as well, not only to Window.
Removed the no longer needed switch between buffered and unbuffered overlay,
this removes the flickering white block.
(cherry picked from commit 5ab32faf2426fa60f975d0b544cfd671cdc7983b)
Conflicts:
editeng/inc/editeng/outliner.hxx
editeng/source/editeng/impedit.hxx
editeng/source/editeng/impedit3.cxx
editeng/source/editeng/impedit4.cxx
svx/inc/svx/sdr/overlay/overlaymanager.hxx
svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx
svx/inc/svx/sdrpaintwindow.hxx
svx/inc/svx/svdpagv.hxx
svx/source/sdr/overlay/overlaymanager.cxx
svx/source/svdraw/sdrpaintwindow.cxx
svx/source/svdraw/svdedxv.cxx
svx/source/svdraw/svdpagv.cxx
Change-Id: Ibf4fcba77b120187fbae2454d136d2acd74be119
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/svx/sdr/overlay/overlaymanager.hxx | 10 | ||||
-rw-r--r-- | svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx | 8 | ||||
-rw-r--r-- | svx/inc/svx/sdrpaintwindow.hxx | 15 | ||||
-rw-r--r-- | svx/inc/svx/svdedxv.hxx | 7 | ||||
-rw-r--r-- | svx/inc/svx/svdpagv.hxx | 2 | ||||
-rw-r--r-- | svx/inc/svx/svdpntv.hxx | 5 | ||||
-rw-r--r-- | svx/source/sdr/overlay/overlaymanager.cxx | 34 | ||||
-rw-r--r-- | svx/source/sdr/overlay/overlaymanagerbuffered.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/sdrpaintwindow.cxx | 28 | ||||
-rw-r--r-- | svx/source/svdraw/svdedxv.cxx | 129 | ||||
-rw-r--r-- | svx/source/svdraw/svdpagv.cxx | 15 | ||||
-rw-r--r-- | svx/source/svdraw/svdpntv.cxx | 51 |
12 files changed, 109 insertions, 201 deletions
diff --git a/svx/inc/svx/sdr/overlay/overlaymanager.hxx b/svx/inc/svx/sdr/overlay/overlaymanager.hxx index 2212153a5632..e2c23b5dc6df 100644 --- a/svx/inc/svx/sdr/overlay/overlaymanager.hxx +++ b/svx/inc/svx/sdr/overlay/overlaymanager.hxx @@ -90,17 +90,11 @@ namespace sdr // ViewTransformation and evtl. correct mfDiscreteOne double getDiscreteOne() const; - // 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); + OverlayManager(OutputDevice& rOutputDevice); virtual ~OverlayManager(); public: - static rtl::Reference<OverlayManager> create(OutputDevice& rOutputDevice, - OverlayManager* pOldOverlayManager = 0); + static rtl::Reference<OverlayManager> create(OutputDevice& rOutputDevice); // access to current ViewInformation2D; this call checks and evtl. updates ViewInformation2D const drawinglayer::geometry::ViewInformation2D getCurrentViewInformation2D() const; diff --git a/svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx b/svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx index 5dbbb08f303f..7f6dbe05d9e6 100644 --- a/svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx +++ b/svx/inc/svx/sdr/overlay/overlaymanagerbuffered.hxx @@ -61,18 +61,14 @@ namespace sdr void ImpRestoreBackground(const Region& rRegionPixel) const; void ImpSaveBackground(const Region& rRegion, OutputDevice* pPreRenderDevice = 0L); - // 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, - bool bRefreshWithPreRendering); + bool bRefreshWithPreRendering = false); virtual ~OverlayManagerBuffered(); public: static rtl::Reference<OverlayManager> create(OutputDevice& rOutputDevice, - OverlayManager* pOldOverlayManager = 0, bool bRefreshWithPreRendering = false); + bool bRefreshWithPreRendering = false); // complete redraw virtual void completeRedraw(const Region& rRegion, OutputDevice* pPreRenderDevice = 0L) const; diff --git a/svx/inc/svx/sdrpaintwindow.hxx b/svx/inc/svx/sdrpaintwindow.hxx index fa2f6e99377d..5191f737f516 100644 --- a/svx/inc/svx/sdrpaintwindow.hxx +++ b/svx/inc/svx/sdrpaintwindow.hxx @@ -92,18 +92,7 @@ private: bool mbUseBuffer; // helpers - /** Create mxOverlayManager 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); @@ -117,7 +106,7 @@ public: rtl::Reference< ::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); // calculate visible area and return Rectangle GetVisibleArea() const; diff --git a/svx/inc/svx/svdedxv.hxx b/svx/inc/svx/svdedxv.hxx index 82452c019e9c..b385aefb12a3 100644 --- a/svx/inc/svx/svdedxv.hxx +++ b/svx/inc/svx/svdedxv.hxx @@ -118,7 +118,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 @@ -142,6 +142,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); diff --git a/svx/inc/svx/svdpagv.hxx b/svx/inc/svx/svdpagv.hxx index 46183bcfd600..b43db7da37ed 100644 --- a/svx/inc/svx/svdpagv.hxx +++ b/svx/inc/svx/svdpagv.hxx @@ -113,8 +113,6 @@ public: */ const SdrPageWindow* FindPatchedPageWindow( const OutputDevice& rOutDev ) const; - void PaintOutlinerView(OutputDevice* pOut, const Rectangle& rRect) const; - private: SVX_DLLPRIVATE SdrPageWindow& CreateNewPageWindowEntry(SdrPaintWindow& rPaintWindow); diff --git a/svx/inc/svx/svdpntv.hxx b/svx/inc/svx/svdpntv.hxx index 761f203867e0..eca5710fa8df 100644 --- a/svx/inc/svx/svdpntv.hxx +++ b/svx/inc/svx/svdpntv.hxx @@ -383,11 +383,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; diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx index 51bd2ec56480..bc8fde868726 100644 --- a/svx/source/sdr/overlay/overlaymanager.cxx +++ b/svx/source/sdr/overlay/overlaymanager.cxx @@ -117,9 +117,7 @@ namespace sdr return mfDiscreteOne; } - OverlayManager::OverlayManager( - OutputDevice& rOutputDevice, - OverlayManager* pOldOverlayManager) + OverlayManager::OverlayManager(OutputDevice& rOutputDevice) : Scheduler(), mnRefCount(0), rmOutputDevice(rOutputDevice), @@ -143,37 +141,11 @@ 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(); - } - } } - rtl::Reference<OverlayManager> OverlayManager::create( - OutputDevice& rOutputDevice, - OverlayManager* pOldOverlayManager) + rtl::Reference<OverlayManager> OverlayManager::create(OutputDevice& rOutputDevice) { - return rtl::Reference<OverlayManager>(new OverlayManager(rOutputDevice, - pOldOverlayManager)); + return rtl::Reference<OverlayManager>(new OverlayManager(rOutputDevice)); } const drawinglayer::geometry::ViewInformation2D OverlayManager::getCurrentViewInformation2D() const diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx index 6b394bef5ebe..81b53b27bb0e 100644 --- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx +++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx @@ -382,9 +382,8 @@ namespace sdr OverlayManagerBuffered::OverlayManagerBuffered( OutputDevice& rOutputDevice, - OverlayManager* pOldOverlayManager, bool bRefreshWithPreRendering) - : OverlayManager(rOutputDevice, pOldOverlayManager), + : OverlayManager(rOutputDevice), mbRefreshWithPreRendering(bRefreshWithPreRendering) { // Init timer @@ -394,11 +393,10 @@ namespace sdr rtl::Reference<OverlayManager> OverlayManagerBuffered::create( OutputDevice& rOutputDevice, - OverlayManager* pOldOverlayManager, bool bRefreshWithPreRendering) { return rtl::Reference<OverlayManager>(new OverlayManagerBuffered(rOutputDevice, - pOldOverlayManager, bRefreshWithPreRendering)); + bRefreshWithPreRendering)); } OverlayManagerBuffered::~OverlayManagerBuffered() diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx index cf9548dbe02d..f2084cb12d89 100644 --- a/svx/source/svdraw/sdrpaintwindow.cxx +++ b/svx/source/svdraw/sdrpaintwindow.cxx @@ -98,20 +98,8 @@ void SdrPreRenderDevice::OutputPreRenderDevice(const Region& rExpandedRegion) //////////////////////////////////////////////////////////////////////////////////////////////////// -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. - rtl::Reference<sdr::overlay::OverlayManager> xOldOverlayManager; - - if(mbUseBuffer != bUseBuffer) - { - mbUseBuffer = bUseBuffer; - xOldOverlayManager = mxOverlayManager; - mxOverlayManager.clear(); - } - // not yet one created? if(!mxOverlayManager.is()) { @@ -126,8 +114,7 @@ void SdrPaintWindow::impCreateOverlayManager(const bool bUseBuffer) // whether that refresh itself will use a 2nd vdev to avoid flickering. // Also hand over the old OverlayManager if existent; this means to take over // the registered OverlayObjects from it - mxOverlayManager = ::sdr::overlay::OverlayManagerBuffered::create(GetOutputDevice(), - xOldOverlayManager.get(), true); + mxOverlayManager = ::sdr::overlay::OverlayManagerBuffered::create(GetOutputDevice(), true); } else { @@ -135,8 +122,7 @@ void SdrPaintWindow::impCreateOverlayManager(const bool bUseBuffer) // take place // Also hand over the old OverlayManager if existent; this means to take over // the registered OverlayObjects from it - mxOverlayManager = ::sdr::overlay::OverlayManager::create(GetOutputDevice(), - xOldOverlayManager.get()); + mxOverlayManager = ::sdr::overlay::OverlayManager::create(GetOutputDevice()); } OSL_ENSURE(mxOverlayManager.is(), "SdrPaintWindow::SdrPaintWindow: Could not allocate an overlayManager (!)"); @@ -185,7 +171,7 @@ rtl::Reference< ::sdr::overlay::OverlayManager > SdrPaintWindow::GetOverlayManag if(!mxOverlayManager.is()) { // Create buffered overlay manager by default. - const_cast< SdrPaintWindow* >(this)->impCreateOverlayManager(true); + const_cast< SdrPaintWindow* >(this)->impCreateOverlayManager(); } return mxOverlayManager; @@ -247,15 +233,15 @@ void SdrPaintWindow::OutputPreRenderDevice(const Region& rExpandedRegion) } // #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(mxOverlayManager.is() && !OutputToPrinter()) { - if(mpPreRenderDevice && bUseBuffer) + if(mpPreRenderDevice) { mxOverlayManager->completeRedraw(rRegion, &mpPreRenderDevice->GetPreRenderDevice()); } diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index a08604e761a3..fe3bd3cee55c 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -289,72 +289,99 @@ void SdrObjEditView::ModelHasChanged() // TextEdit //////////////////////////////////////////////////////////////////////////////////////////////////// -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(pText && pText->IsFitToSize()); - bool bModifyMerk(pTextEditOutliner->IsModified()); - Rectangle aBlankRect(rOutlView.GetOutputArea()); - aBlankRect.Union(aMinTextEditArea); - Rectangle aPixRect(pWin->LogicToPixel(aBlankRect)); - aBlankRect.Intersection(rRect); - rOutlView.GetOutliner()->SetUpdateMode(sal_True); - rOutlView.Paint(aBlankRect); - - if(!bModifyMerk) - { - pTextEditOutliner->ClearModifyFlag(); - } + const SdrOutliner* pActiveOutliner = GetTextEditOutliner(); - if(bTextFrame && !bFitToSize) + if(pActiveOutliner) { - aPixRect.Left()--; - aPixRect.Top()--; - aPixRect.Right()++; - aPixRect.Bottom()++; - sal_uInt16 nPixSiz(rOutlView.GetInvalidateMore() - 1); + const sal_uInt32 nViewAnz(pActiveOutliner->GetViewCount()); + if(nViewAnz) { - // limit xPixRect because of driver problems when pixel coordinates are too far out - Size aMaxXY(pWin->GetOutputSizePixel()); - long a(2 * nPixSiz); - long nMaxX(aMaxXY.Width() + a); - long nMaxY(aMaxXY.Height() + a); + const Region& rRedrawRegion = rPaintWindow.GetRedrawRegion(); + const Rectangle aCheckRect(rRedrawRegion.GetBoundRect()); - 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; + for(sal_uInt32 i(0); i < nViewAnz; i++) + { + OutlinerView* pOLV = pActiveOutliner->GetView(i); + + if(pOLV->GetWindow() == &rPaintWindow.GetOutputDevice()) + { + ImpPaintOutlinerView(*pOLV, aCheckRect, rPaintWindow.GetTargetOutputDevice()); + return; + } + } } + } + } +} - Rectangle aOuterPix(aPixRect); - aOuterPix.Left()-=nPixSiz; - aOuterPix.Top()-=nPixSiz; - aOuterPix.Right()+=nPixSiz; - aOuterPix.Bottom()+=nPixSiz; +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(); + } - bool bMerk(pWin->IsMapModeEnabled()); - pWin->EnableMapMode(sal_False); - PolyPolygon aPolyPoly( 2 ); + 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; + } - svtools::ColorConfig aColorConfig; - Color aHatchCol( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor ); - const Hatch aHatch( HATCH_SINGLE, aHatchCol, 3, 450 ); + Rectangle aOuterPix(aPixRect); + aOuterPix.Left()-=nPixSiz; + aOuterPix.Top()-=nPixSiz; + aOuterPix.Right()+=nPixSiz; + aOuterPix.Bottom()+=nPixSiz; - aPolyPoly.Insert( aOuterPix ); - aPolyPoly.Insert( aPixRect ); - pWin->DrawHatch( aPolyPoly, aHatch ); + bool bMerk(rTargetDevice.IsMapModeEnabled()); + rTargetDevice.EnableMapMode(sal_False); + PolyPolygon aPolyPoly( 2 ); - pWin->EnableMapMode(bMerk); - } + 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 ); - rOutlView.ShowCursor(); + rTargetDevice.EnableMapMode(bMerk); } + + rOutlView.ShowCursor(); } void SdrObjEditView::ImpInvalidateOutlinerView(OutlinerView& rOutlView) const diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx index 47da065daf40..c2f957d5066b 100644 --- a/svx/source/svdraw/svdpagv.cxx +++ b/svx/source/svdraw/svdpagv.cxx @@ -34,8 +34,6 @@ #include "svx/svditer.hxx" #include <svx/svdogrp.hxx> #include <svx/svdtypes.hxx> - -#include <svx/svdotext.hxx> // for PaintOutlinerView #include <svx/svdoole2.hxx> #include <svx/sdr/contact/objectcontactofpageview.hxx> @@ -271,19 +269,6 @@ void SdrPageView::InvalidateAllWin() } } -void SdrPageView::PaintOutlinerView(OutputDevice* pOut, const Rectangle& rRect) const -{ - if (GetView().pTextEditOutliner==NULL) return; - 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() diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index aa4bb54fc07e..3f539233325a 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -723,36 +723,16 @@ void SdrPaintView::EndCompleteRedraw(SdrPaintWindow& rPaintWindow, bool bPaintFo // 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()); } } @@ -861,23 +841,6 @@ Region SdrPaintView::OptimizeDrawLayersRegion(OutputDevice* pOut, const Region& //////////////////////////////////////////////////////////////////////////////////////////////////// -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) |