From e1383444c6d00f5d0b1d507670517f45988b9cc7 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 7 Jan 2020 13:01:41 +0200 Subject: extract some common code from ImportContext classes which reduces code bloat, and lets us log when elements are ignored Change-Id: I5ca12bc1fcbfa3bea49ebde819fd80bd233a96a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86338 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/source/filter/xml/xmlimp.cxx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'sw/source/filter/xml/xmlimp.cxx') diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 6b9a18327714..eb755dcd11db 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -220,7 +220,7 @@ SwXMLDocContext_Impl::SwXMLDocContext_Impl( SwXMLImport& rImport ) : uno::Reference< xml::sax::XFastContextHandler > SAL_CALL SwXMLDocContext_Impl::createFastChildContext( sal_Int32 /*nElement*/, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ ) { - return new SvXMLImportContext( GetImport() ); + return nullptr; } SvXMLImportContextRef SwXMLDocContext_Impl::CreateChildContext( @@ -274,9 +274,6 @@ SvXMLImportContextRef SwXMLDocContext_Impl::CreateChildContext( break; } - if( !pContext ) - pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); - return pContext; } @@ -412,8 +409,6 @@ SvXMLImportContext *SwXMLImport::CreateFastContext( sal_Int32 nElement, pContext = new SwXMLOfficeDocContext_Impl( *this, xDocProps ); } break; - default: - pContext = new SvXMLImportContext( *this ); } return pContext; } -- cgit