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 /dbaccess | |
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 'dbaccess')
22 files changed, 32 insertions, 32 deletions
diff --git a/dbaccess/source/filter/xml/xmlConnectionData.cxx b/dbaccess/source/filter/xml/xmlConnectionData.cxx index c3be7fedaf49..b56f963fa10e 100644 --- a/dbaccess/source/filter/xml/xmlConnectionData.cxx +++ b/dbaccess/source/filter/xml/xmlConnectionData.cxx @@ -48,7 +48,7 @@ OXMLConnectionData::~OXMLConnectionData() } -SvXMLImportContext* OXMLConnectionData::CreateChildContext( +SvXMLImportContextRef OXMLConnectionData::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) diff --git a/dbaccess/source/filter/xml/xmlConnectionData.hxx b/dbaccess/source/filter/xml/xmlConnectionData.hxx index ccf15831edca..57d0c07ef9fa 100644 --- a/dbaccess/source/filter/xml/xmlConnectionData.hxx +++ b/dbaccess/source/filter/xml/xmlConnectionData.hxx @@ -37,7 +37,7 @@ namespace dbaxml const OUString& rLName); virtual ~OXMLConnectionData() 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/dbaccess/source/filter/xml/xmlDataSource.cxx b/dbaccess/source/filter/xml/xmlDataSource.cxx index e57ba90947d7..c7cabc302183 100644 --- a/dbaccess/source/filter/xml/xmlDataSource.cxx +++ b/dbaccess/source/filter/xml/xmlDataSource.cxx @@ -204,7 +204,7 @@ OXMLDataSource::~OXMLDataSource() } -SvXMLImportContext* OXMLDataSource::CreateChildContext( +SvXMLImportContextRef OXMLDataSource::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) diff --git a/dbaccess/source/filter/xml/xmlDataSource.hxx b/dbaccess/source/filter/xml/xmlDataSource.hxx index 4c863c4d2cde..d78fec0c6d4f 100644 --- a/dbaccess/source/filter/xml/xmlDataSource.hxx +++ b/dbaccess/source/filter/xml/xmlDataSource.hxx @@ -43,7 +43,7 @@ namespace dbaxml const UsedFor _eUsedFor = eDataSource ); virtual ~OXMLDataSource() 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/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx index fe0b336a74a5..381ba18ac550 100644 --- a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx +++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx @@ -100,7 +100,7 @@ OXMLDataSourceSetting::~OXMLDataSourceSetting() { } -SvXMLImportContext* OXMLDataSourceSetting::CreateChildContext( +SvXMLImportContextRef OXMLDataSourceSetting::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.hxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.hxx index 3f3afb7ada7a..293a9004185b 100644 --- a/dbaccess/source/filter/xml/xmlDataSourceSetting.hxx +++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.hxx @@ -44,7 +44,7 @@ namespace dbaxml ,OXMLDataSourceSetting* _pContainer = nullptr); virtual ~OXMLDataSourceSetting() 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/dbaccess/source/filter/xml/xmlDataSourceSettings.cxx b/dbaccess/source/filter/xml/xmlDataSourceSettings.cxx index e9378590dd1d..0ac34592f065 100644 --- a/dbaccess/source/filter/xml/xmlDataSourceSettings.cxx +++ b/dbaccess/source/filter/xml/xmlDataSourceSettings.cxx @@ -47,7 +47,7 @@ OXMLDataSourceSettings::~OXMLDataSourceSettings() } -SvXMLImportContext* OXMLDataSourceSettings::CreateChildContext( +SvXMLImportContextRef OXMLDataSourceSettings::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) diff --git a/dbaccess/source/filter/xml/xmlDataSourceSettings.hxx b/dbaccess/source/filter/xml/xmlDataSourceSettings.hxx index 86259047b310..1812212479f0 100644 --- a/dbaccess/source/filter/xml/xmlDataSourceSettings.hxx +++ b/dbaccess/source/filter/xml/xmlDataSourceSettings.hxx @@ -32,7 +32,7 @@ namespace dbaxml OXMLDataSourceSettings( ODBFilter& rImport, sal_uInt16 nPrfx,const OUString& rLName); virtual ~OXMLDataSourceSettings() 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/dbaccess/source/filter/xml/xmlDatabase.cxx b/dbaccess/source/filter/xml/xmlDatabase.cxx index e79c57efe3e0..e4d0651ff852 100644 --- a/dbaccess/source/filter/xml/xmlDatabase.cxx +++ b/dbaccess/source/filter/xml/xmlDatabase.cxx @@ -51,7 +51,7 @@ OXMLDatabase::~OXMLDatabase() } -SvXMLImportContext* OXMLDatabase::CreateChildContext( +SvXMLImportContextRef OXMLDatabase::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) diff --git a/dbaccess/source/filter/xml/xmlDatabase.hxx b/dbaccess/source/filter/xml/xmlDatabase.hxx index 93e3167c2501..73dd1cfa8de4 100644 --- a/dbaccess/source/filter/xml/xmlDatabase.hxx +++ b/dbaccess/source/filter/xml/xmlDatabase.hxx @@ -33,7 +33,7 @@ namespace dbaxml const OUString& rLName ); virtual ~OXMLDatabase() 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/dbaccess/source/filter/xml/xmlDatabaseDescription.cxx b/dbaccess/source/filter/xml/xmlDatabaseDescription.cxx index bc6b1eb1c72a..c03537f74270 100644 --- a/dbaccess/source/filter/xml/xmlDatabaseDescription.cxx +++ b/dbaccess/source/filter/xml/xmlDatabaseDescription.cxx @@ -46,7 +46,7 @@ OXMLDatabaseDescription::~OXMLDatabaseDescription() } -SvXMLImportContext* OXMLDatabaseDescription::CreateChildContext( +SvXMLImportContextRef OXMLDatabaseDescription::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) diff --git a/dbaccess/source/filter/xml/xmlDatabaseDescription.hxx b/dbaccess/source/filter/xml/xmlDatabaseDescription.hxx index 7004cf1b0c18..a95f1f546901 100644 --- a/dbaccess/source/filter/xml/xmlDatabaseDescription.hxx +++ b/dbaccess/source/filter/xml/xmlDatabaseDescription.hxx @@ -37,7 +37,7 @@ namespace dbaxml const OUString& rLName); virtual ~OXMLDatabaseDescription() 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/dbaccess/source/filter/xml/xmlDocuments.cxx b/dbaccess/source/filter/xml/xmlDocuments.cxx index b8137f2233a4..b7d3d364837a 100644 --- a/dbaccess/source/filter/xml/xmlDocuments.cxx +++ b/dbaccess/source/filter/xml/xmlDocuments.cxx @@ -65,7 +65,7 @@ OXMLDocuments::~OXMLDocuments() } -SvXMLImportContext* OXMLDocuments::CreateChildContext( +SvXMLImportContextRef OXMLDocuments::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) diff --git a/dbaccess/source/filter/xml/xmlDocuments.hxx b/dbaccess/source/filter/xml/xmlDocuments.hxx index 6ee6fe85164b..d0141d632550 100644 --- a/dbaccess/source/filter/xml/xmlDocuments.hxx +++ b/dbaccess/source/filter/xml/xmlDocuments.hxx @@ -54,7 +54,7 @@ namespace dbaxml virtual ~OXMLDocuments() 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/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx index 9d82f99b5622..ce76062cecad 100644 --- a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx +++ b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx @@ -110,7 +110,7 @@ OXMLHierarchyCollection::~OXMLHierarchyCollection() } -SvXMLImportContext* OXMLHierarchyCollection::CreateChildContext( +SvXMLImportContextRef OXMLHierarchyCollection::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) diff --git a/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx b/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx index 601d858111aa..4552b50b7094 100644 --- a/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx +++ b/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx @@ -54,7 +54,7 @@ namespace dbaxml ); virtual ~OXMLHierarchyCollection() 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/dbaccess/source/filter/xml/xmlQuery.cxx b/dbaccess/source/filter/xml/xmlQuery.cxx index e93d411df2af..fce31f35dc3c 100644 --- a/dbaccess/source/filter/xml/xmlQuery.cxx +++ b/dbaccess/source/filter/xml/xmlQuery.cxx @@ -76,32 +76,32 @@ OXMLQuery::~OXMLQuery() } -SvXMLImportContext* OXMLQuery::CreateChildContext( +SvXMLImportContextRef OXMLQuery::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext* pContext = OXMLTable::CreateChildContext(nPrefix, rLocalName,xAttrList ); - if ( !pContext ) + SvXMLImportContextRef xContext = OXMLTable::CreateChildContext(nPrefix, rLocalName,xAttrList ); + if (!xContext) { const SvXMLTokenMap& rTokenMap = GetOwnImport().GetQueryElemTokenMap(); switch( rTokenMap.Get( nPrefix, rLocalName ) ) { case XML_TOK_UPDATE_TABLE: - { - GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); - OUString s1; - fillAttributes(xAttrList,s1,m_sTable,m_sSchema,m_sCatalog); - } + { + GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); + OUString s1; + fillAttributes(xAttrList,s1,m_sTable,m_sSchema,m_sCatalog); break; + } } } - if( !pContext ) - pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); + if (!xContext) + xContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); - return pContext; + return xContext; } void OXMLQuery::setProperties(Reference< XPropertySet > & _xProp ) diff --git a/dbaccess/source/filter/xml/xmlQuery.hxx b/dbaccess/source/filter/xml/xmlQuery.hxx index 37668d3ec6b5..995d406a9d39 100644 --- a/dbaccess/source/filter/xml/xmlQuery.hxx +++ b/dbaccess/source/filter/xml/xmlQuery.hxx @@ -42,7 +42,7 @@ namespace dbaxml ); virtual ~OXMLQuery() 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/dbaccess/source/filter/xml/xmlTable.cxx b/dbaccess/source/filter/xml/xmlTable.cxx index b6ca98b0d84a..e5ba49dae372 100644 --- a/dbaccess/source/filter/xml/xmlTable.cxx +++ b/dbaccess/source/filter/xml/xmlTable.cxx @@ -103,7 +103,7 @@ OXMLTable::~OXMLTable() } -SvXMLImportContext* OXMLTable::CreateChildContext( +SvXMLImportContextRef OXMLTable::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList > & xAttrList ) diff --git a/dbaccess/source/filter/xml/xmlTable.hxx b/dbaccess/source/filter/xml/xmlTable.hxx index 601fbec12677..b9cd2e14c68f 100644 --- a/dbaccess/source/filter/xml/xmlTable.hxx +++ b/dbaccess/source/filter/xml/xmlTable.hxx @@ -62,7 +62,7 @@ namespace dbaxml ); 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; virtual void EndElement() override; diff --git a/dbaccess/source/filter/xml/xmlTableFilterList.cxx b/dbaccess/source/filter/xml/xmlTableFilterList.cxx index 20427c2a0df6..cfcc00a7a88b 100644 --- a/dbaccess/source/filter/xml/xmlTableFilterList.cxx +++ b/dbaccess/source/filter/xml/xmlTableFilterList.cxx @@ -46,7 +46,7 @@ OXMLTableFilterList::~OXMLTableFilterList() { } -SvXMLImportContext* OXMLTableFilterList::CreateChildContext( +SvXMLImportContextRef OXMLTableFilterList::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & /*xAttrList*/ ) diff --git a/dbaccess/source/filter/xml/xmlTableFilterList.hxx b/dbaccess/source/filter/xml/xmlTableFilterList.hxx index 3360131e6286..7df344594135 100644 --- a/dbaccess/source/filter/xml/xmlTableFilterList.hxx +++ b/dbaccess/source/filter/xml/xmlTableFilterList.hxx @@ -38,7 +38,7 @@ namespace dbaxml virtual ~OXMLTableFilterList() 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; |