Kaydet (Commit) 3e5caf40 authored tarafından Miklos Vajna's avatar Miklos Vajna Kaydeden (comit) Andras Timar

SwFlyFrm::Paint: use vcl::RenderContext

Change-Id: Id6bd21deda59a6eecfff39907d967b78b881a1e6
(cherry picked from commit 74768909)
üst 1b7560af
...@@ -4134,9 +4134,8 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw ...@@ -4134,9 +4134,8 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw
SwRect aRect( rRect ); SwRect aRect( rRect );
aRect._Intersection( Frm() ); aRect._Intersection( Frm() );
OutputDevice* pOut = gProp.pSGlobalShell->GetOut(); rRenderContext.Push( PushFlags::CLIPREGION );
pOut->Push( PushFlags::CLIPREGION ); rRenderContext.SetClipRegion();
pOut->SetClipRegion();
const SwPageFrm* pPage = FindPageFrm(); const SwPageFrm* pPage = FindPageFrm();
const SwNoTextFrm *pNoText = Lower() && Lower()->IsNoTextFrm() const SwNoTextFrm *pNoText = Lower() && Lower()->IsNoTextFrm()
...@@ -4239,8 +4238,8 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw ...@@ -4239,8 +4238,8 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw
//one. //one.
// OD 2004-04-23 #116347# // OD 2004-04-23 #116347#
pOut->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR ); rRenderContext.Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
pOut->SetLineColor(); rRenderContext.SetLineColor();
pPage = FindPageFrm(); pPage = FindPageFrm();
...@@ -4263,20 +4262,20 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw ...@@ -4263,20 +4262,20 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw
} }
if ( bContour ) if ( bContour )
{ {
pOut->Push(); rRenderContext.Push();
// #i80822# // #i80822#
// apply clip region under the same conditions, which are // apply clip region under the same conditions, which are
// used in <SwNoTextFrm::Paint(..)> to set the clip region // used in <SwNoTextFrm::Paint(..)> to set the clip region
// for painting the graphic/OLE. Thus, the clip region is // for painting the graphic/OLE. Thus, the clip region is
// also applied for the PDF export. // also applied for the PDF export.
SwViewShell *pSh = getRootFrm()->GetCurrShell(); SwViewShell *pSh = getRootFrm()->GetCurrShell();
if ( !pOut->GetConnectMetaFile() || !pSh || !pSh->GetWin() ) if ( !rRenderContext.GetConnectMetaFile() || !pSh || !pSh->GetWin() )
{ {
pOut->SetClipRegion(vcl::Region(aPoly)); rRenderContext.SetClipRegion(vcl::Region(aPoly));
} }
for ( size_t i = 0; i < aRegion.size(); ++i ) for ( size_t i = 0; i < aRegion.size(); ++i )
PaintBackground( aRegion[i], pPage, rAttrs, false, true ); PaintBackground( aRegion[i], pPage, rAttrs, false, true );
pOut->Pop(); rRenderContext.Pop();
} }
else else
for ( size_t i = 0; i < aRegion.size(); ++i ) for ( size_t i = 0; i < aRegion.size(); ++i )
...@@ -4290,7 +4289,7 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw ...@@ -4290,7 +4289,7 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw
PaintBorder( aTmp, pPage, rAttrs ); PaintBorder( aTmp, pPage, rAttrs );
} }
pOut->Pop(); rRenderContext.Pop();
} }
} }
...@@ -4330,8 +4329,8 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw ...@@ -4330,8 +4329,8 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw
// Add subsidiary lines of fly frame and its lowers // Add subsidiary lines of fly frame and its lowers
RefreshLaySubsidiary( pPage, aRect ); RefreshLaySubsidiary( pPage, aRect );
// paint subsidiary lines of fly frame and its lowers // paint subsidiary lines of fly frame and its lowers
gProp.pSSpecSubsLines->PaintSubsidiary( pOut, NULL, gProp ); gProp.pSSpecSubsLines->PaintSubsidiary( &rRenderContext, NULL, gProp );
gProp.pSSubsLines->PaintSubsidiary( pOut, gProp.pSLines, gProp ); gProp.pSSubsLines->PaintSubsidiary( &rRenderContext, gProp.pSLines, gProp );
if ( !bSubsLineRectsCreated ) if ( !bSubsLineRectsCreated )
// unlock subsidiary lines // unlock subsidiary lines
gProp.pSSubsLines->LockLines( false ); gProp.pSSubsLines->LockLines( false );
...@@ -4355,12 +4354,12 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw ...@@ -4355,12 +4354,12 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw
// OD 19.12.2002 #106318# - first paint lines added by fly frame paint // OD 19.12.2002 #106318# - first paint lines added by fly frame paint
// and then unlock other lines. // and then unlock other lines.
gProp.pSLines->PaintLines( pOut, gProp ); gProp.pSLines->PaintLines( &rRenderContext, gProp );
gProp.pSLines->LockLines( false ); gProp.pSLines->LockLines( false );
// have to paint frame borders added in heaven layer here... // have to paint frame borders added in heaven layer here...
ProcessPrimitives(gProp.pBLines->GetBorderLines_Clear()); ProcessPrimitives(gProp.pBLines->GetBorderLines_Clear());
pOut->Pop(); rRenderContext.Pop();
if ( gProp.pSProgress && pNoText ) if ( gProp.pSProgress && pNoText )
gProp.pSProgress->Reschedule(); gProp.pSProgress->Reschedule();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment