diff options
Diffstat (limited to 'xmloff')
25 files changed, 36 insertions, 36 deletions
diff --git a/xmloff/source/transform/ChartOASISTContext.cxx b/xmloff/source/transform/ChartOASISTContext.cxx index fbe2c70726da..314de40318d2 100644 --- a/xmloff/source/transform/ChartOASISTContext.cxx +++ b/xmloff/source/transform/ChartOASISTContext.cxx @@ -50,7 +50,7 @@ void XMLChartOASISTransformerContext::StartElement( OUString aAddInName; Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = nullptr; + rtl::Reference<XMLMutableAttributeList> pMutableAttrList; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { diff --git a/xmloff/source/transform/ChartOOoTContext.cxx b/xmloff/source/transform/ChartOOoTContext.cxx index dcbd495031cd..781cb3764c8e 100644 --- a/xmloff/source/transform/ChartOOoTContext.cxx +++ b/xmloff/source/transform/ChartOOoTContext.cxx @@ -51,7 +51,7 @@ void XMLChartOOoTransformerContext::StartElement( sal_Int16 nClassName = -1; OUString aAddInName; Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = nullptr; + rtl::Reference<XMLMutableAttributeList> pMutableAttrList; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { diff --git a/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx b/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx index b14457047411..b8603f62fd59 100644 --- a/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx +++ b/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx @@ -95,7 +95,7 @@ void XMLAxisOASISContext::StartElement( const Reference< xml::sax::XAttributeList >& rAttrList ) { Reference< xml::sax::XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = nullptr; + rtl::Reference<XMLMutableAttributeList> pMutableAttrList; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { @@ -157,7 +157,7 @@ void XMLAxisOASISContext::EndElement() m_rCategoriesContext.is() ) { OSL_ENSURE( GetAttrList().is(), "Invalid attribute list" ); - XMLMutableAttributeList * pMutableAttrList = + rtl::Reference<XMLMutableAttributeList> pMutableAttrList = new XMLMutableAttributeList( GetAttrList()); OUString aAttrQName( GetTransformer().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_CHART, GetXMLToken( XML_CLASS ))); diff --git a/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx b/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx index a16945f3f612..f2781a25aa62 100644 --- a/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx +++ b/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx @@ -57,7 +57,7 @@ void XMLAxisOOoContext::StartElement( const Reference< xml::sax::XAttributeList >& rAttrList ) { Reference< xml::sax::XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = nullptr; + rtl::Reference<XMLMutableAttributeList> pMutableAttrList; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { diff --git a/xmloff/source/transform/ControlOASISTContext.cxx b/xmloff/source/transform/ControlOASISTContext.cxx index 552553e54533..5dd2067c7af7 100644 --- a/xmloff/source/transform/ControlOASISTContext.cxx +++ b/xmloff/source/transform/ControlOASISTContext.cxx @@ -51,7 +51,7 @@ void XMLControlOASISTransformerContext::StartElement( OSL_ENSURE( pActions, "go no actions" ); Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = nullptr; + rtl::Reference<XMLMutableAttributeList> pMutableAttrList; // GetTransformer().ProcessAttrList( xAttrList, OOO_SHAPE_ACTIONS, // sal_True ); diff --git a/xmloff/source/transform/CreateElemTContext.cxx b/xmloff/source/transform/CreateElemTContext.cxx index c22b86ef2b4c..218852972799 100644 --- a/xmloff/source/transform/CreateElemTContext.cxx +++ b/xmloff/source/transform/CreateElemTContext.cxx @@ -50,7 +50,7 @@ void XMLCreateElemTransformerContext::StartElement( std::vector<rtl::Reference<XMLTransformerContext>> aChildContexts; - XMLMutableAttributeList *pMutableAttrList = nullptr; + rtl::Reference<XMLMutableAttributeList> pMutableAttrList; XMLTransformerActions *pActions = GetTransformer().GetUserDefinedActions( m_nActionMap ); OSL_ENSURE( pActions, "go no actions" ); diff --git a/xmloff/source/transform/DlgOASISTContext.cxx b/xmloff/source/transform/DlgOASISTContext.cxx index 03578dc4584e..24b8a868ed49 100644 --- a/xmloff/source/transform/DlgOASISTContext.cxx +++ b/xmloff/source/transform/DlgOASISTContext.cxx @@ -48,7 +48,7 @@ void XMLDlgOASISTransformerContext::StartElement( OSL_ENSURE( pActions, "go no actions" ); Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = nullptr; + rtl::Reference<XMLMutableAttributeList> pMutableAttrList; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) diff --git a/xmloff/source/transform/DocumentTContext.cxx b/xmloff/source/transform/DocumentTContext.cxx index f75a00c94ed8..894146897af7 100644 --- a/xmloff/source/transform/DocumentTContext.cxx +++ b/xmloff/source/transform/DocumentTContext.cxx @@ -51,7 +51,7 @@ void XMLDocumentTransformerContext::StartElement( const Reference< XAttributeLis GetTransformer().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_OFFICE, GetXMLToken(XML_CLASS ) ) ); - XMLMutableAttributeList *pMutableAttrList = nullptr; + rtl::Reference<XMLMutableAttributeList> pMutableAttrList; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { diff --git a/xmloff/source/transform/EventOASISTContext.cxx b/xmloff/source/transform/EventOASISTContext.cxx index be021572e521..21e3476ef8da 100644 --- a/xmloff/source/transform/EventOASISTContext.cxx +++ b/xmloff/source/transform/EventOASISTContext.cxx @@ -173,7 +173,7 @@ void XMLEventOASISTransformerContext::StartElement( SAL_WARN_IF( pActions == nullptr, "xmloff.transform", "got no actions" ); Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = nullptr; + rtl::Reference<XMLMutableAttributeList> pMutableAttrList; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { diff --git a/xmloff/source/transform/EventOOoTContext.cxx b/xmloff/source/transform/EventOOoTContext.cxx index 71566a3466e0..1611e6b7a10f 100644 --- a/xmloff/source/transform/EventOOoTContext.cxx +++ b/xmloff/source/transform/EventOOoTContext.cxx @@ -134,7 +134,7 @@ void XMLEventOOoTransformerContext::StartElement( OUString aLocation, aMacroName; sal_Int16 nMacroName = -1; Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = nullptr; + rtl::Reference<XMLMutableAttributeList> pMutableAttrList; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { diff --git a/xmloff/source/transform/FormPropOASISTContext.cxx b/xmloff/source/transform/FormPropOASISTContext.cxx index 09ab09a0e37a..6b29f0da9816 100644 --- a/xmloff/source/transform/FormPropOASISTContext.cxx +++ b/xmloff/source/transform/FormPropOASISTContext.cxx @@ -104,7 +104,7 @@ void XMLFormPropOASISTransformerContext::StartElement( GetTransformer().GetUserDefinedActions( OASIS_FORM_PROP_ACTIONS ); OSL_ENSURE( pActions, "go no actions" ); - XMLMutableAttributeList *pMutableAttrList = + rtl::Reference<XMLMutableAttributeList> pMutableAttrList = new XMLMutableAttributeList( rAttrList ); Reference< XAttributeList > xAttrList( pMutableAttrList ); diff --git a/xmloff/source/transform/FormPropOOoTContext.cxx b/xmloff/source/transform/FormPropOOoTContext.cxx index 13d289ca89b8..1f5c6086dbfa 100644 --- a/xmloff/source/transform/FormPropOOoTContext.cxx +++ b/xmloff/source/transform/FormPropOOoTContext.cxx @@ -149,7 +149,7 @@ void XMLFormPropOOoTransformerContext::StartElement( GetTransformer().GetUserDefinedActions( OOO_FORM_PROP_ACTIONS ); OSL_ENSURE( pActions, "go no actions" ); - XMLMutableAttributeList *pMutableAttrList = + rtl::Reference<XMLMutableAttributeList> pMutableAttrList = new XMLMutableAttributeList( rAttrList, true ); m_xAttrList = pMutableAttrList; diff --git a/xmloff/source/transform/FrameOOoTContext.cxx b/xmloff/source/transform/FrameOOoTContext.cxx index cb60b528384e..a8cbd5a8fbfa 100644 --- a/xmloff/source/transform/FrameOOoTContext.cxx +++ b/xmloff/source/transform/FrameOOoTContext.cxx @@ -50,14 +50,14 @@ void XMLFrameOOoTransformerContext::StartElement( OSL_ENSURE( pActions, "go no actions" ); Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = + rtl::Reference<XMLMutableAttributeList> pMutableAttrList = GetTransformer().ProcessAttrList( xAttrList, OOO_SHAPE_ACTIONS, true ); if( !pMutableAttrList ) pMutableAttrList = new XMLMutableAttributeList( rAttrList ); xAttrList = pMutableAttrList; - XMLMutableAttributeList *pFrameMutableAttrList = + rtl::Reference<XMLMutableAttributeList> pFrameMutableAttrList = new XMLMutableAttributeList; Reference< XAttributeList > xFrameAttrList( pFrameMutableAttrList ); diff --git a/xmloff/source/transform/MergeElemTContext.cxx b/xmloff/source/transform/MergeElemTContext.cxx index 4beb2e016fe1..e853240f9e24 100644 --- a/xmloff/source/transform/MergeElemTContext.cxx +++ b/xmloff/source/transform/MergeElemTContext.cxx @@ -125,7 +125,7 @@ XMLMergeElemTransformerContext::XMLMergeElemTransformerContext( void XMLMergeElemTransformerContext::StartElement( const Reference< XAttributeList >& rAttrList ) { - XMLMutableAttributeList *pMutableAttrList = + rtl::Reference<XMLMutableAttributeList> pMutableAttrList = new XMLMutableAttributeList( rAttrList, true ); m_xAttrList = pMutableAttrList; diff --git a/xmloff/source/transform/MutableAttrList.cxx b/xmloff/source/transform/MutableAttrList.cxx index 622abc3fa168..abf19c69a2bc 100644 --- a/xmloff/source/transform/MutableAttrList.cxx +++ b/xmloff/source/transform/MutableAttrList.cxx @@ -34,7 +34,7 @@ SvXMLAttributeList *XMLMutableAttributeList::GetMutableAttrList() m_xAttrList = m_pMutableAttrList; } - return m_pMutableAttrList; + return m_pMutableAttrList.get(); } XMLMutableAttributeList::XMLMutableAttributeList() : @@ -45,8 +45,7 @@ XMLMutableAttributeList::XMLMutableAttributeList() : XMLMutableAttributeList::XMLMutableAttributeList( const Reference< XAttributeList> & rAttrList, bool bClone ) : - m_xAttrList( rAttrList.is() ? rAttrList : new SvXMLAttributeList ), - m_pMutableAttrList( nullptr ) + m_xAttrList( rAttrList.is() ? rAttrList : new SvXMLAttributeList ) { if( bClone ) GetMutableAttrList(); diff --git a/xmloff/source/transform/MutableAttrList.hxx b/xmloff/source/transform/MutableAttrList.hxx index ed8950042bee..c47720b2d2dd 100644 --- a/xmloff/source/transform/MutableAttrList.hxx +++ b/xmloff/source/transform/MutableAttrList.hxx @@ -25,6 +25,7 @@ #include <com/sun/star/lang/XUnoTunnel.hpp> #include <cppuhelper/implbase.hxx> +#include <rtl/ref.hxx> class SvXMLAttributeList; @@ -35,7 +36,7 @@ class XMLMutableAttributeList : public ::cppu::WeakImplHelper< { css::uno::Reference< css::xml::sax::XAttributeList> m_xAttrList; - SvXMLAttributeList *m_pMutableAttrList; + rtl::Reference<SvXMLAttributeList> m_pMutableAttrList; SvXMLAttributeList *GetMutableAttrList(); diff --git a/xmloff/source/transform/NotesTContext.cxx b/xmloff/source/transform/NotesTContext.cxx index 8c18cdb16531..9cd3b2e574b6 100644 --- a/xmloff/source/transform/NotesTContext.cxx +++ b/xmloff/source/transform/NotesTContext.cxx @@ -62,7 +62,7 @@ void XMLNotesTransformerContext::StartElement( OSL_ENSURE( pActions, "go no actions" ); Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = nullptr; + rtl::Reference<XMLMutableAttributeList> pMutableAttrList; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx index 4e860b64f620..c2c5cdf0a16c 100644 --- a/xmloff/source/transform/OOo2Oasis.cxx +++ b/xmloff/source/transform/OOo2Oasis.cxx @@ -1136,7 +1136,7 @@ void XMLDocumentTransformerContext_Impl::StartElement( m_aOldClass = GetTransformer().GetClass(); - XMLMutableAttributeList *pMutableAttrList = nullptr; + rtl::Reference<XMLMutableAttributeList> pMutableAttrList; bool bOOo = false, bOOoW = false, bOOoC = false, bDOM=false, bDC = false, bSVG = false; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -1261,7 +1261,7 @@ void XMLBodyTransformerContext_Impl::StartElement( { XMLTransformerContext::StartElement( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = + rtl::Reference<XMLMutableAttributeList> pMutableAttrList = new XMLMutableAttributeList( rAttrList ); Reference< XAttributeList > xAttrList = pMutableAttrList; OUString aClass( GetTransformer().GetClass() ); @@ -1319,7 +1319,7 @@ void XMLTabStopOOoTContext_Impl::StartElement( OSL_ENSURE( pActions, "go no actions" ); Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = nullptr; + rtl::Reference<XMLMutableAttributeList> pMutableAttrList; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { diff --git a/xmloff/source/transform/Oasis2OOo.cxx b/xmloff/source/transform/Oasis2OOo.cxx index 3e888d1ad7e2..0fda0c3b61c2 100644 --- a/xmloff/source/transform/Oasis2OOo.cxx +++ b/xmloff/source/transform/Oasis2OOo.cxx @@ -1177,7 +1177,7 @@ void XMLTableTransformerContext_Impl::StartElement( { Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = nullptr; + rtl::Reference<XMLMutableAttributeList> pMutableAttrList; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) @@ -1330,7 +1330,7 @@ void XMLTabStopOASISTContext_Impl::StartElement( sal_Unicode cStyleLeaderChar = 0; sal_Int16 nLeaderText = -1; Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = nullptr; + rtl::Reference<XMLMutableAttributeList> pMutableAttrList; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { @@ -1578,7 +1578,7 @@ void XMLTrackedChangesOASISTContext_Impl::StartElement( { OUStringBuffer aBuffer; ::comphelper::Base64::encode( aBuffer, aKey ); - XMLMutableAttributeList *pMutableAttrList = + rtl::Reference<XMLMutableAttributeList> pMutableAttrList = new XMLMutableAttributeList( xAttrList ); xAttrList = pMutableAttrList; pMutableAttrList->AddAttribute( m_aAttrQName, diff --git a/xmloff/source/transform/PersAttrListTContext.cxx b/xmloff/source/transform/PersAttrListTContext.cxx index abb01f9ab6d4..53e20b0a36bf 100644 --- a/xmloff/source/transform/PersAttrListTContext.cxx +++ b/xmloff/source/transform/PersAttrListTContext.cxx @@ -47,7 +47,7 @@ void XMLPersAttrListTContext::AddAttribute( nAPrefix, ::xmloff::token::GetXMLToken( eAToken ) ) ); const OUString& aAttrValue( rValue ); - XMLMutableAttributeList *pMutableAttrList; + rtl::Reference<XMLMutableAttributeList> pMutableAttrList; if( m_xAttrList.is() ) { pMutableAttrList = diff --git a/xmloff/source/transform/ProcAddAttrTContext.cxx b/xmloff/source/transform/ProcAddAttrTContext.cxx index bc9391acbb50..d15002ad209a 100644 --- a/xmloff/source/transform/ProcAddAttrTContext.cxx +++ b/xmloff/source/transform/ProcAddAttrTContext.cxx @@ -51,7 +51,7 @@ void XMLProcAddAttrTransformerContext::StartElement( const Reference< XAttributeList >& rAttrList ) { Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = + rtl::Reference<XMLMutableAttributeList> pMutableAttrList = GetTransformer().ProcessAttrList( xAttrList, GetActionMap(), false ); if( !pMutableAttrList ) diff --git a/xmloff/source/transform/RenameElemTContext.cxx b/xmloff/source/transform/RenameElemTContext.cxx index 8ed242f248eb..5800d9346311 100644 --- a/xmloff/source/transform/RenameElemTContext.cxx +++ b/xmloff/source/transform/RenameElemTContext.cxx @@ -64,7 +64,7 @@ void XMLRenameElemTransformerContext::StartElement( Reference< XAttributeList > xAttrList( rAttrList ); if( !m_aAttrQName.isEmpty() ) { - XMLMutableAttributeList *pMutableAttrList = + rtl::Reference<XMLMutableAttributeList> pMutableAttrList = new XMLMutableAttributeList( xAttrList ); xAttrList = pMutableAttrList; pMutableAttrList->AddAttribute( m_aAttrQName, m_aAttrValue ); diff --git a/xmloff/source/transform/StyleOASISTContext.cxx b/xmloff/source/transform/StyleOASISTContext.cxx index b1d64260ac21..75dd62db6374 100644 --- a/xmloff/source/transform/StyleOASISTContext.cxx +++ b/xmloff/source/transform/StyleOASISTContext.cxx @@ -115,7 +115,7 @@ void XMLPropertiesTContext_Impl::StartElement( if( pActions ) { - XMLMutableAttributeList *pAttrList = nullptr; + rtl::Reference<XMLMutableAttributeList> pAttrList; if( !m_xAttrList.is() ) { pAttrList = new XMLMutableAttributeList(); @@ -786,7 +786,7 @@ void XMLStyleOASISTContext::StartElement( OSL_ENSURE( pActions, "go no actions" ); Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = nullptr; + rtl::Reference<XMLMutableAttributeList> pMutableAttrList; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; sal_Int16 nFamilyAttr = -1; m_bControlStyle = false; diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx index fd6d082822cd..c9c9220adc44 100644 --- a/xmloff/source/transform/StyleOOoTContext.cxx +++ b/xmloff/source/transform/StyleOOoTContext.cxx @@ -1121,7 +1121,7 @@ void XMLStyleOOoTContext::StartElement( OSL_ENSURE( pActions, "go no actions" ); Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = nullptr; + rtl::Reference<XMLMutableAttributeList> pMutableAttrList; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx index fd59d2c8bb96..15a5859f95ef 100644 --- a/xmloff/source/transform/TransformerBase.cxx +++ b/xmloff/source/transform/TransformerBase.cxx @@ -210,7 +210,7 @@ void SAL_CALL XMLTransformerBase::startElement( const OUString& rName, // Process namespace attributes. This must happen before creating the // context, because namespace declaration apply to the element name itself. - XMLMutableAttributeList *pMutableAttrList = nullptr; + rtl::Reference<XMLMutableAttributeList> pMutableAttrList; Reference< XAttributeList > xAttrList( rAttrList ); sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) @@ -469,7 +469,7 @@ XMLMutableAttributeList *XMLTransformerBase::ProcessAttrList( Reference< XAttributeList >& rAttrList, sal_uInt16 nActionMap, bool bClone ) { - XMLMutableAttributeList *pMutableAttrList = nullptr; + rtl::Reference<XMLMutableAttributeList> pMutableAttrList; XMLTransformerActions *pActions = GetUserDefinedActions( nActionMap ); OSL_ENSURE( pActions, "go no actions" ); if( pActions ) @@ -859,7 +859,7 @@ XMLMutableAttributeList *XMLTransformerBase::ProcessAttrList( } } - return pMutableAttrList; + return pMutableAttrList.get(); } bool XMLTransformerBase::ReplaceSingleInchWithIn( OUString& rValue ) |