summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-07-03 11:52:17 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-07-06 09:31:59 +0200
commitfc3de7d134c2832b7f940e81d16042d171b402fc (patch)
treeb518b04d3237f4d62911d9e581346e983807ac46 /sw
parentac7cc2b709469f1b88fe67dd8d069512ade6eb1c (diff)
SwViewShell::DLPrePaint2: fix missing clipping for the non-buffered case
With this, if the sw window is small enough that the page shadow is supposed to be under the sidebar, we no longer paint the shadow over the sidebar. In the non-double-buffered case the output is a window, so SdrPaintWindow::PreparePreRenderDevice() does its own buffering, and clipping is taken care of when that buffer is copied to the window in SdrPreRenderDevice::OutputPreRenderDevice(). This wasn't a problem before, as either the output was a non-screen device or UI elements were painted (like the sidebar), but never both at the same time. Change-Id: Ic02c814fc4deeea86c245c74bd69656533d9f835 (cherry picked from commit 978033d5ed9f93f2d5d9a1ba44acf6b37bc13bfe)
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/view/viewsh.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 6e0a15026db8..3642d1ea3ae4 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -203,6 +203,9 @@ void SwViewShell::DLPrePaint2(const vcl::Region& rRegion)
mpBufferedOut = mpOut;
mpOut = &(mpTargetPaintWindow->GetTargetOutputDevice());
}
+ else
+ // In case mpOut is used without buffering, need to set clipping.
+ mpOut->SetClipRegion(rRegion);
// remember original paint MapMode for wrapped FlyFrame paints
maPrePostMapMode = mpOut->GetMapMode();