summaryrefslogtreecommitdiff
path: root/xmloff/source/xforms/SchemaContext.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-01-07 13:01:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-07 17:45:03 +0100
commite1383444c6d00f5d0b1d507670517f45988b9cc7 (patch)
tree5304b99014f1b2236456923a3e98b2c0dbf31511 /xmloff/source/xforms/SchemaContext.cxx
parent0f4dd820ee433932d9d9237b676292d31c4ba913 (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/xforms/SchemaContext.cxx')
-rw-r--r--xmloff/source/xforms/SchemaContext.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmloff/source/xforms/SchemaContext.cxx b/xmloff/source/xforms/SchemaContext.cxx
index 210133a4868c..6c19cbfa019a 100644
--- a/xmloff/source/xforms/SchemaContext.cxx
+++ b/xmloff/source/xforms/SchemaContext.cxx
@@ -67,10 +67,10 @@ SvXMLImportContext* SchemaContext::HandleChild(
const OUString& rLocalName,
const Reference<XAttributeList>& )
{
- return ( nToken == XML_SIMPLETYPE )
- ? new SchemaSimpleTypeContext( GetImport(), nPrefix, rLocalName,
- mxRepository )
- : new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+ if ( nToken == XML_SIMPLETYPE )
+ return new SchemaSimpleTypeContext( GetImport(), nPrefix, rLocalName,
+ mxRepository );
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */