From 67950f00989dff4640ba83e540673375a2c60a13 Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Mon, 15 Jul 2019 19:14:36 +1000 Subject: tdf#74702: vcl add OutputDevice::Flush() to remove GetOutDevType() Change-Id: I3e8775845e471517945876a48696747a46e5270a Reviewed-on: https://gerrit.libreoffice.org/75616 Tested-by: Jenkins Reviewed-by: Michael Meeks --- canvas/source/vcl/canvashelper.cxx | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'canvas') diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx index 47ea98d4b3c4..f423ad5b0318 100644 --- a/canvas/source/vcl/canvashelper.cxx +++ b/canvas/source/vcl/canvashelper.cxx @@ -1158,19 +1158,11 @@ namespace vclcanvas void CanvasHelper::flush() const { - if( mpOutDevProvider && mpOutDevProvider->getOutDev().GetOutDevType() == OUTDEV_WINDOW ) - { - // TODO(Q3): Evil downcast. And what's more, Window::Flush is - // not even const. Wah. - static_cast(mpOutDevProvider->getOutDev()).Flush(); - } + if (mpOutDevProvider) + mpOutDevProvider->getOutDev().Flush(); - if( mp2ndOutDevProvider && mp2ndOutDevProvider->getOutDev().GetOutDevType() == OUTDEV_WINDOW ) - { - // TODO(Q3): Evil downcast. And what's more, Window::Flush is - // not even const. Wah. - static_cast(mp2ndOutDevProvider->getOutDev()).Flush(); - } + if (mp2ndOutDevProvider) + mp2ndOutDevProvider->getOutDev().Flush(); } } -- cgit v1.2.3