diff options
Diffstat (limited to 'vcl/source/gdi/gdimtf.cxx')
-rw-r--r-- | vcl/source/gdi/gdimtf.cxx | 6 |
1 files changed, 3 insertions, 3 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; |