diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-09-21 11:39:14 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-09-28 08:48:50 +0100 |
commit | 4799e8d50e5220b85572625f2741a592fd9cf3f8 (patch) | |
tree | 610a9eceb3af2b0fd1dc2e79bead2af78ae17d8a /vcl | |
parent | adda1a25f248586b46682bb9e19cd7a6b2c9debc (diff) |
support "digits" for numericfields
Change-Id: I2ff678621df940dfb7b19c566544bcbc9d1a29bf
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/vcl/field.hxx | 1 | ||||
-rw-r--r-- | vcl/source/control/field.cxx | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/vcl/inc/vcl/field.hxx b/vcl/inc/vcl/field.hxx index fc418df89e12..9db09c168216 100644 --- a/vcl/inc/vcl/field.hxx +++ b/vcl/inc/vcl/field.hxx @@ -529,6 +529,7 @@ public: virtual void Down(); virtual void First(); virtual void Last(); + virtual bool set_property(const rtl::OString &rKey, const rtl::OString &rValue); }; diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index fdb74f6dc7b7..3548f611c80a 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -821,6 +821,15 @@ NumericField::NumericField( Window* pParent, const ResId& rResId ) : Show(); } +bool NumericField::set_property(const rtl::OString &rKey, const rtl::OString &rValue) +{ + if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("digits"))) + SetDecimalDigits(rValue.toInt32()); + else + return SpinField::set_property(rKey, rValue); + return true; +} + // ----------------------------------------------------------------------- void NumericField::ImplLoadRes( const ResId& rResId ) |