From 24bdda09fb2312239be0a791fa71c28022a33d51 Mon Sep 17 00:00:00 2001 From: Lionel Elie Mamane Date: Sun, 21 Apr 2013 07:59:53 +0200 Subject: factorise common code Change-Id: I53ee3b7c99205046b25f437480d26e484ac2c340 --- forms/source/component/ListBox.cxx | 9 +++++++-- forms/source/component/ListBox.hxx | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'forms') diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index 5b75332b090a..e6c6bb32a3ce 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -147,6 +147,11 @@ namespace frm ).getTypes(); } + // stuff common to all constructors + void OListBoxModel::init() + { + startAggregatePropertyListening( PROPERTY_STRINGITEMLIST ); + } DBG_NAME(OListBoxModel); //------------------------------------------------------------------ @@ -166,7 +171,7 @@ namespace frm m_aBoundColumn <<= (sal_Int16)1; initValueProperty( PROPERTY_SELECT_SEQ, PROPERTY_ID_SELECT_SEQ); - startAggregatePropertyListening( PROPERTY_STRINGITEMLIST ); + init(); } //------------------------------------------------------------------ @@ -185,7 +190,7 @@ namespace frm { DBG_CTOR(OListBoxModel,NULL); - startAggregatePropertyListening( PROPERTY_STRINGITEMLIST ); + init(); } //------------------------------------------------------------------ diff --git a/forms/source/component/ListBox.hxx b/forms/source/component/ListBox.hxx index 590a9cbd8577..51cf5a8fc016 100644 --- a/forms/source/component/ListBox.hxx +++ b/forms/source/component/ListBox.hxx @@ -158,6 +158,7 @@ protected: protected: DECLARE_XCLONEABLE(); + void init(); private: void loadData( bool _bForce ); -- cgit