summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2017-12-27 14:02:17 +0900
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-12-27 17:13:55 +0100
commitd77d0d8e2fabc9dfc9eef3e532c31351632fb7b7 (patch)
tree211494cc895674decf26a8e99059f286d9f9a18f /include
parent3b35f1d985d2cd230c0676d01d3f2518acb1e50c (diff)
svtools: Simplify DoubleNumericField with std::unique_ptr
Change-Id: I25df3a06afa5e1eb2fa282f2be2ae1ea69aa0ab5 Reviewed-on: https://gerrit.libreoffice.org/47077 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/svtools/fmtfield.hxx11
1 files changed, 3 insertions, 8 deletions
diff --git a/include/svtools/fmtfield.hxx b/include/svtools/fmtfield.hxx
index e8d794fd76f6..6be6e44c59b0 100644
--- a/include/svtools/fmtfield.hxx
+++ b/include/svtools/fmtfield.hxx
@@ -23,6 +23,7 @@
#include <svtools/svtdllapi.h>
#include <vcl/spinfld.hxx>
#include <svl/zforlist.hxx>
+#include <memory>
namespace validation { class NumberValidator; }
@@ -255,15 +256,9 @@ protected:
class SVT_DLLPUBLIC DoubleNumericField final : public FormattedField
{
public:
- DoubleNumericField(vcl::Window* pParent, WinBits nStyle)
- :FormattedField(pParent, nStyle)
- ,m_pNumberValidator( nullptr )
- {
- ResetConformanceTester();
- }
+ DoubleNumericField(vcl::Window* pParent, WinBits nStyle);
virtual ~DoubleNumericField() override;
- virtual void dispose() override;
private:
virtual bool CheckText(const OUString& sText) const override;
@@ -271,7 +266,7 @@ private:
virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat) override;
void ResetConformanceTester();
- validation::NumberValidator* m_pNumberValidator;
+ std::unique_ptr<validation::NumberValidator> m_pNumberValidator;
};