diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 7c757e4d19ca..42f0f9dd85eb 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3286,6 +3286,12 @@ void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& if ( pSh->Imp()->HasDrawView() ) { + if (comphelper::LibreOfficeKit::isTiledPainting()) + { + rRenderContext.Push( vcl::PushFlags::CLIPREGION ); + rRenderContext.SetClipRegion(vcl::Region(aPaintRect.SVRect())); + } + gProp.pSLines->LockLines( true ); const IDocumentDrawModelAccess& rIDDMA = pSh->getIDocumentDrawModelAccess(); pSh->Imp()->PaintLayer( rIDDMA.GetHellId(), @@ -3296,6 +3302,11 @@ void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& &aSwRedirector ); gProp.pSLines->PaintLines( pSh->GetOut(), gProp ); gProp.pSLines->LockLines( false ); + + if (comphelper::LibreOfficeKit::isTiledPainting()) + { + rRenderContext.Pop(); + } } if ( pSh->GetDoc()->GetDocumentSettingManager().get( DocumentSettingId::BACKGROUND_PARA_OVER_DRAWINGS ) ) @@ -3333,12 +3344,22 @@ void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& if ( pSh->Imp()->HasDrawView() ) { + if (comphelper::LibreOfficeKit::isTiledPainting()) + { + rRenderContext.Push( vcl::PushFlags::CLIPREGION ); + rRenderContext.SetClipRegion(vcl::Region(aPaintRect.SVRect())); + } + pSh->Imp()->PaintLayer( pSh->GetDoc()->getIDocumentDrawModelAccess().GetHeavenId(), pPrintData, *pPage, pPage->getFrameArea(), &aPageBackgrdColor, pPage->IsRightToLeft(), &aSwRedirector ); + if (comphelper::LibreOfficeKit::isTiledPainting()) + { + rRenderContext.Pop(); + } } if ( bExtraData )