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 <michael.meeks@collabora.com>
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index 47ea98d4..f423ad5 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<vcl::Window&>(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<vcl::Window&>(mp2ndOutDevProvider->getOutDev()).Flush();
}
if (mp2ndOutDevProvider)
mp2ndOutDevProvider->getOutDev().Flush();
}
}
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index b18150c..3151abb 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -539,6 +539,7 @@ public:
///@{
public:
virtual void Flush() {}
virtual void DrawOutDev(
const Point& rDestPt, const Size& rDestSize,
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index e1a91e9..bdc4ea3 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1063,7 +1063,7 @@ public:
void Validate();
bool HasPaintEvent() const;
void Update();
void Flush();
void Flush() override;
// toggles new docking support, enabled via toolkit
void EnableDocking( bool bEnable = true );
diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx
index 45d130b..2c732cc 100644
--- a/starmath/inc/edit.hxx
+++ b/starmath/inc/edit.hxx
@@ -115,7 +115,7 @@ public:
void SelPrevMark();
static bool HasMark(const OUString &rText);
void Flush();
void Flush() override;
void DeleteEditView();
bool HandleWheelCommands(const CommandEvent& rCEvt);