diff options
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/propacc.cxx | 15 | ||||
-rw-r--r-- | basic/source/inc/propacc.hxx | 3 |
2 files changed, 7 insertions, 11 deletions
diff --git a/basic/source/classes/propacc.cxx b/basic/source/classes/propacc.cxx index 06bba39073d7..4c948c3038af 100644 --- a/basic/source/classes/propacc.cxx +++ b/basic/source/classes/propacc.cxx @@ -54,17 +54,10 @@ Reference< XPropertySetInfo > SbPropertyValues::getPropertySetInfo() // create on demand? if (!m_xInfo.is()) { - uno::Sequence<beans::Property> props(m_aPropVals.size()); - for (size_t n = 0; n < m_aPropVals.size(); ++n) - { - Property &rProp = props.getArray()[n]; - const PropertyValue &rPropVal = m_aPropVals[n]; - rProp.Name = rPropVal.Name; - rProp.Handle = rPropVal.Handle; - rProp.Type = cppu::UnoType<void>::get(); - rProp.Attributes = 0; - } - m_xInfo.set(new ::comphelper::PropertySetInfo(props)); + assert(m_aPropInfos.empty()); + for (auto const& it : m_aPropVals) + m_aPropInfos.emplace_back(it.Name, it.Handle, cppu::UnoType<void>::get(), 0, 0); + m_xInfo.set(new ::comphelper::PropertySetInfo(m_aPropInfos)); } return m_xInfo; } diff --git a/basic/source/inc/propacc.hxx b/basic/source/inc/propacc.hxx index 66dd26cefe63..bb2d13d50216 100644 --- a/basic/source/inc/propacc.hxx +++ b/basic/source/inc/propacc.hxx @@ -22,11 +22,13 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertySetInfo.hpp> #include <com/sun/star/beans/XPropertyAccess.hpp> +#include <comphelper/propertysetinfo.hxx> #include <cppuhelper/implbase.hxx> #include <vector> typedef std::vector<css::beans::PropertyValue> SbPropertyValueArr_Impl; +typedef std::vector<comphelper::PropertyMapEntry> SbPropertyInfoArr_Impl; typedef ::cppu::WeakImplHelper< css::beans::XPropertySet, css::beans::XPropertyAccess > SbPropertyValuesHelper; @@ -35,6 +37,7 @@ typedef ::cppu::WeakImplHelper< css::beans::XPropertySet, class SbPropertyValues final : public SbPropertyValuesHelper { SbPropertyValueArr_Impl m_aPropVals; + SbPropertyInfoArr_Impl m_aPropInfos; css::uno::Reference< css::beans::XPropertySetInfo > m_xInfo; private: |