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 /sc | |
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 'sc')
-rw-r--r-- | sc/source/filter/xml/XMLTableHeaderFooterContext.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/xml/XMLTableHeaderFooterContext.hxx | 4 | ||||
-rw-r--r-- | sc/source/filter/xml/XMLTableShapesContext.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/XMLTableShapesContext.hxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/XMLTrackedChangesContext.cxx | 38 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlannoi.cxx | 20 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlannoi.hxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlcelli.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlcelli.hxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlconti.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlconti.hxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlcvali.cxx | 16 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlimprt.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlstyli.cxx | 18 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlstyli.hxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmltabi.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmltabi.hxx | 2 |
17 files changed, 64 insertions, 64 deletions
diff --git a/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx b/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx index 9feeb9308595..357a7655e807 100644 --- a/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx +++ b/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx @@ -102,7 +102,7 @@ XMLTableHeaderFooterContext::~XMLTableHeaderFooterContext() { } -SvXMLImportContext *XMLTableHeaderFooterContext::CreateChildContext( +SvXMLImportContextRef XMLTableHeaderFooterContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) @@ -211,7 +211,7 @@ XMLHeaderFooterRegionContext::~XMLHeaderFooterRegionContext() { } -SvXMLImportContext *XMLHeaderFooterRegionContext::CreateChildContext( +SvXMLImportContextRef XMLHeaderFooterRegionContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) diff --git a/sc/source/filter/xml/XMLTableHeaderFooterContext.hxx b/sc/source/filter/xml/XMLTableHeaderFooterContext.hxx index 8a26a55aac0a..685deee25eff 100644 --- a/sc/source/filter/xml/XMLTableHeaderFooterContext.hxx +++ b/sc/source/filter/xml/XMLTableHeaderFooterContext.hxx @@ -57,7 +57,7 @@ public: virtual ~XMLTableHeaderFooterContext() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; @@ -79,7 +79,7 @@ public: virtual ~XMLHeaderFooterRegionContext() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/sc/source/filter/xml/XMLTableShapesContext.cxx b/sc/source/filter/xml/XMLTableShapesContext.cxx index 6225a7742057..c601ba975968 100644 --- a/sc/source/filter/xml/XMLTableShapesContext.cxx +++ b/sc/source/filter/xml/XMLTableShapesContext.cxx @@ -34,7 +34,7 @@ ScXMLTableShapesContext::~ScXMLTableShapesContext() { } -SvXMLImportContext *ScXMLTableShapesContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef ScXMLTableShapesContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLName, const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList ) { diff --git a/sc/source/filter/xml/XMLTableShapesContext.hxx b/sc/source/filter/xml/XMLTableShapesContext.hxx index 743e4e7f0c74..32c4c65daf4a 100644 --- a/sc/source/filter/xml/XMLTableShapesContext.hxx +++ b/sc/source/filter/xml/XMLTableShapesContext.hxx @@ -31,7 +31,7 @@ public: virtual ~ScXMLTableShapesContext() 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/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx index d8aba927a656..15d24dbd2b6f 100644 --- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx +++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx @@ -53,7 +53,7 @@ public: const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList, ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); - 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; @@ -162,7 +162,7 @@ public: const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList, ScXMLChangeCellContext* pChangeCellContext); - 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; @@ -195,7 +195,7 @@ public: OUString& rInputString, double& fValue, sal_uInt16& nType, ScMatrixMode& nMatrixFlag, sal_Int32& nMatrixCols, sal_Int32& nMatrixRows); - 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; @@ -273,7 +273,7 @@ public: const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); - 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; @@ -288,7 +288,7 @@ public: const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); - 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; @@ -302,7 +302,7 @@ public: ScXMLCutOffsContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); - 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; @@ -317,7 +317,7 @@ public: const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList, ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); - 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; @@ -440,7 +440,7 @@ ScXMLChangeInfoContext::ScXMLChangeInfoContext( ScXMLImport& rImport, } } -SvXMLImportContext *ScXMLChangeInfoContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef ScXMLChangeInfoContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList>& /*xAttrList*/ ) { @@ -709,11 +709,11 @@ ScXMLChangeTextPContext::ScXMLChangeTextPContext( ScXMLImport& rImport, // here are no attributes } -SvXMLImportContext *ScXMLChangeTextPContext::CreateChildContext( sal_uInt16 nTempPrefix, +SvXMLImportContextRef ScXMLChangeTextPContext::CreateChildContext( sal_uInt16 nTempPrefix, const OUString& rLName, const css::uno::Reference<css::xml::sax::XAttributeList>& xTempAttrList ) { - SvXMLImportContext *pContext(nullptr); + SvXMLImportContextRef xContext; if ((nPrefix == XML_NAMESPACE_TEXT) && (IsXMLToken(rLName, XML_S)) && !pTextPContext) { @@ -750,14 +750,14 @@ SvXMLImportContext *ScXMLChangeTextPContext::CreateChildContext( sal_uInt16 nTem { if (!bWasContext) pTextPContext->Characters(sText.makeStringAndClear()); - pContext = pTextPContext->CreateChildContext(nTempPrefix, rLName, xTempAttrList); + xContext = pTextPContext->CreateChildContext(nTempPrefix, rLName, xTempAttrList); } } - if( !pContext ) - pContext = new SvXMLImportContext( GetImport(), nPrefix, rLName ); + if (!xContext) + xContext = new SvXMLImportContext( GetImport(), nPrefix, rLName ); - return pContext; + return xContext; } void ScXMLChangeTextPContext::Characters( const OUString& rChars ) @@ -857,7 +857,7 @@ ScXMLChangeCellContext::ScXMLChangeCellContext( ScXMLImport& rImport, nMatrixFlag = ScMatrixMode::Formula; } -SvXMLImportContext *ScXMLChangeCellContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef ScXMLChangeCellContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList ) { @@ -1198,7 +1198,7 @@ ScXMLInsertionCutOffContext::ScXMLInsertionCutOffContext( ScXMLImport& rImport, pChangeTrackingImportHelper->SetInsertionCutOff(nID, nPosition); } -SvXMLImportContext *ScXMLInsertionCutOffContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef ScXMLInsertionCutOffContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList>& /* xAttrList */ ) { @@ -1257,7 +1257,7 @@ ScXMLMovementCutOffContext::ScXMLMovementCutOffContext( ScXMLImport& rImport, pChangeTrackingImportHelper->AddMoveCutOff(nID, nStartPosition, nEndPosition); } -SvXMLImportContext *ScXMLMovementCutOffContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef ScXMLMovementCutOffContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList>& /* xAttrList */ ) { @@ -1278,7 +1278,7 @@ ScXMLCutOffsContext::ScXMLCutOffsContext( ScXMLImport& rImport, // here are no attributes } -SvXMLImportContext *ScXMLCutOffsContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef ScXMLCutOffsContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList ) { @@ -1362,7 +1362,7 @@ ScXMLDeletionContext::ScXMLDeletionContext( ScXMLImport& rImport, pChangeTrackingImportHelper->SetMultiSpanned(static_cast<sal_Int16>(nMultiSpanned)); } -SvXMLImportContext *ScXMLDeletionContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef ScXMLDeletionContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList>& /*xAttrList*/ ) { diff --git a/sc/source/filter/xml/xmlannoi.cxx b/sc/source/filter/xml/xmlannoi.cxx index 42d7de994fd9..5f5216cf09d6 100644 --- a/sc/source/filter/xml/xmlannoi.cxx +++ b/sc/source/filter/xml/xmlannoi.cxx @@ -114,35 +114,35 @@ void ScXMLAnnotationContext::StartElement(const css::uno::Reference< css::xml::s pShapeContext->StartElement(xAttrList); } -SvXMLImportContext *ScXMLAnnotationContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef ScXMLAnnotationContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext *pContext = nullptr; + SvXMLImportContextRef xContext; if( XML_NAMESPACE_DC == nPrefix ) { if( IsXMLToken( rLName, XML_CREATOR ) ) - pContext = new ScXMLContentContext(GetScImport(), nPrefix, + xContext = new ScXMLContentContext(GetScImport(), nPrefix, rLName, maAuthorBuffer); else if( IsXMLToken( rLName, XML_DATE ) ) - pContext = new ScXMLContentContext(GetScImport(), nPrefix, + xContext = new ScXMLContentContext(GetScImport(), nPrefix, rLName, maCreateDateBuffer); } else if( XML_NAMESPACE_META == nPrefix ) { if( IsXMLToken( rLName, XML_DATE_STRING ) ) - pContext = new ScXMLContentContext(GetScImport(), nPrefix, + xContext = new ScXMLContentContext(GetScImport(), nPrefix, rLName, maCreateDateStringBuffer); } - if( !pContext && pShapeContext ) - pContext = pShapeContext->CreateChildContext(nPrefix, rLName, xAttrList); + if( !xContext && pShapeContext ) + xContext = pShapeContext->CreateChildContext(nPrefix, rLName, xAttrList); - if( !pContext ) - pContext = new SvXMLImportContext( GetImport(), nPrefix, rLName ); + if (!xContext) + xContext = new SvXMLImportContext( GetImport(), nPrefix, rLName ); - return pContext; + return xContext; } void ScXMLAnnotationContext::Characters( const OUString& rChars ) diff --git a/sc/source/filter/xml/xmlannoi.hxx b/sc/source/filter/xml/xmlannoi.hxx index 2c2480e5368a..0e62d99f7e90 100644 --- a/sc/source/filter/xml/xmlannoi.hxx +++ b/sc/source/filter/xml/xmlannoi.hxx @@ -74,7 +74,7 @@ public: virtual ~ScXMLAnnotationContext() 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/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index 244fa2d069d6..30acfd032115 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -639,7 +639,7 @@ void ScXMLTableRowCellContext::PushParagraphEnd() ++mnCurParagraph; } -SvXMLImportContext *ScXMLTableRowCellContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef ScXMLTableRowCellContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLName, const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList ) { diff --git a/sc/source/filter/xml/xmlcelli.hxx b/sc/source/filter/xml/xmlcelli.hxx index bc30cf4b32be..d816dec3ef67 100644 --- a/sc/source/filter/xml/xmlcelli.hxx +++ b/sc/source/filter/xml/xmlcelli.hxx @@ -135,7 +135,7 @@ public: virtual ~ScXMLTableRowCellContext() 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/sc/source/filter/xml/xmlconti.cxx b/sc/source/filter/xml/xmlconti.cxx index 5d139567080d..b358a1e43f93 100644 --- a/sc/source/filter/xml/xmlconti.cxx +++ b/sc/source/filter/xml/xmlconti.cxx @@ -43,7 +43,7 @@ ScXMLContentContext::~ScXMLContentContext() { } -SvXMLImportContext *ScXMLContentContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef ScXMLContentContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLName, const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList ) { diff --git a/sc/source/filter/xml/xmlconti.hxx b/sc/source/filter/xml/xmlconti.hxx index fd5a39a0dd0c..afd37d91877a 100644 --- a/sc/source/filter/xml/xmlconti.hxx +++ b/sc/source/filter/xml/xmlconti.hxx @@ -37,7 +37,7 @@ public: virtual ~ScXMLContentContext() 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/sc/source/filter/xml/xmlcvali.cxx b/sc/source/filter/xml/xmlcvali.cxx index 5a37734be65c..3e03a6df3731 100644 --- a/sc/source/filter/xml/xmlcvali.cxx +++ b/sc/source/filter/xml/xmlcvali.cxx @@ -61,7 +61,7 @@ public: ScXMLContentValidationContext( ScXMLImport& rImport, const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList ); - 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; @@ -90,7 +90,7 @@ public: const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList, ScXMLContentValidationContext* pValidationContext); - 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; @@ -113,7 +113,7 @@ public: const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList, ScXMLContentValidationContext* pValidationContext); - 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; @@ -132,7 +132,7 @@ public: const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList, ScXMLContentValidationContext* pValidationContext); - 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 SAL_CALL endFastElement( sal_Int32 nElement ) override; @@ -219,7 +219,7 @@ ScXMLContentValidationContext::ScXMLContentValidationContext( ScXMLImport& rImpo } } -SvXMLImportContext *ScXMLContentValidationContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef ScXMLContentValidationContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLName, const css::uno::Reference<css::xml::sax::XAttributeList>& /*xAttrList*/ ) { @@ -467,7 +467,7 @@ ScXMLHelpMessageContext::ScXMLHelpMessageContext( ScXMLImport& rImport, } } -SvXMLImportContext *ScXMLHelpMessageContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef ScXMLHelpMessageContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLName, const css::uno::Reference<css::xml::sax::XAttributeList>& /*xAttrList*/ ) { @@ -528,7 +528,7 @@ ScXMLErrorMessageContext::ScXMLErrorMessageContext( ScXMLImport& rImport, } } -SvXMLImportContext *ScXMLErrorMessageContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef ScXMLErrorMessageContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLName, const css::uno::Reference<css::xml::sax::XAttributeList>& /*xAttrList*/ ) { @@ -583,7 +583,7 @@ ScXMLErrorMacroContext::ScXMLErrorMacroContext( ScXMLImport& rImport, } } -SvXMLImportContext *ScXMLErrorMacroContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef ScXMLErrorMacroContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLName, const css::uno::Reference<css::xml::sax::XAttributeList>& /* xAttrList */ ) { diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 5ffc31cbf86a..a88c94fe73b9 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -237,7 +237,7 @@ public: ScXMLDocContext_Impl( ScXMLImport& rImport ); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& xAttrList ) override; @@ -277,7 +277,7 @@ public: ScXMLFlatDocContext_Impl( ScXMLImport& i_rImport, const uno::Reference<document::XDocumentProperties>& i_xDocProps); - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 i_nPrefix, const OUString& i_rLocalName, const uno::Reference<xml::sax::XAttributeList>& i_xAttrList) override; @@ -309,7 +309,7 @@ SvXMLMetaDocumentContext(i_rImport, i_xDocProps) { } -SvXMLImportContext *ScXMLFlatDocContext_Impl::CreateChildContext( +SvXMLImportContextRef ScXMLFlatDocContext_Impl::CreateChildContext( sal_uInt16 i_nPrefix, const OUString& i_rLocalName, const uno::Reference<xml::sax::XAttributeList>& i_xAttrList) { @@ -369,7 +369,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL return GetScImport().CreateBodyContext( pAttribList ); } -SvXMLImportContext *ScXMLDocContext_Impl::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef ScXMLDocContext_Impl::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& xAttrList ) { diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx index 42ddf57fc7c1..82808931eb62 100644 --- a/sc/source/filter/xml/xmlstyli.cxx +++ b/sc/source/filter/xml/xmlstyli.cxx @@ -284,7 +284,7 @@ class XMLTableCellPropsContext : public SvXMLPropertySetContext ::std::vector< XMLPropertyState > &rProps, const rtl::Reference < SvXMLImportPropertyMapper > &rMap); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList, ::std::vector< XMLPropertyState > &rProperties, @@ -303,7 +303,7 @@ XMLTableCellPropsContext::XMLTableCellPropsContext( { } -SvXMLImportContext* XMLTableCellPropsContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef XMLTableCellPropsContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList, ::std::vector< XMLPropertyState > &rProperties, @@ -448,12 +448,12 @@ XMLTableStyleContext::~XMLTableStyleContext() delete mpCondFormat; } -SvXMLImportContext *XMLTableStyleContext::CreateChildContext( +SvXMLImportContextRef XMLTableStyleContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext(nullptr); + SvXMLImportContextRef xContext; if( (XML_NAMESPACE_STYLE == nPrefix) && IsXMLToken(rLocalName, XML_MAP ) ) @@ -461,7 +461,7 @@ SvXMLImportContext *XMLTableStyleContext::CreateChildContext( if(!mpCondFormat) mpCondFormat = new ScConditionalFormat( 0, GetScImport().GetDocument() ); ScXMLMapContext* pMapContext = new ScXMLMapContext(GetImport(), nPrefix, rLocalName, xAttrList); - pContext = pMapContext; + xContext = pMapContext; mpCondFormat->AddEntry(pMapContext->CreateConditionEntry()); } else if ( ( XML_NAMESPACE_STYLE == nPrefix) && @@ -471,17 +471,17 @@ SvXMLImportContext *XMLTableStyleContext::CreateChildContext( GetStyles()->GetImportPropertyMapper( GetFamily() ); if( xImpPrMap.is() ) - pContext = new XMLTableCellPropsContext( GetImport(), nPrefix, + xContext = new XMLTableCellPropsContext( GetImport(), nPrefix, rLocalName, xAttrList, XML_TYPE_PROP_TABLE_CELL, GetProperties(), xImpPrMap ); } - if (!pContext) - pContext = XMLPropStyleContext::CreateChildContext( nPrefix, rLocalName, + if (!xContext) + xContext = XMLPropStyleContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); - return pContext; + return xContext; } void XMLTableStyleContext::ApplyCondFormat( const uno::Sequence<table::CellRangeAddress>& xCellRanges ) diff --git a/sc/source/filter/xml/xmlstyli.hxx b/sc/source/filter/xml/xmlstyli.hxx index 4e568fc15a35..f629817246f1 100644 --- a/sc/source/filter/xml/xmlstyli.hxx +++ b/sc/source/filter/xml/xmlstyli.hxx @@ -96,7 +96,7 @@ public: SvXMLStylesContext& rStyles, sal_uInt16 nFamily, bool bDefaultStyle = false ); virtual ~XMLTableStyleContext() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx index a0cd76246fc7..efda387746bb 100644 --- a/sc/source/filter/xml/xmltabi.cxx +++ b/sc/source/filter/xml/xmltabi.cxx @@ -210,7 +210,7 @@ ScXMLTableContext::~ScXMLTableContext() { } -SvXMLImportContext *ScXMLTableContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef ScXMLTableContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLName, const css::uno::Reference<css::xml::sax::XAttributeList>& /*xAttrList*/ ) { diff --git a/sc/source/filter/xml/xmltabi.hxx b/sc/source/filter/xml/xmltabi.hxx index f880a6ad18c8..3071faf1d441 100644 --- a/sc/source/filter/xml/xmltabi.hxx +++ b/sc/source/filter/xml/xmltabi.hxx @@ -53,7 +53,7 @@ public: virtual ~ScXMLTableContext() 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; |