diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-09-21 12:12:33 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-09-22 11:01:53 +0200 |
commit | 442df6cf8345f8029d5a3b470bc4981a5aa2bf20 (patch) | |
tree | 9efa6f2b29f41d79f968d1e8ad2588c323305776 /reportdesign | |
parent | a411d7729ab2bed05c3c5d22a8cbcf5dde034b91 (diff) |
ofz: don't leak in face of exceptions
Change-Id: Ic15590a13bd3770ee5dd7db76b21c830a4fe73e2
Reviewed-on: https://gerrit.libreoffice.org/42587
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'reportdesign')
24 files changed, 60 insertions, 68 deletions
diff --git a/reportdesign/source/filter/xml/xmlCell.cxx b/reportdesign/source/filter/xml/xmlCell.cxx index b2887720d4cd..5366b150be89 100644 --- a/reportdesign/source/filter/xml/xmlCell.cxx +++ b/reportdesign/source/filter/xml/xmlCell.cxx @@ -95,7 +95,7 @@ OXMLCell::~OXMLCell() { } -SvXMLImportContext* OXMLCell::CreateChildContext( +SvXMLImportContextRef OXMLCell::CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, const Reference< XAttributeList > & xAttrList ) diff --git a/reportdesign/source/filter/xml/xmlCell.hxx b/reportdesign/source/filter/xml/xmlCell.hxx index 8cc8e5ab0450..059d58f3636f 100644 --- a/reportdesign/source/filter/xml/xmlCell.hxx +++ b/reportdesign/source/filter/xml/xmlCell.hxx @@ -49,7 +49,7 @@ namespace rptxml ,OXMLCell* _pCell = nullptr); virtual ~OXMLCell() override; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/reportdesign/source/filter/xml/xmlColumn.cxx b/reportdesign/source/filter/xml/xmlColumn.cxx index a563799502c2..611f926a758c 100644 --- a/reportdesign/source/filter/xml/xmlColumn.cxx +++ b/reportdesign/source/filter/xml/xmlColumn.cxx @@ -80,7 +80,7 @@ OXMLRowColumn::~OXMLRowColumn() { } -SvXMLImportContext* OXMLRowColumn::CreateChildContext( +SvXMLImportContextRef OXMLRowColumn::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) diff --git a/reportdesign/source/filter/xml/xmlColumn.hxx b/reportdesign/source/filter/xml/xmlColumn.hxx index c685bbeda5a6..0aa34130d8d1 100644 --- a/reportdesign/source/filter/xml/xmlColumn.hxx +++ b/reportdesign/source/filter/xml/xmlColumn.hxx @@ -44,7 +44,7 @@ namespace rptxml ); virtual ~OXMLRowColumn() override; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; virtual void EndElement() override; diff --git a/reportdesign/source/filter/xml/xmlControlProperty.cxx b/reportdesign/source/filter/xml/xmlControlProperty.cxx index 3532042a8af4..75b7520145ed 100644 --- a/reportdesign/source/filter/xml/xmlControlProperty.cxx +++ b/reportdesign/source/filter/xml/xmlControlProperty.cxx @@ -116,7 +116,7 @@ OXMLControlProperty::~OXMLControlProperty() { } -SvXMLImportContext* OXMLControlProperty::CreateChildContext( +SvXMLImportContextRef OXMLControlProperty::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) diff --git a/reportdesign/source/filter/xml/xmlControlProperty.hxx b/reportdesign/source/filter/xml/xmlControlProperty.hxx index f06bc740cc0e..8b2bf6440be2 100644 --- a/reportdesign/source/filter/xml/xmlControlProperty.hxx +++ b/reportdesign/source/filter/xml/xmlControlProperty.hxx @@ -52,7 +52,7 @@ namespace rptxml ,OXMLControlProperty* _pContainer = nullptr); virtual ~OXMLControlProperty() override; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/reportdesign/source/filter/xml/xmlFixedContent.cxx b/reportdesign/source/filter/xml/xmlFixedContent.cxx index d8ce3fa9cd2e..915a77a72abb 100644 --- a/reportdesign/source/filter/xml/xmlFixedContent.cxx +++ b/reportdesign/source/filter/xml/xmlFixedContent.cxx @@ -124,14 +124,14 @@ OXMLFixedContent::~OXMLFixedContent() } -SvXMLImportContext* OXMLFixedContent::CreateChildContext_( +SvXMLImportContextRef OXMLFixedContent::CreateChildContext_( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = OXMLReportElementBase::CreateChildContext_(nPrefix,rLocalName,xAttrList); - if ( pContext ) - return pContext; + SvXMLImportContextRef xContext = OXMLReportElementBase::CreateChildContext_(nPrefix,rLocalName,xAttrList); + if (xContext) + return xContext; static const char s_sStringConcat[] = " & "; const SvXMLTokenMap& rTokenMap = m_rImport.GetCellElemTokenMap(); @@ -141,22 +141,22 @@ SvXMLImportContext* OXMLFixedContent::CreateChildContext_( switch( nToken ) { case XML_TOK_P: - pContext = new OXMLFixedContent(m_rImport,nPrefix, rLocalName,m_rCell,m_pContainer,this); + xContext = new OXMLFixedContent(m_rImport,nPrefix, rLocalName,m_rCell,m_pContainer,this); break; case XML_TOK_TEXT_TAB_STOP: - pContext = new OXMLCharContent( m_rImport, this,nPrefix, + xContext = new OXMLCharContent( m_rImport, this,nPrefix, rLocalName, xAttrList, 0x0009, false ); break; case XML_TOK_TEXT_LINE_BREAK: - pContext = new OXMLCharContent( m_rImport, this,nPrefix, + xContext = new OXMLCharContent( m_rImport, this,nPrefix, rLocalName, xAttrList, ControlCharacter::LINE_BREAK ); break; case XML_TOK_TEXT_S: - pContext = new OXMLCharContent( m_rImport, this,nPrefix, + xContext = new OXMLCharContent( m_rImport, this,nPrefix, rLocalName, xAttrList, 0x0020, true ); break; @@ -171,7 +171,7 @@ SvXMLImportContext* OXMLFixedContent::CreateChildContext_( default: ; } - return pContext; + return xContext; } void OXMLFixedContent::EndElement() diff --git a/reportdesign/source/filter/xml/xmlFixedContent.hxx b/reportdesign/source/filter/xml/xmlFixedContent.hxx index 6ec8fac79fce..78f85760cb1d 100644 --- a/reportdesign/source/filter/xml/xmlFixedContent.hxx +++ b/reportdesign/source/filter/xml/xmlFixedContent.hxx @@ -36,7 +36,7 @@ namespace rptxml bool m_bFormattedField; protected: - virtual SvXMLImportContext* CreateChildContext_( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext_( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; private: diff --git a/reportdesign/source/filter/xml/xmlGroup.cxx b/reportdesign/source/filter/xml/xmlGroup.cxx index 8c32ad4c8957..2c11e4853c4f 100644 --- a/reportdesign/source/filter/xml/xmlGroup.cxx +++ b/reportdesign/source/filter/xml/xmlGroup.cxx @@ -190,7 +190,7 @@ OXMLGroup::~OXMLGroup() } -SvXMLImportContext* OXMLGroup::CreateChildContext( +SvXMLImportContextRef OXMLGroup::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) diff --git a/reportdesign/source/filter/xml/xmlGroup.hxx b/reportdesign/source/filter/xml/xmlGroup.hxx index 2cb370d2e8a9..ce0667f765e8 100644 --- a/reportdesign/source/filter/xml/xmlGroup.hxx +++ b/reportdesign/source/filter/xml/xmlGroup.hxx @@ -45,7 +45,7 @@ namespace rptxml ); virtual ~OXMLGroup() override; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/reportdesign/source/filter/xml/xmlMasterFields.cxx b/reportdesign/source/filter/xml/xmlMasterFields.cxx index 6c26fa6b804d..777a2c45c6b5 100644 --- a/reportdesign/source/filter/xml/xmlMasterFields.cxx +++ b/reportdesign/source/filter/xml/xmlMasterFields.cxx @@ -75,8 +75,7 @@ OXMLMasterFields::~OXMLMasterFields() { } - -SvXMLImportContext* OXMLMasterFields::CreateChildContext( +SvXMLImportContextRef OXMLMasterFields::CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, const Reference< XAttributeList > & xAttrList ) diff --git a/reportdesign/source/filter/xml/xmlMasterFields.hxx b/reportdesign/source/filter/xml/xmlMasterFields.hxx index 958b7318be5d..1e0d70eae156 100644 --- a/reportdesign/source/filter/xml/xmlMasterFields.hxx +++ b/reportdesign/source/filter/xml/xmlMasterFields.hxx @@ -37,7 +37,7 @@ namespace rptxml ,IMasterDetailFieds* _pReport); virtual ~OXMLMasterFields() override; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/reportdesign/source/filter/xml/xmlReport.cxx b/reportdesign/source/filter/xml/xmlReport.cxx index 8f572dad4dde..052842d60230 100644 --- a/reportdesign/source/filter/xml/xmlReport.cxx +++ b/reportdesign/source/filter/xml/xmlReport.cxx @@ -126,14 +126,14 @@ void OXMLReport::impl_initRuntimeDefaults() const } -SvXMLImportContext* OXMLReport::CreateChildContext( +SvXMLImportContextRef OXMLReport::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = CreateChildContext_(nPrefix,rLocalName,xAttrList); - if ( pContext ) - return pContext; + SvXMLImportContextRef xContext = CreateChildContext_(nPrefix,rLocalName,xAttrList); + if (xContext) + return xContext; const SvXMLTokenMap& rTokenMap = m_rImport.GetReportElemTokenMap(); switch( rTokenMap.Get( nPrefix, rLocalName ) ) @@ -141,60 +141,59 @@ SvXMLImportContext* OXMLReport::CreateChildContext( case XML_TOK_REPORT_FUNCTION: { m_rImport.GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); - pContext = new OXMLFunction( m_rImport, nPrefix, rLocalName,xAttrList,m_xReportDefinition.get(),true); + xContext = new OXMLFunction( m_rImport, nPrefix, rLocalName,xAttrList,m_xReportDefinition.get(),true); } break; case XML_TOK_MASTER_DETAIL_FIELDS: m_rImport.GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); - pContext = new OXMLMasterFields(m_rImport, nPrefix, rLocalName,xAttrList ,this); + xContext = new OXMLMasterFields(m_rImport, nPrefix, rLocalName,xAttrList ,this); break; case XML_TOK_REPORT_HEADER: { m_rImport.GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); m_xReportDefinition->setReportHeaderOn(true); - pContext = new OXMLSection( m_rImport, nPrefix, rLocalName,xAttrList, m_xReportDefinition->getReportHeader()); + xContext = new OXMLSection( m_rImport, nPrefix, rLocalName,xAttrList, m_xReportDefinition->getReportHeader()); } break; case XML_TOK_PAGE_HEADER: { m_rImport.GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); m_xReportDefinition->setPageHeaderOn(true); - pContext = new OXMLSection( m_rImport, nPrefix, rLocalName,xAttrList, m_xReportDefinition->getPageHeader()); + xContext = new OXMLSection( m_rImport, nPrefix, rLocalName,xAttrList, m_xReportDefinition->getPageHeader()); } break; case XML_TOK_GROUP: m_rImport.GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); - pContext = new OXMLGroup( m_rImport, nPrefix, rLocalName,xAttrList); + xContext = new OXMLGroup( m_rImport, nPrefix, rLocalName,xAttrList); break; case XML_TOK_DETAIL: { m_rImport.GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); - pContext = new OXMLSection( m_rImport, nPrefix, rLocalName,xAttrList, m_xReportDefinition->getDetail()); + xContext = new OXMLSection( m_rImport, nPrefix, rLocalName,xAttrList, m_xReportDefinition->getDetail()); } break; case XML_TOK_PAGE_FOOTER: { m_rImport.GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); m_xReportDefinition->setPageFooterOn(true); - pContext = new OXMLSection( m_rImport, nPrefix, rLocalName,xAttrList, m_xReportDefinition->getPageFooter(),false); + xContext = new OXMLSection( m_rImport, nPrefix, rLocalName,xAttrList, m_xReportDefinition->getPageFooter(),false); } break; case XML_TOK_REPORT_FOOTER: { m_rImport.GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); m_xReportDefinition->setReportFooterOn(true); - pContext = new OXMLSection( m_rImport, nPrefix, rLocalName,xAttrList, m_xReportDefinition->getReportFooter()); + xContext = new OXMLSection( m_rImport, nPrefix, rLocalName,xAttrList, m_xReportDefinition->getReportFooter()); } break; default: break; } - if( !pContext ) - pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); + if (!xContext) + xContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); - - return pContext; + return xContext; } void OXMLReport::EndElement() diff --git a/reportdesign/source/filter/xml/xmlReport.hxx b/reportdesign/source/filter/xml/xmlReport.hxx index 590bbe38a1b0..ba5702c0bdc6 100644 --- a/reportdesign/source/filter/xml/xmlReport.hxx +++ b/reportdesign/source/filter/xml/xmlReport.hxx @@ -40,7 +40,7 @@ namespace rptxml ,const css::uno::Reference< css::report::XReportDefinition >& _xComponent); virtual ~OXMLReport() override; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/reportdesign/source/filter/xml/xmlReportElement.cxx b/reportdesign/source/filter/xml/xmlReportElement.cxx index 9a68bd59c7a6..fa7f06e939f8 100644 --- a/reportdesign/source/filter/xml/xmlReportElement.cxx +++ b/reportdesign/source/filter/xml/xmlReportElement.cxx @@ -79,11 +79,9 @@ OXMLReportElement::OXMLReportElement( ORptFilter& rImport, OXMLReportElement::~OXMLReportElement() { - } - -SvXMLImportContext* OXMLReportElement::CreateChildContext( +SvXMLImportContextRef OXMLReportElement::CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, const Reference< XAttributeList > & xAttrList ) diff --git a/reportdesign/source/filter/xml/xmlReportElement.hxx b/reportdesign/source/filter/xml/xmlReportElement.hxx index faef0ded8f56..a5d11ac73605 100644 --- a/reportdesign/source/filter/xml/xmlReportElement.hxx +++ b/reportdesign/source/filter/xml/xmlReportElement.hxx @@ -39,7 +39,7 @@ namespace rptxml ,const css::uno::Reference< css::report::XReportControlModel >& _xComponent); virtual ~OXMLReportElement() override; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; }; diff --git a/reportdesign/source/filter/xml/xmlReportElementBase.cxx b/reportdesign/source/filter/xml/xmlReportElementBase.cxx index b1c8e8065bc1..54eb0494217e 100644 --- a/reportdesign/source/filter/xml/xmlReportElementBase.cxx +++ b/reportdesign/source/filter/xml/xmlReportElementBase.cxx @@ -47,18 +47,18 @@ OXMLReportElementBase::~OXMLReportElementBase() { } -SvXMLImportContext* OXMLReportElementBase::CreateChildContext( +SvXMLImportContextRef OXMLReportElementBase::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = CreateChildContext_(nPrefix,rLocalName,xAttrList); - if( !pContext ) - pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); - return pContext; + SvXMLImportContextRef xContext = CreateChildContext_(nPrefix,rLocalName,xAttrList); + if (!xContext) + xContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); + return xContext; } -SvXMLImportContext* OXMLReportElementBase::CreateChildContext_( +SvXMLImportContextRef OXMLReportElementBase::CreateChildContext_( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) diff --git a/reportdesign/source/filter/xml/xmlReportElementBase.hxx b/reportdesign/source/filter/xml/xmlReportElementBase.hxx index c46485cc5350..b8fc8361c9b1 100644 --- a/reportdesign/source/filter/xml/xmlReportElementBase.hxx +++ b/reportdesign/source/filter/xml/xmlReportElementBase.hxx @@ -46,7 +46,7 @@ namespace rptxml OXMLTable* m_pContainer; css::uno::Reference< css::report::XReportComponent > m_xReportComponent; - virtual SvXMLImportContext* CreateChildContext_( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext_( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ); public: @@ -58,7 +58,7 @@ namespace rptxml ,OXMLTable* _pContainer); virtual ~OXMLReportElementBase() override; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/reportdesign/source/filter/xml/xmlSection.cxx b/reportdesign/source/filter/xml/xmlSection.cxx index f69b5e3edffa..394c8053000f 100644 --- a/reportdesign/source/filter/xml/xmlSection.cxx +++ b/reportdesign/source/filter/xml/xmlSection.cxx @@ -101,8 +101,7 @@ OXMLSection::~OXMLSection() { } - -SvXMLImportContext* OXMLSection::CreateChildContext( +SvXMLImportContextRef OXMLSection::CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) diff --git a/reportdesign/source/filter/xml/xmlSection.hxx b/reportdesign/source/filter/xml/xmlSection.hxx index e9162a289d30..b677d3cb5cfb 100644 --- a/reportdesign/source/filter/xml/xmlSection.hxx +++ b/reportdesign/source/filter/xml/xmlSection.hxx @@ -44,7 +44,7 @@ namespace rptxml ,bool _bPageHeader = true); virtual ~OXMLSection() override; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; }; diff --git a/reportdesign/source/filter/xml/xmlSubDocument.cxx b/reportdesign/source/filter/xml/xmlSubDocument.cxx index f6ab531492d9..4c84af1e728f 100644 --- a/reportdesign/source/filter/xml/xmlSubDocument.cxx +++ b/reportdesign/source/filter/xml/xmlSubDocument.cxx @@ -50,20 +50,18 @@ OXMLSubDocument::OXMLSubDocument( ORptFilter& rImport, } - OXMLSubDocument::~OXMLSubDocument() { } - -SvXMLImportContext* OXMLSubDocument::CreateChildContext_( +SvXMLImportContextRef OXMLSubDocument::CreateChildContext_( sal_uInt16 _nPrefix, const OUString& _rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = OXMLReportElementBase::CreateChildContext_(_nPrefix,_rLocalName,xAttrList); - if ( pContext ) - return pContext; + SvXMLImportContextRef xContext = OXMLReportElementBase::CreateChildContext_(_nPrefix,_rLocalName,xAttrList); + if (xContext) + return xContext; const SvXMLTokenMap& rTokenMap = static_cast<ORptFilter&>(GetImport()).GetReportElemTokenMap(); switch( rTokenMap.Get( _nPrefix, _rLocalName ) ) @@ -71,7 +69,7 @@ SvXMLImportContext* OXMLSubDocument::CreateChildContext_( case XML_TOK_MASTER_DETAIL_FIELDS: { GetImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); - pContext = new OXMLMasterFields(static_cast<ORptFilter&>(GetImport()), _nPrefix, _rLocalName,xAttrList ,this); + xContext = new OXMLMasterFields(static_cast<ORptFilter&>(GetImport()), _nPrefix, _rLocalName,xAttrList ,this); } break; case XML_TOK_SUB_FRAME: @@ -80,7 +78,7 @@ SvXMLImportContext* OXMLSubDocument::CreateChildContext_( m_nCurrentCount = m_pContainer->getSection()->getCount(); rtl::Reference< XMLShapeImportHelper > xShapeImportHelper = GetImport().GetShapeImport(); uno::Reference< drawing::XShapes > xShapes = m_pContainer->getSection().get(); - pContext = xShapeImportHelper->CreateGroupChildContext(GetImport(),_nPrefix,_rLocalName,xAttrList,xShapes); + xContext = xShapeImportHelper->CreateGroupChildContext(GetImport(),_nPrefix,_rLocalName,xAttrList,xShapes); m_bContainsShape = true; if (m_pCellParent) { @@ -93,10 +91,10 @@ SvXMLImportContext* OXMLSubDocument::CreateChildContext_( break; } - if( !pContext ) - pContext = new SvXMLImportContext( GetImport(), _nPrefix, _rLocalName ); + if (!xContext) + xContext = new SvXMLImportContext( GetImport(), _nPrefix, _rLocalName ); - return pContext; + return xContext; } void OXMLSubDocument::EndElement() diff --git a/reportdesign/source/filter/xml/xmlSubDocument.hxx b/reportdesign/source/filter/xml/xmlSubDocument.hxx index 857ecb699c82..3c0a0d33c6d4 100644 --- a/reportdesign/source/filter/xml/xmlSubDocument.hxx +++ b/reportdesign/source/filter/xml/xmlSubDocument.hxx @@ -39,7 +39,7 @@ namespace rptxml OXMLSubDocument(const OXMLSubDocument&) = delete; void operator =(const OXMLSubDocument&) = delete; - virtual SvXMLImportContext* CreateChildContext_( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext_( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; public: diff --git a/reportdesign/source/filter/xml/xmlTable.cxx b/reportdesign/source/filter/xml/xmlTable.cxx index 5ff337bcaf4f..2e9ae7da2ecf 100644 --- a/reportdesign/source/filter/xml/xmlTable.cxx +++ b/reportdesign/source/filter/xml/xmlTable.cxx @@ -116,8 +116,7 @@ OXMLTable::~OXMLTable() { } - -SvXMLImportContext* OXMLTable::CreateChildContext( +SvXMLImportContextRef OXMLTable::CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, const Reference< XAttributeList > & xAttrList ) diff --git a/reportdesign/source/filter/xml/xmlTable.hxx b/reportdesign/source/filter/xml/xmlTable.hxx index 4a24c518d94c..d8d76f2814e6 100644 --- a/reportdesign/source/filter/xml/xmlTable.hxx +++ b/reportdesign/source/filter/xml/xmlTable.hxx @@ -62,7 +62,7 @@ namespace rptxml ); virtual ~OXMLTable() override; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; |