diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-25 12:15:41 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-25 14:15:00 +0200 |
commit | c369f8644c45869cb1d80e5e243e445f5cb8b778 (patch) | |
tree | 8bd82e5294e10de0a75629080659c84cf25a0748 /sw | |
parent | cec17a4659389c5fe3a97c144d541c6aedc64d3f (diff) |
SwPageFrm::GetHorizontalShadowRect: use vcl::RenderContext
Change-Id: Ife6c7404079aa1ae10d5c2bdbe77629e0689b167
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/inc/pagefrm.hxx | 1 | ||||
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 10 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sw/source/core/inc/pagefrm.hxx b/sw/source/core/inc/pagefrm.hxx index 5b4f87d069e1..99097a9846cd 100644 --- a/sw/source/core/inc/pagefrm.hxx +++ b/sw/source/core/inc/pagefrm.hxx @@ -96,6 +96,7 @@ class SwPageFrm: public SwFootnoteBossFrm static void GetHorizontalShadowRect( const SwRect& _rPageRect, const SwViewShell* _pViewShell, + OutputDevice* pRenderContext, SwRect& _orBottomShadowRect, bool bPaintLeftShadow, bool bPaintRightShadow, diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 6984d8c56c76..6587b9019f8c 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -6029,6 +6029,7 @@ bool SwPageFrm::IsLeftShadowNeeded() const */ /*static*/ void SwPageFrm::GetHorizontalShadowRect( const SwRect& _rPageRect, const SwViewShell* _pViewShell, + OutputDevice* pRenderContext, SwRect& _orHorizontalShadowRect, bool bPaintLeftShadow, bool bPaintRightShadow, @@ -6036,9 +6037,8 @@ bool SwPageFrm::IsLeftShadowNeeded() const { const SwPostItMgr *pMgr = _pViewShell->GetPostItMgr(); SwRect aAlignedPageRect( _rPageRect ); - ::SwAlignRect( aAlignedPageRect, _pViewShell, _pViewShell->GetOut() ); - SwRect aPagePxRect = - _pViewShell->GetOut()->LogicToPixel( aAlignedPageRect.SVRect() ); + ::SwAlignRect( aAlignedPageRect, _pViewShell, pRenderContext ); + SwRect aPagePxRect = pRenderContext->LogicToPixel( aAlignedPageRect.SVRect() ); long lShadowAdjustment = mnShadowPxWidth - 1; // TODO: extract this @@ -6177,7 +6177,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin SwRect aPaintRect; OutputDevice *pOut = _pViewShell->GetOut(); - SwPageFrm::GetHorizontalShadowRect( _rPageRect, _pViewShell, aPaintRect, bPaintLeftShadow, bPaintRightShadow, bRightSidebar ); + SwPageFrm::GetHorizontalShadowRect( _rPageRect, _pViewShell, pOut, aPaintRect, bPaintLeftShadow, bPaintRightShadow, bRightSidebar ); // Right shadow & corners if ( bPaintRightShadow ) @@ -6386,7 +6386,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin // Always ask for full shadow since we want a bounding rect // including at least the page frame - SwPageFrm::GetHorizontalShadowRect( _rPageRect, _pViewShell, aTmpRect, false, false, bRightSidebar ); + SwPageFrm::GetHorizontalShadowRect( _rPageRect, _pViewShell, pRenderContext, aTmpRect, false, false, bRightSidebar ); if(bLeftShadow) aPagePxRect.Left( aTmpRect.Left() - mnShadowPxWidth - 1); if(bRightShadow) aPagePxRect.Right( aTmpRect.Right() + mnShadowPxWidth + 1); |