diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-07-26 08:45:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-07-26 19:09:18 +0200 |
commit | 7c70afbcc2a2aea243caf6ddac606c15a06fc5f9 (patch) | |
tree | 46fe9dc8b2ce7aad9f25c9ffd762e7beff4a4ae6 /chart2 | |
parent | 70f84abd6379c47db96d81d4b028041daa8c5d24 (diff) |
improve override of Window::Invalidate(*)
rather than having to override 3 different methods, have them override
the ImplInvalidate, which is where the code ends up anywhere.
This already exposes a couple of places that were not overriding all 3
methods.
Change-Id: If76abcf18325b7138ea451fbd0213cd6c7b4daa5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154930
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/inc/ChartWindow.hxx | 4 | ||||
-rw-r--r-- | chart2/source/controller/main/ChartWindow.cxx | 16 |
2 files changed, 3 insertions, 17 deletions
diff --git a/chart2/source/controller/inc/ChartWindow.hxx b/chart2/source/controller/inc/ChartWindow.hxx index 413acd968b22..918805cb3a8a 100644 --- a/chart2/source/controller/inc/ChartWindow.hxx +++ b/chart2/source/controller/inc/ChartWindow.hxx @@ -54,9 +54,7 @@ public: virtual void RequestHelp( const HelpEvent& rHEvt ) override; void ForceInvalidate(); - virtual void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE ) override; - virtual void Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags = InvalidateFlags::NONE ) override; - virtual void Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags = InvalidateFlags::NONE ) override; + virtual void ImplInvalidate( const vcl::Region* rRegion, InvalidateFlags nFlags ) override; /// Notify the LOK client about an invalidated area. virtual void LogicInvalidate( const tools::Rectangle* pRectangle ) override; diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx index 00ea3b4d1e78..60ab7eb0ed2d 100644 --- a/chart2/source/controller/main/ChartWindow.cxx +++ b/chart2/source/controller/main/ChartWindow.cxx @@ -246,23 +246,11 @@ void ChartWindow::ForceInvalidate() { vcl::Window::Invalidate(); } -void ChartWindow::Invalidate( InvalidateFlags nFlags ) +void ChartWindow::ImplInvalidate( const vcl::Region* rRegion, InvalidateFlags nFlags ) { if( m_bInPaint ) // #i101928# superfluous paint calls while entering and editing charts" return; - vcl::Window::Invalidate( nFlags ); -} -void ChartWindow::Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags ) -{ - if( m_bInPaint ) // #i101928# superfluous paint calls while entering and editing charts" - return; - vcl::Window::Invalidate( rRect, nFlags ); -} -void ChartWindow::Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags ) -{ - if( m_bInPaint ) // #i101928# superfluous paint calls while entering and editing charts" - return; - vcl::Window::Invalidate( rRegion, nFlags ); + vcl::Window::ImplInvalidate( rRegion, nFlags ); } void ChartWindow::LogicInvalidate(const tools::Rectangle* pRectangle) |