summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2012-09-03 16:52:47 +0200
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-09-04 12:59:52 +0200
commit8af09bf33291df2fb2bfbbd6e42f9bf074fcc4fc (patch)
treeb3dc3e1739f7c006d7c9d21cf30acf76da95950c /svx/source/svdraw
parente598ab04476a32a08f18e8f0662fafa5f78f1a4a (diff)
n#777699: Clip the objects to the pagewe are painting
Change-Id: I78ac7de5346a2adea9a2c6cf3cbb0321e05d79dc
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r--svx/source/svdraw/svdpagv.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx
index 5efebdfc304c..9a3aaf16f7f5 100644
--- a/svx/source/svdraw/svdpagv.cxx
+++ b/svx/source/svdraw/svdpagv.cxx
@@ -346,7 +346,7 @@ void SdrPageView::setPreparedPageWindow(SdrPageWindow* pKnownTarget)
mpPreparedPageWindow = pKnownTarget;
}
-void SdrPageView::DrawLayer(SdrLayerID nID, OutputDevice* pGivenTarget, sdr::contact::ViewObjectContactRedirector* pRedirector) const
+void SdrPageView::DrawLayer(SdrLayerID nID, OutputDevice* pGivenTarget, sdr::contact::ViewObjectContactRedirector* pRedirector, const Rectangle& rRect) const
{
if(GetPage())
{
@@ -374,7 +374,10 @@ void SdrPageView::DrawLayer(SdrLayerID nID, OutputDevice* pGivenTarget, sdr::con
// Copy existing paint region to use the same as prepared in BeginDrawLayer
SdrPaintWindow& rExistingPaintWindow = pPreparedTarget->GetPaintWindow();
const Region& rExistingRegion = rExistingPaintWindow.GetRedrawRegion();
- aTemporaryPaintWindow.SetRedrawRegion(rExistingRegion);
+ if ( rRect.IsEmpty() )
+ aTemporaryPaintWindow.SetRedrawRegion(rExistingRegion);
+ else
+ aTemporaryPaintWindow.SetRedrawRegion(Region(rRect));
// patch the ExistingPageWindow
pPreparedTarget->patchPaintWindow(aTemporaryPaintWindow);