diff options
Diffstat (limited to 'framework/source/fwe/xml/toolboxdocumenthandler.cxx')
-rw-r--r-- | framework/source/fwe/xml/toolboxdocumenthandler.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx index 52926ca2b917..d73445dd847f 100644 --- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx +++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx @@ -630,8 +630,7 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() } } - ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; - Reference< XAttributeList > xList( static_cast<XAttributeList *>(pList) , UNO_QUERY ); + rtl::Reference<::comphelper::AttributeList> pList = new ::comphelper::AttributeList; pList->AddAttribute( ATTRIBUTE_XMLNS_TOOLBAR, m_aAttributeType, @@ -646,7 +645,7 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() m_aAttributeType, aUIName ); - m_xWriteDocumentHandler->startElement( ELEMENT_NS_TOOLBAR, pList ); + m_xWriteDocumentHandler->startElement( ELEMENT_NS_TOOLBAR, pList.get() ); m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); sal_Int32 nItemCount = m_rItemAccess->getCount(); |