diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-09-11 22:26:44 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-09-11 22:31:53 +0200 |
commit | 03be785efe589dda77cad28782fbf51ab4049f46 (patch) | |
tree | c807f245e5349c66737ae729a1a9d4776e883c45 /comphelper | |
parent | ee9a98966a4c1388dcf47757eeaa380d47f6a6a2 (diff) |
framework: yet another WeakImplHelper<XPropertySetInfo> dupcliate
There's a very similar comphelper::PropertySetInfo, unfortunately with
an additional mnMemberId on its properties, so convert a little...
Change-Id: I2a5fc0bb0ff6d680d546192b9d09afee6348f218
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; |