summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-09-21 11:39:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-09-28 08:48:50 +0100
commit4799e8d50e5220b85572625f2741a592fd9cf3f8 (patch)
tree610a9eceb3af2b0fd1dc2e79bead2af78ae17d8a /vcl
parentadda1a25f248586b46682bb9e19cd7a6b2c9debc (diff)
support "digits" for numericfields
Change-Id: I2ff678621df940dfb7b19c566544bcbc9d1a29bf
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/vcl/field.hxx1
-rw-r--r--vcl/source/control/field.cxx9
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 )