diff options
Diffstat (limited to 'xmloff/source/xforms/SchemaContext.cxx')
-rw-r--r-- | xmloff/source/xforms/SchemaContext.cxx | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/xmloff/source/xforms/SchemaContext.cxx b/xmloff/source/xforms/SchemaContext.cxx index 6c19cbfa019a..36346bc9393f 100644 --- a/xmloff/source/xforms/SchemaContext.cxx +++ b/xmloff/source/xforms/SchemaContext.cxx @@ -25,6 +25,7 @@ #include <xmloff/xmltoken.hxx> #include <xmloff/xmlnmspe.hxx> #include <xmloff/xmltkmap.hxx> +#include <xmloff/xmlimp.hxx> #include <com/sun/star/xforms/XDataTypeRepository.hpp> @@ -34,42 +35,27 @@ using com::sun::star::xforms::XDataTypeRepository; using namespace xmloff::token; -static const SvXMLTokenMapEntry aAttributes[] = -{ - XML_TOKEN_MAP_END -}; - -static const SvXMLTokenMapEntry aChildren[] = -{ - TOKEN_MAP_ENTRY( XSD, SIMPLETYPE ), - XML_TOKEN_MAP_END -}; - SchemaContext::SchemaContext( SvXMLImport& rImport, - sal_uInt16 nPrefix, - const OUString& rLocalName, const Reference<XDataTypeRepository>& rRepository ) : - TokenContext( rImport, nPrefix, rLocalName, aAttributes, aChildren ), + TokenContext( rImport ), mxRepository( rRepository ) { } -void SchemaContext::HandleAttribute( - sal_uInt16, +bool SchemaContext::HandleAttribute( + sal_Int32 , const OUString& ) { + return false; } SvXMLImportContext* SchemaContext::HandleChild( - sal_uInt16 nToken, - sal_uInt16 nPrefix, - const OUString& rLocalName, - const Reference<XAttributeList>& ) + sal_Int32 nElement, + const Reference<css::xml::sax::XFastAttributeList>& ) { - if ( nToken == XML_SIMPLETYPE ) - return new SchemaSimpleTypeContext( GetImport(), nPrefix, rLocalName, - mxRepository ); + if ( nElement == XML_ELEMENT(XSD, XML_SIMPLETYPE)) + return new SchemaSimpleTypeContext( GetImport(), mxRepository ); return nullptr; } |