summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-03-11 09:45:39 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-03-11 09:45:43 +0000
commit66fee51115a2174bde47c3af01a7d1fdcf1ef602 (patch)
tree559d8dda6acd5284590591a19b7d3f03e748d180 /comphelper
parent8e94196776e902330c39257f276f995612d9a0f7 (diff)
Resolves: tdf#98418 AttributeList must support XCloneable
regression from commit 8998768a34751d35403678a81464a26835b2230e Date: Sat Feb 6 18:38:32 2016 +0100 Change-Id: I217fb66621505b77b6102954c07ef513e2d4b25e
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/xml/attributelist.cxx18
1 files changed, 15 insertions, 3 deletions
diff --git a/comphelper/source/xml/attributelist.cxx b/comphelper/source/xml/attributelist.cxx
index f196b48ce645..cefede87dfc9 100644
--- a/comphelper/source/xml/attributelist.cxx
+++ b/comphelper/source/xml/attributelist.cxx
@@ -100,15 +100,20 @@ OUString SAL_CALL AttributeList::getValueByName(const OUString& sName) throw( cs
return OUString();
}
-
AttributeList::AttributeList()
+ : m_pImpl(new AttributeList_Impl)
+{
+}
+
+AttributeList::AttributeList(const AttributeList &r)
+ : cppu::WeakImplHelper<XAttributeList, XCloneable>()
+ , m_pImpl(new AttributeList_Impl)
{
- m_pImpl = new AttributeList_Impl;
+ *m_pImpl = *(r.m_pImpl);
}
AttributeList::~AttributeList()
{
- delete m_pImpl;
}
void AttributeList::AddAttribute(const OUString &sName,
@@ -122,6 +127,13 @@ void AttributeList::Clear()
m_pImpl->vecAttribute.clear();
}
+css::uno::Reference< css::util::XCloneable > AttributeList::createClone() throw (css::uno::RuntimeException, std::exception)
+
+{
+ AttributeList *p = new AttributeList( *this );
+ return css::uno::Reference< css::util::XCloneable > ( static_cast<css::util::XCloneable *>(p) );
+}
+
} // namespace comphelper
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */