[Libreoffice-commits] core.git: canvas/source include/vcl starmath/inc
Chris Sherlock (via logerrit)
logerrit at kemper.freedesktop.org
Sat Jul 27 13:24:37 UTC 2019
canvas/source/vcl/canvashelper.cxx | 16 ++++------------
include/vcl/outdev.hxx | 1 +
include/vcl/window.hxx | 2 +-
starmath/inc/edit.hxx | 2 +-
4 files changed, 7 insertions(+), 14 deletions(-)
New commits:
commit 67950f00989dff4640ba83e540673375a2c60a13
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
AuthorDate: Mon Jul 15 19:14:36 2019 +1000
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Sat Jul 27 15:23:30 2019 +0200
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 at collabora.com>
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<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 b18150cefd38..3151abbe1e9c 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 e1a91e9e1e35..bdc4ea3d0019 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 45d130b0c658..2c732cccaa70 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);
More information about the Libreoffice-commits
mailing list