summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-06-25 12:15:41 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-06-26 09:20:56 +0200
commit46a8f3d3652571af0b9772e8bba7ee94f866b626 (patch)
tree77a718822de631cdc9a7680e3ed15ad26696d338 /sw
parent5f6e5910dd96015a33bde81684a11f9cba61be2e (diff)
SwPageFrm::GetHorizontalShadowRect: use vcl::RenderContext
Change-Id: Ife6c7404079aa1ae10d5c2bdbe77629e0689b167 (cherry picked from commit c369f8644c45869cb1d80e5e243e445f5cb8b778)
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/inc/pagefrm.hxx1
-rw-r--r--sw/source/core/layout/paintfrm.cxx10
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 a438dc196f93..8fe70ac9b49a 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -6028,6 +6028,7 @@ bool SwPageFrm::IsLeftShadowNeeded() const
*/
/*static*/ void SwPageFrm::GetHorizontalShadowRect( const SwRect& _rPageRect,
const SwViewShell* _pViewShell,
+ OutputDevice* pRenderContext,
SwRect& _orHorizontalShadowRect,
bool bPaintLeftShadow,
bool bPaintRightShadow,
@@ -6035,9 +6036,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
@@ -6176,7 +6176,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 )
@@ -6385,7 +6385,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);