diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-07-14 20:11:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-07-15 14:59:31 +0200 |
commit | 288b9f7edd26458e3a71aad9f96279ec9ef00931 (patch) | |
tree | 8ecc14057aae7cf28f6f30c2dcba70c9b653c7c8 /svtools | |
parent | c7cd9bec28fbe06b46c4bc24db39d843857ce731 (diff) |
need to set the formatter as early as possible
easiest thing is to distinguish between an external one and a
built-in one and have callers own the external one
Change-Id: Ia14dea81614f7bc7958c5fa11cce928a9a59976a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98790
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/brwbox/ebbcontrols.cxx | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx index 7372d4fe67d6..400f0fb581fe 100644 --- a/svtools/source/brwbox/ebbcontrols.cxx +++ b/svtools/source/brwbox/ebbcontrols.cxx @@ -406,8 +406,6 @@ namespace svt void FormattedControlBase::InitFormattedControlBase() { - if (m_bSpinVariant) - m_xSpinButton->SetFormatter(m_xEntryFormatter.release()); InitEditControlBase(m_bSpinVariant ? m_xSpinButton.get() : m_xEntry.get()); } @@ -418,18 +416,12 @@ namespace svt weld::EntryFormatter& FormattedControlBase::get_formatter() { - if (m_bSpinVariant) - return static_cast<weld::EntryFormatter&>(m_xSpinButton->GetFormatter()); - else - return *m_xEntryFormatter; + return *m_xEntryFormatter; } void FormattedControlBase::dispose() { - if (m_bSpinVariant) - m_xSpinButton->SetFormatter(nullptr); - else - m_xEntryFormatter.reset(); + m_xEntryFormatter.reset(); m_xSpinButton.reset(); m_xEntry.reset(); EditControlBase::dispose(); |