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-03 14:45:50 +0200
commit978033d5ed9f93f2d5d9a1ba44acf6b37bc13bfe (patch)
tree540f8baf41d2e563a3a910a85a5a036c31114bac /sw
parentb5a4e6974a5473c44fc239b6a9ae21f233111c2a (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
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 3e77cf1e336b..0f27fc50c573 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();