summaryrefslogtreecommitdiff
path: root/xmloff/source/table
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-01-20 15:28:45 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-20 15:41:53 +0100
commitf3797630be6ab21179e2496cc56a6d41f0ee8144 (patch)
tree16124e4e571065b7aa87bb90892926c58db3cafc /xmloff/source/table
parent552ec2a3e53c5267ee04dca2249fd30983c6a395 (diff)
return nullptr from CreateChildContext methods in subclasses
the calling class handles this nicely, and also tells us when we are not handling some part of the XML file Change-Id: Ib64a704bc96bb4d6eff2d57116d62c9c15e25c6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87073 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/table')
-rw-r--r--xmloff/source/table/XMLTableImport.cxx18
1 files changed, 7 insertions, 11 deletions
diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx
index 6caa85c9afbb..45b4693f7d35 100644
--- a/xmloff/source/table/XMLTableImport.cxx
+++ b/xmloff/source/table/XMLTableImport.cxx
@@ -181,8 +181,7 @@ SvXMLImportContextRef XMLProxyContext::CreateChildContext( sal_uInt16 nPrefix, c
{
if( mxParent.is() )
return mxParent->CreateChildContext( nPrefix, rLocalName, xAttrList );
- else
- return SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList );
+ return nullptr;
}
@@ -366,7 +365,7 @@ XMLTableImportContext::XMLTableImportContext( const rtl::Reference< XMLTableImpo
{
}
-SvXMLImportContextRef XMLTableImportContext::ImportColumn( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList )
+SvXMLImportContextRef XMLTableImportContext::ImportColumn( sal_uInt16 /*nPrefix*/, const OUString& /*rLocalName*/, const Reference< XAttributeList >& xAttrList )
{
if( mxColumns.is() && (mnCurrentRow == -1) ) try
{
@@ -419,7 +418,7 @@ SvXMLImportContextRef XMLTableImportContext::ImportColumn( sal_uInt16 nPrefix, c
OSL_FAIL("xmloff::XMLTableImportContext::ImportTableColumn(), exception caught!");
}
- return SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList);
+ return nullptr;
}
void XMLTableImportContext::InitColumns()
@@ -558,7 +557,7 @@ SvXMLImportContextRef XMLTableImportContext::ImportCell( sal_uInt16 nPrefix, con
OSL_FAIL("xmloff::XMLTableImportContext::ImportCell(), exception caught!");
}
- return SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList);
+ return nullptr;
}
SvXMLImportContextRef XMLTableImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList )
@@ -578,7 +577,7 @@ SvXMLImportContextRef XMLTableImportContext::CreateChildContext( sal_uInt16 nPre
}
}
- return SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList);
+ return nullptr;
}
void XMLTableImportContext::StartElement( const Reference< XAttributeList >& /*xAttrList*/ )
@@ -713,10 +712,7 @@ SvXMLImportContextRef XMLCellImportContext::CreateChildContext( sal_uInt16 nPref
pContext = GetImport().GetTextImport()->CreateTextChildContext( GetImport(), nPrefix, rLocalName, xAttrList );
}
- if( pContext )
- return pContext;
- else
- return SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList);
+ return pContext;
}
void XMLCellImportContext::EndElement()
@@ -824,7 +820,7 @@ SvXMLImportContextRef XMLTableTemplateContext::CreateChildContext( sal_uInt16 nP
}
}
- return SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList );
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */