diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-07-22 16:01:17 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-07-22 20:48:24 +0200 |
commit | 84522fc8798cf0d89835f58f4b335b0045a50bfb (patch) | |
tree | 86ef30cc0104fc8bf6a0ff36f3c8747e4166b65b /sd | |
parent | df8f780cc24410d2fec5c4d4e1ed58d492559241 (diff) |
merge duplicate GetFocus implementations
Change-Id: Ifc2e3fab6dacb3b0bca74c0584c16170b8b97de4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99234
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/dlg/diactrl.cxx | 9 | ||||
-rw-r--r-- | sd/source/ui/dlg/gluectrl.cxx | 9 | ||||
-rw-r--r-- | sd/source/ui/inc/diactrl.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/inc/gluectrl.hxx | 2 |
4 files changed, 4 insertions, 18 deletions
diff --git a/sd/source/ui/dlg/diactrl.cxx b/sd/source/ui/dlg/diactrl.cxx index cbc7590cc9c8..aa4cff712d63 100644 --- a/sd/source/ui/dlg/diactrl.cxx +++ b/sd/source/ui/dlg/diactrl.cxx @@ -53,6 +53,8 @@ SdPagesField::SdPagesField( vcl::Window* pParent, , m_xWidget(m_xBuilder->weld_spin_button("pagesfield")) , m_xFrame(rFrame) { + InitControlBase(m_xWidget.get()); + // set parameter of MetricFields m_xWidget->set_digits(0); m_xWidget->set_range(1, 15); @@ -81,13 +83,6 @@ void SdPagesField::dispose() InterimItemWindow::dispose(); } -void SdPagesField::GetFocus() -{ - if (m_xWidget) - m_xWidget->grab_focus(); - InterimItemWindow::GetFocus(); -} - SdPagesField::~SdPagesField() { disposeOnce(); diff --git a/sd/source/ui/dlg/gluectrl.cxx b/sd/source/ui/dlg/gluectrl.cxx index a52df56c78e6..8e4389dd8983 100644 --- a/sd/source/ui/dlg/gluectrl.cxx +++ b/sd/source/ui/dlg/gluectrl.cxx @@ -54,6 +54,8 @@ GlueEscDirLB::GlueEscDirLB(vcl::Window* pParent, const Reference<XFrame>& rFrame , m_xFrame(rFrame) , m_xWidget(m_xBuilder->weld_combo_box("gluetype")) { + InitControlBase(m_xWidget.get()); + Fill(); m_xWidget->connect_changed(LINK(this, GlueEscDirLB, SelectHdl)); @@ -70,13 +72,6 @@ void GlueEscDirLB::dispose() InterimItemWindow::dispose(); } -void GlueEscDirLB::GetFocus() -{ - if (m_xWidget) - m_xWidget->grab_focus(); - InterimItemWindow::GetFocus(); -} - GlueEscDirLB::~GlueEscDirLB() { disposeOnce(); diff --git a/sd/source/ui/inc/diactrl.hxx b/sd/source/ui/inc/diactrl.hxx index b9a54d62e9d0..dae2ec2def26 100644 --- a/sd/source/ui/inc/diactrl.hxx +++ b/sd/source/ui/inc/diactrl.hxx @@ -45,8 +45,6 @@ public: void set_sensitive(bool bSensitive); virtual ~SdPagesField() override; - virtual void GetFocus() override; - void UpdatePagesField( const SfxUInt16Item* pItem ); }; diff --git a/sd/source/ui/inc/gluectrl.hxx b/sd/source/ui/inc/gluectrl.hxx index 632f37604491..3b837a78b284 100644 --- a/sd/source/ui/inc/gluectrl.hxx +++ b/sd/source/ui/inc/gluectrl.hxx @@ -42,8 +42,6 @@ public: virtual void dispose() override; virtual ~GlueEscDirLB() override; - virtual void GetFocus() override; - void set_active(int nPos) { m_xWidget->set_active(nPos); } void set_sensitive(bool bSensitive); |