diff --git a/include/sax/fastattribs.hxx b/include/sax/fastattribs.hxx index a9bb67e62841..e00452b0aa14 100644 --- a/include/sax/fastattribs.hxx +++ b/include/sax/fastattribs.hxx @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -69,7 +70,7 @@ class SAX_DLLPUBLIC FastTokenHandlerBase : }; -class SAX_DLLPUBLIC FastAttributeList final : public cppu::WeakImplHelper< css::xml::sax::XFastAttributeList > +class SAX_DLLPUBLIC FastAttributeList final : public cppu::WeakImplHelper< css::xml::sax::XFastAttributeList, css::util::XCloneable > { public: FastAttributeList( FastTokenHandlerBase *pTokenHandler ); @@ -113,6 +114,9 @@ public: virtual css::uno::Sequence< css::xml::Attribute > SAL_CALL getUnknownAttributes( ) override; virtual css::uno::Sequence< css::xml::FastAttribute > SAL_CALL getFastAttributes() override; + // XCloneable + virtual ::css::uno::Reference< ::css::util::XCloneable > SAL_CALL createClone() override; + sal_Int32 getAttributeIndex( ::sal_Int32 Token ) { for (size_t i=0; i FastAttributeList::createClone() +{ + return new FastAttributeList(this); +} FastAttributeList::~FastAttributeList() { diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index 3ebd9b765a95..1fac083e463c 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -1763,11 +1763,8 @@ namespace xmloff OSL_ENSURE(!m_xOwnAttributes.is(), "OColumnWrapperImport::StartElement: already have the cloned list!"); // clone the attributes - Reference< XCloneable > xCloneList(_rxAttrList, UNO_QUERY); - OSL_ENSURE(xCloneList.is(), "OColumnWrapperImport::StartElement: AttributeList not clonable!"); - if ( xCloneList.is() ) - m_xOwnAttributes.set(xCloneList->createClone(), UNO_QUERY); - OSL_ENSURE(m_xOwnAttributes.is(), "OColumnWrapperImport::StartElement: no cloned list!"); + Reference< XCloneable > xCloneList(_rxAttrList, UNO_QUERY_THROW); + m_xOwnAttributes.set(xCloneList->createClone(), UNO_QUERY_THROW); } OControlImport* OColumnWrapperImport::implCreateChildContext(