diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-02-22 17:03:16 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-02-23 14:28:03 +0000 |
commit | e298885c6f6ab762d307877559ca1453acf7ab46 (patch) | |
tree | 01251c8258d3cccc1737abbd761f79444abd1cd1 /vcl | |
parent | fb79d2001aca24aacb8548c1876744b2cc3520de (diff) |
allow setting ComboBox max-width-chars via properties
Change-Id: I816c2597492d24f81a61c53ad2dc0125075d01c5
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/vcl/combobox.hxx | 2 | ||||
-rw-r--r-- | vcl/source/control/combobox.cxx | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/vcl/inc/vcl/combobox.hxx b/vcl/inc/vcl/combobox.hxx index 1a73983167e4..975828167ac0 100644 --- a/vcl/inc/vcl/combobox.hxx +++ b/vcl/inc/vcl/combobox.hxx @@ -218,6 +218,8 @@ public: sal_Int32 getMaxWidthChars() const { return m_nMaxWidthChars; } void setMaxWidthChars(sal_Int32 nWidth); + + virtual bool set_property(const rtl::OString &rKey, const rtl::OString &rValue); }; #endif // _COMBOBOX_HXX diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index e74d024e9ac6..5f9de77ad49b 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -1558,4 +1558,13 @@ void ComboBox::setMaxWidthChars(sal_Int32 nWidth) } } +bool ComboBox::set_property(const rtl::OString &rKey, const rtl::OString &rValue) +{ + if (rKey == "max-width-chars") + setMaxWidthChars(rValue.toInt32()); + else + return Control::set_property(rKey, rValue); + return true; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |