diff options
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/property/propertysetinfo.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/comphelper/source/property/propertysetinfo.cxx b/comphelper/source/property/propertysetinfo.cxx index 4791b3cb73d7..90985f24854b 100644 --- a/comphelper/source/property/propertysetinfo.cxx +++ b/comphelper/source/property/propertysetinfo.cxx @@ -143,6 +143,24 @@ PropertySetInfo::PropertySetInfo( PropertyMapEntry const * pMap ) throw() mpMap->add( pMap ); } +PropertySetInfo::PropertySetInfo(uno::Sequence<beans::Property> const& rProps) throw() + : mpMap(new PropertyMapImpl) +{ + PropertyMapEntry * pEntries(new PropertyMapEntry[rProps.getLength() + 1]); + PropertyMapEntry * pEntry(&pEntries[0]); + for (auto const& it : rProps) + { + pEntry->maName = it.Name; + pEntry->mnHandle = it.Handle; + pEntry->maType = it.Type; + pEntry->mnAttributes = it.Attributes; + pEntry->mnMemberId = 0; + ++pEntry; + } + pEntry->maName = OUString(); + mpMap->add(pEntries); +} + PropertySetInfo::~PropertySetInfo() throw() { delete mpMap; |