diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-07-03 11:36:51 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-07-03 12:46:31 +0100 |
commit | f19cc396580726f9fa1c75a2b6346e2a4827acc2 (patch) | |
tree | 38b89be9930fe59345c5048739bb975b49b76081 /vcl | |
parent | e8f34963459c973d681055d708166d43079b7eb7 (diff) |
metric and numeric boxes should calc optimal size based on legal input range
Change-Id: I8515f71a562caf8332a4eea20dab5636a9343ec6
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/field.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index b491ba53e3d7..7ed2a71addf3 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -940,7 +940,7 @@ void NumericField::Last() namespace { - Size calcMinimumSize(const SpinField &rSpinField, const NumericFormatter &rFormatter) + Size calcMinimumSize(const Edit &rSpinField, const NumericFormatter &rFormatter) { OUStringBuffer aBuf; sal_Int32 nTextLen; @@ -1003,6 +1003,11 @@ NumericBox::NumericBox( Window* pParent, const ResId& rResId ) : Show(); } +Size NumericBox::CalcMinimumSize() const +{ + return calcMinimumSize(*this, *this); +} + // ----------------------------------------------------------------------- NumericBox::~NumericBox() @@ -1935,6 +1940,11 @@ MetricBox::MetricBox( Window* pParent, const ResId& rResId ) : Show(); } +Size MetricBox::CalcMinimumSize() const +{ + return calcMinimumSize(*this, *this); +} + // ----------------------------------------------------------------------- MetricBox::~MetricBox() |