Kaydet (Commit) 1d1c0632 authored tarafından Miklos Vajna's avatar Miklos Vajna

SwViewShell::PrtOle2: take a vcl::RenderContext

Change-Id: I0d56649cf322b7769f77ccd99be367cd813570ea
üst f25ee3ce
...@@ -365,7 +365,7 @@ public: ...@@ -365,7 +365,7 @@ public:
// Printing for OLE 2.0. // Printing for OLE 2.0.
static void PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions, static void PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions,
OutputDevice* pOleOut, const Rectangle& rRect ); vcl::RenderContext& rRenderContext, const Rectangle& rRect );
// Fill temporary doc with selected text for Print or PDF export. // Fill temporary doc with selected text for Print or PDF export.
SwDoc * FillPrtDoc( SwDoc* pPrtDoc, const SfxPrinter* pPrt ); SwDoc * FillPrtDoc( SwDoc* pPrtDoc, const SfxPrinter* pPrt );
......
...@@ -583,15 +583,15 @@ bool SwViewShell::PrintOrPDFExport( ...@@ -583,15 +583,15 @@ bool SwViewShell::PrintOrPDFExport(
} }
void SwViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions, void SwViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions,
OutputDevice* pOleOut, const Rectangle& rRect ) vcl::RenderContext& rRenderContext, const Rectangle& rRect )
{ {
// For printing a shell is needed. Either the Doc already has one, than we // For printing a shell is needed. Either the Doc already has one, than we
// create a new view, or it has none, than we create the first view. // create a new view, or it has none, than we create the first view.
SwViewShell *pSh; SwViewShell *pSh;
if( pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() ) if( pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() )
pSh = new SwViewShell( *pDoc->getIDocumentLayoutAccess().GetCurrentViewShell(), 0, pOleOut,VSHELLFLAG_SHARELAYOUT ); pSh = new SwViewShell( *pDoc->getIDocumentLayoutAccess().GetCurrentViewShell(), 0, &rRenderContext,VSHELLFLAG_SHARELAYOUT );
else else
pSh = new SwViewShell( *pDoc, 0, pOpt, pOleOut); pSh = new SwViewShell( *pDoc, 0, pOpt, &rRenderContext);
{ {
SET_CURR_SHELL( pSh ); SET_CURR_SHELL( pSh );
...@@ -614,11 +614,11 @@ void SwViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintD ...@@ -614,11 +614,11 @@ void SwViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintD
// document because the thumbnail creation will not trigger a complete // document because the thumbnail creation will not trigger a complete
// formatting of the document. // formatting of the document.
pOleOut->Push( PushFlags::CLIPREGION ); rRenderContext.Push( PushFlags::CLIPREGION );
pOleOut->IntersectClipRegion( aSwRect.SVRect() ); rRenderContext.IntersectClipRegion( aSwRect.SVRect() );
pSh->GetLayout()->Paint( aSwRect ); pSh->GetLayout()->Paint( aSwRect );
pOleOut->Pop(); rRenderContext.Pop();
// first the CurrShell object needs to be destroyed! // first the CurrShell object needs to be destroyed!
} }
delete pSh; delete pSh;
......
...@@ -831,7 +831,7 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup, ...@@ -831,7 +831,7 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
pDev->SetBackground(); pDev->SetBackground();
const bool bWeb = this->ISA(SwWebDocShell); const bool bWeb = this->ISA(SwWebDocShell);
SwPrintData aOpts; SwPrintData aOpts;
SwViewShell::PrtOle2(m_pDoc, SW_MOD()->GetUsrPref(bWeb), aOpts, pDev, aRect); SwViewShell::PrtOle2(m_pDoc, SW_MOD()->GetUsrPref(bWeb), aOpts, *pDev, aRect);
pDev->Pop(); pDev->Pop();
if( pOrig ) if( pOrig )
......
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