From 03be785efe589dda77cad28782fbf51ab4049f46 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 11 Sep 2015 22:26:44 +0200 Subject: framework: yet another WeakImplHelper dupcliate There's a very similar comphelper::PropertySetInfo, unfortunately with an additional mnMemberId on its properties, so convert a little... Change-Id: I2a5fc0bb0ff6d680d546192b9d09afee6348f218 --- comphelper/source/property/propertysetinfo.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'comphelper') 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 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; -- cgit