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 /include | |
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 'include')
-rw-r--r-- | include/vcl/toolkit/fmtfield.hxx | 3 | ||||
-rw-r--r-- | include/vcl/weld.hxx | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/vcl/toolkit/fmtfield.hxx b/include/vcl/toolkit/fmtfield.hxx index af2be6bd741f..4ba668bc7994 100644 --- a/include/vcl/toolkit/fmtfield.hxx +++ b/include/vcl/toolkit/fmtfield.hxx @@ -56,7 +56,8 @@ public: void SetFormatter(Formatter* pFormatter); protected: - std::unique_ptr<Formatter> m_xFormatter; + std::unique_ptr<Formatter> m_xOwnFormatter; + Formatter* m_pFormatter; virtual bool EventNotify(NotifyEvent& rNEvt) override; virtual void Modify() override; diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index e0f274b50c04..0d8b702e5f20 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -1619,6 +1619,8 @@ protected: public: virtual Formatter& GetFormatter() = 0; + // does not take ownership, and so must be deregistered if pFormatter + // is destroyed virtual void SetFormatter(weld::EntryFormatter* pFormatter) = 0; void connect_value_changed(const Link<FormattedSpinButton&, void>& rLink) |