From f6e7ff90718f7991bce6c642b9baef707e561ea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 23 Apr 2020 12:22:14 +0100 Subject: [PATCH] LoseFocus incorrectly calling notifyFocusGet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit looks like a cut and paste error from initial checkin Change-Id: I816ad85c564b0ca31833da17bbe760101ed3231d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92757 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- framework/inc/uielement/spinfieldtoolbarcontroller.hxx | 1 + .../source/uielement/spinfieldtoolbarcontroller.cxx | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/framework/inc/uielement/spinfieldtoolbarcontroller.hxx b/framework/inc/uielement/spinfieldtoolbarcontroller.hxx index bcf710fb24f3..8445110b896b 100644 --- a/framework/inc/uielement/spinfieldtoolbarcontroller.hxx +++ b/framework/inc/uielement/spinfieldtoolbarcontroller.hxx @@ -55,6 +55,7 @@ class SpinfieldToolbarController final : public ComplexToolbarController void Last(); void Modify(); void GetFocus(); + void LoseFocus(); bool PreNotify( NotifyEvent const & rNEvt ); private: diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx index 0f329d9681ec..684c5b419f1f 100644 --- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx +++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx @@ -127,9 +127,9 @@ void SpinfieldControl::GetFocus() void SpinfieldControl::LoseFocus() { - SpinField::GetFocus(); + SpinField::LoseFocus(); if ( m_pSpinfieldToolbarController ) - m_pSpinfieldToolbarController->GetFocus(); + m_pSpinfieldToolbarController->LoseFocus(); } bool SpinfieldControl::PreNotify( NotifyEvent& rNEvt ) @@ -261,6 +261,11 @@ void SpinfieldToolbarController::GetFocus() notifyFocusGet(); } +void SpinfieldToolbarController::LoseFocus() +{ + notifyFocusLost(); +} + bool SpinfieldToolbarController::PreNotify( NotifyEvent const & rNEvt ) { if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )