use Deactivate
which is closer to how it was before welding
Change-Id: If43e2109d9c511a3e8f191b7704dc42aa06b7353
Reviewed-on: https://gerrit.libreoffice.org/70858
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx
index d04cbb4..272ad3f 100644
--- a/include/sfx2/basedlgs.hxx
+++ b/include/sfx2/basedlgs.hxx
@@ -110,7 +110,7 @@ public:
// dialog gets focus
virtual void Activate() {}
// dialog loses focus
virtual void DeActivate() {}
virtual void Deactivate() {}
// when the dialog has an associated SfxChildWin, typically for Modeless interaction
virtual void ChildWinDispose() {} // called from the associated SfxChildWin dtor
@@ -141,7 +141,7 @@ public:
virtual void Close() override;
virtual void EndDialog() override;
virtual void Activate() override;
virtual void DeActivate() override;
virtual void Deactivate() override;
virtual void ChildWinDispose() override;
SfxBindings& GetBindings() { return *m_pBindings; }
};
diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx
index 127d18d..2677857 100644
--- a/sc/source/ui/dbgui/consdlg.cxx
+++ b/sc/source/ui/dbgui/consdlg.cxx
@@ -122,14 +122,8 @@ void ScConsolidateDlg::Init()
m_xEdDataArea->SetGetFocusHdl( LINK( this, ScConsolidateDlg, GetEditFocusHdl ) );
m_xEdDestArea->SetGetFocusHdl( LINK( this, ScConsolidateDlg, GetEditFocusHdl ) );
m_xEdDataArea->SetLoseFocusHdl( LINK( this, ScConsolidateDlg, LoseEditFocusHdl ) );
m_xEdDestArea->SetLoseFocusHdl( LINK( this, ScConsolidateDlg, LoseEditFocusHdl ) );
m_xRbDataArea->SetLoseFocusHdl( LINK( this, ScConsolidateDlg, LoseButtonFocusHdl ) );
m_xRbDestArea->SetLoseFocusHdl( LINK( this, ScConsolidateDlg, LoseButtonFocusHdl ) );
m_xLbDataArea->connect_focus_in( LINK( this, ScConsolidateDlg, GetFocusHdl ) );
m_xLbDestArea->connect_focus_in( LINK( this, ScConsolidateDlg, GetFocusHdl ) );
m_xLbDataArea->connect_focus_out( LINK( this, ScConsolidateDlg, LoseFocusHdl ) );
m_xLbDestArea->connect_focus_out( LINK( this, ScConsolidateDlg, LoseFocusHdl ) );
m_xEdDataArea->SetModifyHdl( LINK( this, ScConsolidateDlg, ModifyHdl ) );
m_xEdDestArea->SetModifyHdl( LINK( this, ScConsolidateDlg, ModifyHdl ) );
m_xLbConsAreas->connect_changed( LINK( this, ScConsolidateDlg, SelectTVHdl ) );
@@ -284,19 +278,9 @@ void ScConsolidateDlg::SetActive()
RefInputDone();
}
IMPL_LINK_NOARG(ScConsolidateDlg, LoseFocusHdl, weld::Widget&, void)
void ScConsolidateDlg::Deactivate()
{
bDlgLostFocus = !m_xDialog->has_toplevel_focus();
}
IMPL_LINK_NOARG(ScConsolidateDlg, LoseEditFocusHdl, formula::WeldRefEdit&, void)
{
bDlgLostFocus = !m_xDialog->has_toplevel_focus();
}
IMPL_LINK_NOARG(ScConsolidateDlg, LoseButtonFocusHdl, formula::WeldRefButton&, void)
{
bDlgLostFocus = !m_xDialog->has_toplevel_focus();
bDlgLostFocus = true;
}
bool ScConsolidateDlg::VerifyEdit( formula::WeldRefEdit* pEd )
diff --git a/sc/source/ui/inc/areasdlg.hxx b/sc/source/ui/inc/areasdlg.hxx
index 694e044..f006d3b 100644
--- a/sc/source/ui/inc/areasdlg.hxx
+++ b/sc/source/ui/inc/areasdlg.hxx
@@ -40,6 +40,7 @@ public:
virtual bool IsTableLocked() const override;
virtual void SetActive() override;
virtual void Deactivate() override;
virtual void Close() override;
private:
@@ -83,8 +84,6 @@ private:
DECL_LINK( Impl_ModifyHdl, formula::WeldRefEdit&, void );
DECL_LINK( Impl_BtnHdl, weld::Button&, void );
DECL_LINK( Impl_GetEditFocusHdl, formula::WeldRefEdit&, void );
DECL_LINK( Impl_LoseEditFocusHdl, formula::WeldRefEdit&, void );
DECL_LINK( Impl_LoseButtonFocusHdl, formula::WeldRefButton&, void );
DECL_LINK( Impl_GetFocusHdl, weld::Widget&, void );
};
diff --git a/sc/source/ui/inc/consdlg.hxx b/sc/source/ui/inc/consdlg.hxx
index 673122e..ccb943e 100644
--- a/sc/source/ui/inc/consdlg.hxx
+++ b/sc/source/ui/inc/consdlg.hxx
@@ -43,6 +43,7 @@ public:
virtual void SetActive() override;
virtual void Close() override;
virtual void Deactivate() override;
private:
OUString const aStrUndefined;
@@ -90,10 +91,7 @@ private:
DECL_LINK( OkHdl, weld::Button&, void );
DECL_LINK( ClickHdl, weld::Button&, void );
DECL_LINK( GetFocusHdl, weld::Widget&, void );
DECL_LINK( LoseFocusHdl, weld::Widget&, void );
DECL_LINK( GetEditFocusHdl, formula::WeldRefEdit&, void );
DECL_LINK( LoseEditFocusHdl, formula::WeldRefEdit&, void );
DECL_LINK( LoseButtonFocusHdl, formula::WeldRefButton&, void );
DECL_LINK( ModifyHdl, formula::WeldRefEdit&, void );
DECL_LINK( SelectTVHdl, weld::TreeView&, void );
DECL_LINK( SelectCBHdl, weld::ComboBox&, void );
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index c2da984..e59fc9b 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -210,14 +210,9 @@ void ScPrintAreasDlg::AddRefEntry()
}
}
IMPL_LINK_NOARG(ScPrintAreasDlg, Impl_LoseEditFocusHdl, formula::WeldRefEdit&, void)
void ScPrintAreasDlg::Deactivate()
{
bDlgLostFocus = !m_xDialog->has_toplevel_focus();
}
IMPL_LINK_NOARG(ScPrintAreasDlg, Impl_LoseButtonFocusHdl, formula::WeldRefButton&, void)
{
bDlgLostFocus = !m_xDialog->has_toplevel_focus();
bDlgLostFocus = true;
}
void ScPrintAreasDlg::SetActive()
@@ -250,12 +245,6 @@ void ScPrintAreasDlg::Impl_Reset()
m_xEdPrintArea->SetGetFocusHdl( HDL(Impl_GetEditFocusHdl) );
m_xEdRepeatRow->SetGetFocusHdl( HDL(Impl_GetEditFocusHdl) );
m_xEdRepeatCol->SetGetFocusHdl( HDL(Impl_GetEditFocusHdl) );
m_xEdPrintArea->SetLoseFocusHdl( HDL(Impl_LoseEditFocusHdl) );
m_xEdRepeatRow->SetLoseFocusHdl( HDL(Impl_LoseEditFocusHdl) );
m_xEdRepeatCol->SetLoseFocusHdl( HDL(Impl_LoseEditFocusHdl) );
m_xRbPrintArea->SetLoseFocusHdl( HDL(Impl_LoseButtonFocusHdl) );
m_xRbRepeatRow->SetLoseFocusHdl( HDL(Impl_LoseButtonFocusHdl) );
m_xRbRepeatCol->SetLoseFocusHdl( HDL(Impl_LoseButtonFocusHdl) );
m_xLbPrintArea->connect_focus_in( HDL(Impl_GetFocusHdl) );
m_xLbRepeatRow->connect_focus_in( HDL(Impl_GetFocusHdl) );
m_xLbRepeatCol->connect_focus_in( HDL(Impl_GetFocusHdl) );
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 230b165..c97560e 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -425,10 +425,10 @@ void SfxModelessDialogController::Activate()
IMPL_LINK_NOARG(SfxDialogController, FocusOutHdl, weld::Widget&, void)
{
DeActivate();
Deactivate();
}
void SfxModelessDialogController::DeActivate()
void SfxModelessDialogController::Deactivate()
{
if (!m_xImpl)
return;