diff options
-rw-r--r-- | sw/inc/viewsh.hxx | 1 | ||||
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 19 | ||||
-rw-r--r-- | sw/source/core/view/vnew.cxx | 1 |
3 files changed, 12 insertions, 9 deletions
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index d7e41343e067..57d3b1b37623 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -159,6 +159,7 @@ class SW_DLLPUBLIC SwViewShell : public Ring // boolean, indicating that class in in constructor. bool mbInConstructor:1; + bool mbTiledRendering:1; ///< Set if we are doing the tiled rendering (using PaintTile()). SdrPaintWindow* mpTargetPaintWindow; OutputDevice* mpBufferedOut; diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 049bffaa3dcc..32db8806e137 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -150,7 +150,7 @@ void SwViewShell::DLPrePaint2(const Region& rRegion) MakeDrawView(); // Prefer window; if tot available, get mpOut (e.g. printer) - mpPrePostOutDev = (GetWin() ? GetWin() : GetOut()); + mpPrePostOutDev = (GetWin() && !mbTiledRendering)? GetWin(): GetOut(); // #i74769# use SdrPaintWindow now direct mpTargetPaintWindow = Imp()->GetDrawView()->BeginDrawLayers(mpPrePostOutDev, rRegion); @@ -160,9 +160,7 @@ void SwViewShell::DLPrePaint2(const Region& rRegion) if(mpTargetPaintWindow->GetPreRenderDevice()) { mpBufferedOut = mpOut; -#ifndef IOS mpOut = &(mpTargetPaintWindow->GetTargetOutputDevice()); -#endif } // remember original paint MapMode for wrapped FlyFrame paints @@ -192,13 +190,11 @@ void SwViewShell::DLPostPaint2(bool bPaintFormLayer) mPrePostPaintRegions.pop(); // clear if(0 != mpTargetPaintWindow) { -#ifndef IOS // #i74769# restore buffered OutDev if(mpTargetPaintWindow->GetPreRenderDevice()) { mpOut = mpBufferedOut; } -#endif // #i74769# use SdrPaintWindow now direct Imp()->GetDrawView()->EndDrawLayers(*mpTargetPaintWindow, bPaintFormLayer); @@ -1760,13 +1756,18 @@ void SwViewShell::PaintTile(OutputDevice *pOut, const Rectangle &rRect) assert(pOut); // now we need to setup the SwViewShell's output device - // TODO clean up SwViewShell's approach to output devices - OutputDevice *pSaveOut = GetOut(); - SetOutDev(this, pOut); + // TODO clean up SwViewShell's approach to output devices (the many of + // them - mpBufferedOut, mpOut, mpWin, ..., and get rid of + // mbTiledRendering) + OutputDevice *pSaveOut = mpOut; + + mbTiledRendering = true; + mpOut = pOut; Paint(rRect); - SetOutDev(this, pSaveOut); + mpOut = pSaveOut; + mbTiledRendering = false; } #if !HAVE_FEATURE_DESKTOP diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx index 01e909ddfaba..1efee42be630 100644 --- a/sw/source/core/view/vnew.cxx +++ b/sw/source/core/view/vnew.cxx @@ -232,6 +232,7 @@ SwViewShell::SwViewShell( SwViewShell& rShell, Window *pWindow, mbShowHeaderSeparator( false ), mbShowFooterSeparator( false ), mbHeaderFooterEdit( false ), + mbTiledRendering(false), mpTargetPaintWindow(0), // #i74769# mpBufferedOut(0), // #i74769# mpDoc( rShell.GetDoc() ), |