summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svx/inc/svx/svdpagv.hxx3
-rw-r--r--svx/source/svdraw/svdpagv.cxx7
-rw-r--r--sw/source/core/layout/paintfrm.cxx4
-rw-r--r--sw/source/core/view/vdraw.cxx4
4 files changed, 11 insertions, 7 deletions
diff --git a/svx/inc/svx/svdpagv.hxx b/svx/inc/svx/svdpagv.hxx
index 38881e559fb9..5ab5848cf059 100644
--- a/svx/inc/svx/svdpagv.hxx
+++ b/svx/inc/svx/svdpagv.hxx
@@ -181,7 +181,8 @@ public:
// write access to mpPreparedPageWindow
void setPreparedPageWindow(SdrPageWindow* pKnownTarget);
- void DrawLayer(SdrLayerID nID, OutputDevice* pGivenTarget = 0, sdr::contact::ViewObjectContactRedirector* pRedirector = 0L) const;
+ void DrawLayer(SdrLayerID nID, OutputDevice* pGivenTarget = 0, sdr::contact::ViewObjectContactRedirector* pRedirector = 0L,
+ const Rectangle& rRect = Rectangle()) const;
void DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, Color aColor = Color( COL_BLACK ) );
Rectangle GetPageRect() const;
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);
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index ba26ae14f07b..0af0b447774f 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -3122,7 +3122,7 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
const IDocumentDrawModelAccess* pIDDMA = pSh->getIDocumentDrawModelAccess();
pSh->Imp()->PaintLayer( pIDDMA->GetHellId(),
pPrintData,
- aPaintRect,
+ pPage->Frm(),
&aPageBackgrdColor,
(pPage->IsRightToLeft() ? true : false),
&aSwRedirector );
@@ -3166,7 +3166,7 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
// OD 09.12.2002 #103045# - add 4th parameter for horizontal text direction.
pSh->Imp()->PaintLayer( pSh->GetDoc()->GetHeavenId(),
pPrintData,
- aPaintRect,
+ pPage->Frm(),
&aPageBackgrdColor,
(pPage->IsRightToLeft() ? true : false),
&aSwRedirector );
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index 69eb0a336cc2..d38065241422 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -97,7 +97,7 @@ void SwViewImp::UnlockPaint()
void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
SwPrintData const*const pPrintData,
- const SwRect& ,
+ const SwRect& aPaintRect,
const Color* _pPageBackgrdColor,
const bool _bIsPageRightToLeft,
sdr::contact::ViewObjectContactRedirector* pRedirector ) const
@@ -150,7 +150,7 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
SdrView &rSdrView = const_cast< SdrView & >(GetPageView()->GetView());
rSdrView.setHideDraw( !pPrintData->IsPrintDraw() );
}
- GetPageView()->DrawLayer( _nLayerID, pOutDev, pRedirector );
+ GetPageView()->DrawLayer( _nLayerID, pOutDev, pRedirector, aPaintRect.SVRect() );
pOutDev->Pop();
// reset background color of the outliner & default horiz. text dir.