summaryrefslogtreecommitdiff
path: root/vcl/source/gdi
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r--vcl/source/gdi/gdimtf.cxx6
-rw-r--r--vcl/source/gdi/impanmvw.cxx4
-rw-r--r--vcl/source/gdi/virdev.cxx2
3 files changed, 6 insertions, 6 deletions
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index a31f8e768ece..fd7e13bc30df 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -374,7 +374,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos )
// flush output from time to time
if( i++ > nSyncCount )
{
- static_cast<vcl::Window*>( pOut )->Flush();
+ pOut->Flush();
i = 0;
}
}
@@ -392,7 +392,7 @@ bool GDIMetaFile::ImplPlayWithRenderer( OutputDevice* pOut, const Point& rPos, S
Size rDestSize( pOut->LogicToPixel( rLogicDestSize ) );
- const vcl::Window* win = dynamic_cast <vcl::Window*> ( pOut );
+ const vcl::Window* win = pOut ? pOut->GetOwnerWindow() : nullptr;
if (!win)
win = Application::GetActiveTopWindow();
@@ -404,7 +404,7 @@ bool GDIMetaFile::ImplPlayWithRenderer( OutputDevice* pOut, const Point& rPos, S
try
{
- uno::Reference<rendering::XCanvas> xCanvas = win->GetCanvas ();
+ uno::Reference<rendering::XCanvas> xCanvas = win->GetOutDev()->GetCanvas ();
if (!xCanvas.is())
return false;
diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx
index 0091f6878182..b7329c073ef1 100644
--- a/vcl/source/gdi/impanmvw.cxx
+++ b/vcl/source/gdi/impanmvw.cxx
@@ -145,7 +145,7 @@ void ImplAnimView::drawToPos( sal_uLong nPos )
vcl::PaintBufferGuardPtr pGuard;
if (mpRenderContext->GetOutDevType() == OUTDEV_WINDOW)
{
- vcl::Window* pWindow = static_cast<vcl::Window*>(mpRenderContext.get());
+ vcl::Window* pWindow = static_cast<vcl::WindowOutputDevice*>(mpRenderContext.get())->GetOwnerWindow();
pGuard.reset(new vcl::PaintBufferGuard(pWindow->ImplGetWindowImpl()->mpFrameData, pWindow));
pRenderContext = pGuard->GetRenderContext();
}
@@ -177,7 +177,7 @@ void ImplAnimView::draw( sal_uLong nPos, VirtualDevice* pVDev )
vcl::PaintBufferGuardPtr pGuard;
if (!pVDev && mpRenderContext->GetOutDevType() == OUTDEV_WINDOW)
{
- vcl::Window* pWindow = static_cast<vcl::Window*>(mpRenderContext.get());
+ vcl::Window* pWindow = static_cast<vcl::WindowOutputDevice*>(mpRenderContext.get())->GetOwnerWindow();
pGuard.reset(new vcl::PaintBufferGuard(pWindow->ImplGetWindowImpl()->mpFrameData, pWindow));
pRenderContext = pGuard->GetRenderContext();
}
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index 35d7088fee7e..f6b7d443b307 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -137,7 +137,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
ImplSVData* pSVData = ImplGetSVData();
if ( !pOutDev )
- pOutDev = ImplGetDefaultWindow();
+ pOutDev = ImplGetDefaultWindow()->GetOutDev();
if( !pOutDev )
return;