From bbf267835f5619ba4d65e12e49327ef11300d182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 1 Jun 2011 12:17:55 +0100 Subject: overly static --- comphelper/source/property/propstate.cxx | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/property/propstate.cxx b/comphelper/source/property/propstate.cxx index b58bdb6d0283..ec621cb43833 100644 --- a/comphelper/source/property/propstate.cxx +++ b/comphelper/source/property/propstate.cxx @@ -68,18 +68,14 @@ namespace comphelper //--------------------------------------------------------------------- ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> OPropertyStateHelper::getTypes() throw( ::com::sun::star::uno::RuntimeException) { - static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> aTypes; - if (!aTypes.getLength()) - { - aTypes.realloc(4); - ::com::sun::star::uno::Type* pTypes = aTypes.getArray(); - // base class types - pTypes[0] = getCppuType(( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>*)NULL); - pTypes[1] = getCppuType(( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet>*)NULL); - pTypes[2] = getCppuType(( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet>*)NULL); - // my own type - pTypes[3] = getCppuType(( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState>*)NULL); - } + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> aTypes(4); + ::com::sun::star::uno::Type* pTypes = aTypes.getArray(); + // base class types + pTypes[0] = getCppuType(( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>*)NULL); + pTypes[1] = getCppuType(( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet>*)NULL); + pTypes[2] = getCppuType(( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet>*)NULL); + // my own type + pTypes[3] = getCppuType(( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState>*)NULL); return aTypes; } -- cgit v1.2.1