summaryrefslogtreecommitdiffstats
path: root/svx/source/svdraw/svdpagv.cxx
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.ooo@free.fr>2012-10-02 17:48:27 +0200
commita023fd1367931a15e650d3c9ecba9623636ed666 (patch)
treee973ab44f1987b42104adb69ebf73f165f77a75b /svx/source/svdraw/svdpagv.cxx
parentMissing published flag for BorderLine2 (diff)
downloadcore-a023fd1367931a15e650d3c9ecba9623636ed666.tar.gz
core-a023fd1367931a15e650d3c9ecba9623636ed666.zip
n#777699: Clip the objects to the pagewe are painting
Change-Id: I78ac7de5346a2adea9a2c6cf3cbb0321e05d79dc
Diffstat (limited to 'svx/source/svdraw/svdpagv.cxx')
-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);