summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-06-24 10:51:37 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-06-24 12:34:38 +0200
commit2fb93c6436739dfc8bec1348fad4f263cd625b65 (patch)
treecc8a08801db46aa16bf939280115072659c3594f /sw/source/core
parent07d85c44998f42545175ee77c192b901b52a30ca (diff)
SwFrm::Paint: take a vcl::RenderContext
Change-Id: I530d98a425adb32e2c8e1e4d012130f68f6c90a1
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/doc/notxtfrm.cxx2
-rw-r--r--sw/source/core/draw/dflyobj.cxx2
-rw-r--r--sw/source/core/inc/cellfrm.hxx2
-rw-r--r--sw/source/core/inc/flyfrm.hxx2
-rw-r--r--sw/source/core/inc/frame.hxx2
-rw-r--r--sw/source/core/inc/layfrm.hxx2
-rw-r--r--sw/source/core/inc/notxtfrm.hxx2
-rw-r--r--sw/source/core/inc/rootfrm.hxx2
-rw-r--r--sw/source/core/inc/tabfrm.hxx2
-rw-r--r--sw/source/core/inc/txtfrm.hxx2
-rw-r--r--sw/source/core/layout/paintfrm.cxx22
-rw-r--r--sw/source/core/layout/unusedf.cxx2
-rw-r--r--sw/source/core/text/frmpaint.cxx2
-rw-r--r--sw/source/core/text/porfly.cxx2
-rw-r--r--sw/source/core/view/viewpg.cxx2
-rw-r--r--sw/source/core/view/viewsh.cxx10
-rw-r--r--sw/source/core/view/vprint.cxx4
17 files changed, 32 insertions, 32 deletions
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index c3d62ed4928b..729e950ba1e7 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -215,7 +215,7 @@ static void lcl_ClearArea( const SwFrm &rFrm,
}
}
-void SwNoTextFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
+void SwNoTextFrm::Paint(vcl::RenderContext& /*rRenderContext*/, SwRect const& rRect, SwPrintData const*const) const
{
if ( Frm().IsEmpty() )
return;
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 43ba556daef7..a69ac3da6785 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -483,7 +483,7 @@ void SwVirtFlyDrawObj::wrap_DoPaintObject(
RestoreMapMode aRestoreMapModeIfNeeded( pShell );
// paint the FlyFrame (use standard VCL-Paint)
- pFlyFrm->Paint( GetFlyFrm()->Frm() );
+ pFlyFrm->Paint( *pShell->GetOut(), GetFlyFrm()->Frm() );
}
}
}
diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx
index 21b73c415ac7..efd3796bb177 100644
--- a/sw/source/core/inc/cellfrm.hxx
+++ b/sw/source/core/inc/cellfrm.hxx
@@ -43,7 +43,7 @@ public:
SwCellFrm( const SwTableBox &, SwFrm*, bool bInsertContent = true );
virtual bool GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* = 0, bool bTestBackground = false ) const SAL_OVERRIDE;
- virtual void Paint( SwRect const&,
+ virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&,
SwPrintData const*const pPrintData = NULL ) const SAL_OVERRIDE;
virtual void CheckDirection( bool bVert ) SAL_OVERRIDE;
diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx
index df2edc411cad..59f33dbc112b 100644
--- a/sw/source/core/inc/flyfrm.hxx
+++ b/sw/source/core/inc/flyfrm.hxx
@@ -162,7 +162,7 @@ public:
// get client information
virtual bool GetInfo( SfxPoolItem& ) const SAL_OVERRIDE;
- virtual void Paint( SwRect const&,
+ virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&,
SwPrintData const*const pPrintData = NULL ) const SAL_OVERRIDE;
virtual Size ChgSize( const Size& aNewSize ) SAL_OVERRIDE;
virtual bool GetCrsrOfst( SwPosition *, Point&,
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 8d283f59e23a..2072d40700c5 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -764,7 +764,7 @@ public:
SwCrsrMoveState* = 0, bool bTestBackground = false ) const;
virtual bool GetCharRect( SwRect &, const SwPosition&,
SwCrsrMoveState* = 0 ) const;
- virtual void Paint( SwRect const&,
+ virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&,
SwPrintData const*const pPrintData = NULL ) const;
// HACK: shortcut between frame and formatting
diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx
index e61fbf718a69..b3b0ccb0ff93 100644
--- a/sw/source/core/inc/layfrm.hxx
+++ b/sw/source/core/inc/layfrm.hxx
@@ -104,7 +104,7 @@ public:
SwLayoutFrm( SwFrameFormat*, SwFrm* );
- virtual void Paint( SwRect const&,
+ virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&,
SwPrintData const*const pPrintData = NULL ) const SAL_OVERRIDE;
const SwFrm *Lower() const { return m_pLower; }
SwFrm *Lower() { return m_pLower; }
diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx
index 12a91dd8f917..e0a65c402fe6 100644
--- a/sw/source/core/inc/notxtfrm.hxx
+++ b/sw/source/core/inc/notxtfrm.hxx
@@ -46,7 +46,7 @@ protected:
public:
SwNoTextFrm( SwNoTextNode * const, SwFrm* );
- virtual void Paint( SwRect const&,
+ virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&,
SwPrintData const*const pPrintData = NULL ) const SAL_OVERRIDE;
virtual bool GetCharRect( SwRect &, const SwPosition&,
SwCrsrMoveState* = 0) const SAL_OVERRIDE;
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index fe0d6b0d0840..6a904727200e 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -199,7 +199,7 @@ public:
virtual bool GetCrsrOfst( SwPosition *, Point&,
SwCrsrMoveState* = 0, bool bTestBackground = false ) const SAL_OVERRIDE;
- virtual void Paint( SwRect const&,
+ virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&,
SwPrintData const*const pPrintData = NULL ) const SAL_OVERRIDE;
virtual SwTwips ShrinkFrm( SwTwips, bool bTst = false, bool bInfo = false ) SAL_OVERRIDE;
virtual SwTwips GrowFrm ( SwTwips, bool bTst = false, bool bInfo = false ) SAL_OVERRIDE;
diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx
index c78872bc553a..3f0c935d74a5 100644
--- a/sw/source/core/inc/tabfrm.hxx
+++ b/sw/source/core/inc/tabfrm.hxx
@@ -126,7 +126,7 @@ public:
SwTabFrm* FindMaster( bool bFirstMaster = false ) const;
virtual bool GetInfo( SfxPoolItem &rHint ) const SAL_OVERRIDE;
- virtual void Paint( SwRect const&,
+ virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&,
SwPrintData const*const pPrintData = NULL ) const SAL_OVERRIDE;
virtual void CheckDirection( bool bVert ) SAL_OVERRIDE;
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 7bfa6920dd8d..0ca75914ca2d 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -287,7 +287,7 @@ public:
void PaintExtraData( const SwRect & rRect ) const; /// Page number etc.
SwRect Paint();
- virtual void Paint( SwRect const&,
+ virtual void Paint( vcl::RenderContext& rRenderContext, SwRect const&,
SwPrintData const*const pPrintData = NULL ) const SAL_OVERRIDE;
virtual bool GetInfo( SfxPoolItem & ) const SAL_OVERRIDE;
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 9f1393df1a7f..e81a7cb73783 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -3173,7 +3173,7 @@ namespace
* 3. Paint the document content (text)
* 4. Paint the draw layer that is above the document
|*/
-void SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
+void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const pPrintData) const
{
OSL_ENSURE( Lower() && Lower()->IsPageFrm(), "Lower of root is no page." );
@@ -3389,7 +3389,7 @@ void SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) c
gProp.pSSpecSubsLines->PaintSubsidiary( pSh->GetOut(), NULL, gProp );
}
- pPage->Paint( aPaintRect );
+ pPage->Paint( rRenderContext, aPaintRect );
// no paint of page border and shadow, if writer is in place mode.
if( pSh->GetWin() && pSh->GetDoc()->GetDocShell() &&
@@ -3586,7 +3586,7 @@ SwShortCut::SwShortCut( const SwFrm& rFrm, const SwRect& rRect )
}
}
-void SwLayoutFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
+void SwLayoutFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const
{
SwViewShell *pSh = getRootFrm()->GetCurrShell();
@@ -3670,7 +3670,7 @@ void SwLayoutFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
pFrm->ResetCompletePaint();
aPaintRect._Intersection( rRect );
- pFrm->Paint( aPaintRect );
+ pFrm->Paint( rRenderContext, aPaintRect );
if ( Lower() && Lower()->IsColumnFrm() )
{
@@ -4092,10 +4092,10 @@ bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh )
return bPaint;
}
-void SwCellFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
+void SwCellFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const
{
if ( GetLayoutRowSpan() >= 1 )
- SwLayoutFrm::Paint( rRect );
+ SwLayoutFrm::Paint( rRenderContext, rRect );
}
struct BorderLinesGuard
@@ -4113,7 +4113,7 @@ private:
BorderLines *const m_pBorderLines;
};
-void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
+void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const
{
//optimize thumbnail generation and store procedure to improve odt saving performance, #i120030#
SwViewShell *pShell = getRootFrm()->GetCurrShell();
@@ -4352,7 +4352,7 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
}
}
- SwLayoutFrm::Paint( aRect );
+ SwLayoutFrm::Paint( rRenderContext, aRect );
Validate();
@@ -4369,7 +4369,7 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
gProp.pSProgress->Reschedule();
}
-void SwTabFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
+void SwTabFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const
{
const SwViewOption* pViewOption = gProp.pSGlobalShell->GetViewOptions();
if (pViewOption->IsTable())
@@ -4392,7 +4392,7 @@ void SwTabFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
aHelper.PaintLines(*gProp.pSGlobalShell->GetOut(), rRect);
}
- SwLayoutFrm::Paint( rRect );
+ SwLayoutFrm::Paint( rRenderContext, rRect );
}
// OD 10.01.2003 #i6467# - no light grey rectangle for page preview
else if ( gProp.pSGlobalShell->GetWin() && !gProp.pSGlobalShell->IsPreview() )
@@ -7713,7 +7713,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap )
&aSwRedirector );
gProp.pSLines->PaintLines( pDev, gProp );
if ( pFly->IsFlyInCntFrm() )
- pFly->Paint( aOut );
+ pFly->Paint( *pDev, aOut );
gProp.pSLines->PaintLines( pDev, gProp );
// OD 30.08.2002 #102450# - add 3rd parameter
pImp->PaintLayer( pIDDMA->GetHeavenId(), 0, aOut, &aPageBackgrdColor,
diff --git a/sw/source/core/layout/unusedf.cxx b/sw/source/core/layout/unusedf.cxx
index 3561928d4ac4..a788a58b3c80 100644
--- a/sw/source/core/layout/unusedf.cxx
+++ b/sw/source/core/layout/unusedf.cxx
@@ -26,7 +26,7 @@ void SwFrm::Format( const SwBorderAttrs * )
OSL_FAIL( "Format() of the base class called." );
}
-void SwFrm::Paint(SwRect const&, SwPrintData const*const) const
+void SwFrm::Paint(vcl::RenderContext&, SwRect const&, SwPrintData const*const) const
{
OSL_FAIL( "Paint() of the base class called." );
}
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index 30b1f5195e79..9dad95b5624f 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -573,7 +573,7 @@ bool SwTextFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const
return false;
}
-void SwTextFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
+void SwTextFrm::Paint(vcl::RenderContext& /*rRenderContext*/, SwRect const& rRect, SwPrintData const*const) const
{
ResetRepaint();
diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx
index aefa9d40cb36..ed21ab827124 100644
--- a/sw/source/core/text/porfly.cxx
+++ b/sw/source/core/text/porfly.cxx
@@ -238,7 +238,7 @@ void SwFlyCntPortion::Paint( const SwTextPaintInfo &rInf ) const
// GetFlyFrm() may change the layout mode at the output device.
{
SwLayoutModeModifier aLayoutModeModifier( *rInf.GetOut() );
- GetFlyFrm()->Paint( aRect );
+ GetFlyFrm()->Paint( const_cast<vcl::RenderContext&>(*rInf.GetOut()), aRect );
}
((SwTextPaintInfo&)rInf).GetRefDev()->SetLayoutMode(
rInf.GetOut()->GetLayoutMode() );
diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx
index 7382d6899015..3a3749be97e5 100644
--- a/sw/source/core/view/viewpg.cxx
+++ b/sw/source/core/view/viewpg.cxx
@@ -212,7 +212,7 @@ void SwViewShell::PrintProspect(
aPos -= aShell.maVisArea.Pos();
aMapMode.SetOrigin( aPos );
pPrinter->SetMapMode( aMapMode );
- pStPage->GetUpper()->Paint( pStPage->Frm() );
+ pStPage->GetUpper()->Paint( *pOutDev, pStPage->Frm() );
}
pStPage = pNxtPage;
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 009f6e45c564..739c8983f20b 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -379,7 +379,7 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
mpOut = pVout.get();
if ( bPaintsFromSystem )
PaintDesktop(*mpOut, aRect);
- pCurrentLayout->Paint( aRect );
+ pCurrentLayout->Paint( *mpOut, aRect );
pOld->DrawOutDev( aRect.Pos(), aRect.SSize(),
aRect.Pos(), aRect.SSize(), *pVout );
mpOut = pOld;
@@ -401,7 +401,7 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
if ( bPaintsFromSystem )
PaintDesktop(*GetOut(), aRect);
if (!isTiledRendering())
- pCurrentLayout->Paint( aRect );
+ pCurrentLayout->Paint( *mpOut, aRect );
else
pCurrentLayout->GetCurrShell()->InvalidateWindows(aRect.SVRect());
@@ -1275,7 +1275,7 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect
// SW paint stuff
PaintDesktop(*GetOut(), aRect);
SwViewShell::mbLstAct = true;
- GetLayout()->Paint( aRect );
+ GetLayout()->Paint( *GetOut(), aRect );
SwViewShell::mbLstAct = false;
// end paint and destroy ObjectContact again
@@ -1712,7 +1712,7 @@ void SwViewShell::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rRe
if ( aRect.IsInside( maInvalidRect ) )
ResetInvalidRect();
SwViewShell::mbLstAct = true;
- GetLayout()->Paint( aRect );
+ GetLayout()->Paint( rRenderContext, aRect );
SwViewShell::mbLstAct = false;
}
else
@@ -1733,7 +1733,7 @@ void SwViewShell::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rRe
if ( aRect.IsInside( maInvalidRect ) )
ResetInvalidRect();
SwViewShell::mbLstAct = true;
- GetLayout()->Paint( aRect );
+ GetLayout()->Paint( rRenderContext, aRect );
SwViewShell::mbLstAct = false;
// --> OD 2009-08-12 #i101192#
// end Pre/PostPaint encapsulation
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 3098745c294a..631f69a1c83e 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -533,7 +533,7 @@ bool SwViewShell::PrintOrPDFExport(
::SetSwVisArea( pViewSh2, pStPage->Frm() );
- pStPage->GetUpper()->Paint( pStPage->Frm(), &rPrintData );
+ pStPage->GetUpper()->Paint( *pOutDev, pStPage->Frm(), &rPrintData );
SwPaintQueue::Repaint();
@@ -616,7 +616,7 @@ void SwViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintD
rRenderContext.Push( PushFlags::CLIPREGION );
rRenderContext.IntersectClipRegion( aSwRect.SVRect() );
- pSh->GetLayout()->Paint( aSwRect );
+ pSh->GetLayout()->Paint( rRenderContext, aSwRect );
rRenderContext.Pop();
// first the CurrShell object needs to be destroyed!