summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-19 14:17:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-19 19:30:52 +0100
commitcf13e985a6112a18e4d405b807a2064092c01b2d (patch)
tree157a7537ffc195094e6c613d2f6335866250ac9b /xmloff
parent39d8ee8f91f4c571030b53febdcba07ea55ca7de (diff)
fastparser in TokenContext
Change-Id: I3e3bdc30f0313288201a77741e55aa89fea2be6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106164 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/xforms/SchemaContext.cxx9
-rw-r--r--xmloff/source/xforms/SchemaContext.hxx2
-rw-r--r--xmloff/source/xforms/SchemaRestrictionContext.cxx12
-rw-r--r--xmloff/source/xforms/SchemaRestrictionContext.hxx2
-rw-r--r--xmloff/source/xforms/SchemaSimpleTypeContext.cxx12
-rw-r--r--xmloff/source/xforms/SchemaSimpleTypeContext.hxx2
-rw-r--r--xmloff/source/xforms/TokenContext.cxx47
-rw-r--r--xmloff/source/xforms/TokenContext.hxx18
-rw-r--r--xmloff/source/xforms/XFormsBindContext.cxx28
-rw-r--r--xmloff/source/xforms/XFormsBindContext.hxx7
-rw-r--r--xmloff/source/xforms/XFormsInstanceContext.cxx17
-rw-r--r--xmloff/source/xforms/XFormsInstanceContext.hxx2
-rw-r--r--xmloff/source/xforms/XFormsModelContext.cxx18
-rw-r--r--xmloff/source/xforms/XFormsModelContext.hxx2
-rw-r--r--xmloff/source/xforms/XFormsSubmissionContext.cxx56
-rw-r--r--xmloff/source/xforms/XFormsSubmissionContext.hxx2
16 files changed, 65 insertions, 171 deletions
diff --git a/xmloff/source/xforms/SchemaContext.cxx b/xmloff/source/xforms/SchemaContext.cxx
index 0ab3fdeefde6..c3f3f6ed5239 100644
--- a/xmloff/source/xforms/SchemaContext.cxx
+++ b/xmloff/source/xforms/SchemaContext.cxx
@@ -35,21 +35,16 @@ using com::sun::star::xforms::XDataTypeRepository;
using namespace xmloff::token;
-const SvXMLTokenMapEntry aAttributes[] =
-{
- XML_TOKEN_MAP_END
-};
-
SchemaContext::SchemaContext(
SvXMLImport& rImport,
const Reference<XDataTypeRepository>& rRepository ) :
- TokenContext( rImport, aAttributes ),
+ TokenContext( rImport ),
mxRepository( rRepository )
{
}
void SchemaContext::HandleAttribute(
- sal_uInt16,
+ sal_Int32,
const OUString& )
{
}
diff --git a/xmloff/source/xforms/SchemaContext.hxx b/xmloff/source/xforms/SchemaContext.hxx
index b92ec292e9e6..bc780d2c4ded 100644
--- a/xmloff/source/xforms/SchemaContext.hxx
+++ b/xmloff/source/xforms/SchemaContext.hxx
@@ -45,7 +45,7 @@ public:
protected:
virtual void HandleAttribute(
- sal_uInt16 nToken,
+ sal_Int32 nAttributeToken,
const OUString& rValue ) override;
virtual SvXMLImportContext* HandleChild(
diff --git a/xmloff/source/xforms/SchemaRestrictionContext.cxx b/xmloff/source/xforms/SchemaRestrictionContext.cxx
index 935ae043ce85..1f46de58e2aa 100644
--- a/xmloff/source/xforms/SchemaRestrictionContext.cxx
+++ b/xmloff/source/xforms/SchemaRestrictionContext.cxx
@@ -53,17 +53,11 @@ using com::sun::star::xforms::XDataTypeRepository;
using namespace xmloff::token;
-const SvXMLTokenMapEntry aAttributes[] =
-{
- TOKEN_MAP_ENTRY( NONE, BASE ),
- XML_TOKEN_MAP_END
-};
-
SchemaRestrictionContext::SchemaRestrictionContext(
SvXMLImport& rImport,
Reference<css::xforms::XDataTypeRepository> const & rRepository,
const OUString& sTypeName ) :
- TokenContext( rImport, aAttributes ),
+ TokenContext( rImport ),
mxRepository( rRepository ),
msTypeName( sTypeName ),
msBaseName()
@@ -97,10 +91,10 @@ void SchemaRestrictionContext::CreateDataType()
}
void SchemaRestrictionContext::HandleAttribute(
- sal_uInt16 nToken,
+ sal_Int32 nAttributeToken,
const OUString& rValue )
{
- if( nToken == XML_BASE )
+ if( nAttributeToken == XML_ELEMENT(NONE, XML_BASE) )
{
msBaseName = rValue;
}
diff --git a/xmloff/source/xforms/SchemaRestrictionContext.hxx b/xmloff/source/xforms/SchemaRestrictionContext.hxx
index 4c338034184a..b928d78b9105 100644
--- a/xmloff/source/xforms/SchemaRestrictionContext.hxx
+++ b/xmloff/source/xforms/SchemaRestrictionContext.hxx
@@ -52,7 +52,7 @@ private:
// implement TokenContext methods:
virtual void HandleAttribute(
- sal_uInt16 nToken,
+ sal_Int32 nAttributeToken,
const OUString& rValue ) override;
virtual SvXMLImportContext* HandleChild(
diff --git a/xmloff/source/xforms/SchemaSimpleTypeContext.cxx b/xmloff/source/xforms/SchemaSimpleTypeContext.cxx
index 7a2c79bf1b84..141975017a6b 100644
--- a/xmloff/source/xforms/SchemaSimpleTypeContext.cxx
+++ b/xmloff/source/xforms/SchemaSimpleTypeContext.cxx
@@ -35,25 +35,19 @@ using com::sun::star::xforms::XDataTypeRepository;
using namespace xmloff::token;
-const SvXMLTokenMapEntry aAttributes[] =
-{
- TOKEN_MAP_ENTRY( NONE, NAME ),
- XML_TOKEN_MAP_END
-};
-
SchemaSimpleTypeContext::SchemaSimpleTypeContext(
SvXMLImport& rImport,
const Reference<XDataTypeRepository>& rRepository ) :
- TokenContext( rImport, aAttributes ),
+ TokenContext( rImport ),
mxRepository( rRepository )
{
}
void SchemaSimpleTypeContext::HandleAttribute(
- sal_uInt16 nToken,
+ sal_Int32 nAttributeToken,
const OUString& rValue )
{
- if( nToken == XML_NAME )
+ if( nAttributeToken == XML_ELEMENT(NONE, XML_NAME) )
{
msTypeName = rValue;
}
diff --git a/xmloff/source/xforms/SchemaSimpleTypeContext.hxx b/xmloff/source/xforms/SchemaSimpleTypeContext.hxx
index 891a7ff594e9..cec535343e5f 100644
--- a/xmloff/source/xforms/SchemaSimpleTypeContext.hxx
+++ b/xmloff/source/xforms/SchemaSimpleTypeContext.hxx
@@ -46,7 +46,7 @@ public:
protected:
virtual void HandleAttribute(
- sal_uInt16 nToken,
+ sal_Int32 nAttributeToken,
const OUString& rValue ) override;
virtual SvXMLImportContext* HandleChild(
diff --git a/xmloff/source/xforms/TokenContext.cxx b/xmloff/source/xforms/TokenContext.cxx
index c4549b97bea5..2cff36c051b4 100644
--- a/xmloff/source/xforms/TokenContext.cxx
+++ b/xmloff/source/xforms/TokenContext.cxx
@@ -29,56 +29,23 @@
#include <algorithm>
using com::sun::star::uno::Reference;
-using com::sun::star::xml::sax::XAttributeList;
-const SvXMLTokenMapEntry aEmptyMap[1] =
-{
- XML_TOKEN_MAP_END
-};
-
-TokenContext::TokenContext( SvXMLImport& rImport,
- const SvXMLTokenMapEntry* pAttributes )
- : SvXMLImportContext( rImport ),
- mpAttributes( pAttributes )
+TokenContext::TokenContext( SvXMLImport& rImport )
+ : SvXMLImportContext( rImport )
{
}
-void TokenContext::StartElement(
- const Reference<XAttributeList>& xAttributeList )
+void TokenContext::startFastElement(
+ sal_Int32 /*nElement*/,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
{
// iterate over attributes
// - if in map: call HandleAttribute
// - xmlns:... : ignore
// - other: warning
- SAL_WARN_IF( mpAttributes == nullptr, "xmloff", "no token map for attributes" );
- SvXMLTokenMap aMap( mpAttributes );
-
- sal_Int16 nCount = xAttributeList->getLength();
- for( sal_Int16 i = 0; i < nCount; i++ )
- {
- // get key/local-name pair from namespace map
- OUString sLocalName;
- sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
- GetKeyByAttrName( xAttributeList->getNameByIndex(i), &sLocalName );
- // get token from token map
- sal_uInt16 nToken = aMap.Get( nPrefix, sLocalName );
-
- // and the value...
- const OUString& rValue = xAttributeList->getValueByIndex(i);
-
- if( nToken != XML_TOK_UNKNOWN )
- {
- HandleAttribute( nToken, rValue );
- }
- else if( nPrefix != XML_NAMESPACE_XMLNS )
- {
- // error handling, for all attribute that are not
- // namespace declarations
- GetImport().SetError( XMLERROR_UNKNOWN_ATTRIBUTE,
- sLocalName, rValue);
- }
- }
+ for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
+ HandleAttribute( aIter.getToken(), aIter.toString() );
}
css::uno::Reference< css::xml::sax::XFastContextHandler > TokenContext::createFastChildContext(
diff --git a/xmloff/source/xforms/TokenContext.hxx b/xmloff/source/xforms/TokenContext.hxx
index 390812a689a9..c7dd2971cb4d 100644
--- a/xmloff/source/xforms/TokenContext.hxx
+++ b/xmloff/source/xforms/TokenContext.hxx
@@ -24,34 +24,26 @@
#include <xmloff/xmltkmap.hxx>
namespace com::sun::star {
- namespace xml::sax { class XAttributeList; }
namespace xml::sax { class XFastAttributeList; }
namespace uno { template<typename T> class Reference; }
}
class SvXMLImport;
-#define TOKEN_MAP_ENTRY(NAMESPACE,TOKEN) { XML_NAMESPACE_##NAMESPACE, xmloff::token::XML_##TOKEN, xmloff::token::XML_##TOKEN }
-
-extern const SvXMLTokenMapEntry aEmptyMap[1];
-
/** handle attributes through an SvXMLTokenMap */
class TokenContext : public SvXMLImportContext
{
-protected:
- const SvXMLTokenMapEntry* mpAttributes; /// static token map
-
public:
- TokenContext( SvXMLImport& rImport,
- const SvXMLTokenMapEntry* pAttributes );
+ TokenContext( SvXMLImport& rImport );
// implement SvXMLImportContext methods:
/** call HandleAttribute for each attribute in the token map;
* create a warning for all others. Classes that wish to override
* StartElement need to call the parent method. */
- virtual void StartElement(
- const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList ) override;
+ virtual void SAL_CALL startFastElement(
+ sal_Int32 nElement,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
/** call HandleChild for each child element in the token map;
* create a warning for all others. Classes that wish to override
@@ -69,7 +61,7 @@ public:
protected:
/** will be called for each attribute */
virtual void HandleAttribute(
- sal_uInt16 nToken,
+ sal_Int32 nAttributeToken,
const OUString& rValue ) = 0;
/** will be called for each child element */
diff --git a/xmloff/source/xforms/XFormsBindContext.cxx b/xmloff/source/xforms/XFormsBindContext.cxx
index 9348fea46b02..fb3d9f68dc49 100644
--- a/xmloff/source/xforms/XFormsBindContext.cxx
+++ b/xmloff/source/xforms/XFormsBindContext.cxx
@@ -39,25 +39,10 @@ using com::sun::star::uno::Reference;
using com::sun::star::uno::makeAny;
using com::sun::star::uno::UNO_QUERY;
using com::sun::star::container::XNameContainer;
-using com::sun::star::xml::sax::XAttributeList;
using com::sun::star::xml::sax::XFastAttributeList;
using com::sun::star::xforms::XModel2;
using namespace xmloff::token;
-
-const struct SvXMLTokenMapEntry aAttributeMap[] =
-{
- TOKEN_MAP_ENTRY( NONE, NODESET ),
- TOKEN_MAP_ENTRY( NONE, ID ),
- TOKEN_MAP_ENTRY( NONE, READONLY ),
- TOKEN_MAP_ENTRY( NONE, RELEVANT ),
- TOKEN_MAP_ENTRY( NONE, REQUIRED ),
- TOKEN_MAP_ENTRY( NONE, CONSTRAINT ),
- TOKEN_MAP_ENTRY( NONE, CALCULATE ),
- TOKEN_MAP_ENTRY( NONE, TYPE ),
- XML_TOKEN_MAP_END
-};
-
// helper function; see below
static void lcl_fillNamespaceContainer( const SvXMLNamespaceMap&,
Reference<XNameContainer> const & );
@@ -65,7 +50,7 @@ static void lcl_fillNamespaceContainer( const SvXMLNamespaceMap&,
XFormsBindContext::XFormsBindContext(
SvXMLImport& rImport,
const Reference<XModel2>& xModel ) :
- TokenContext( rImport, aAttributeMap ),
+ TokenContext( rImport ),
mxModel( xModel )
{
// attach binding to model
@@ -74,10 +59,10 @@ XFormsBindContext::XFormsBindContext(
mxModel->getBindings()->insert( makeAny( mxBinding ) );
}
-void XFormsBindContext::HandleAttribute( sal_uInt16 nToken,
+void XFormsBindContext::HandleAttribute( sal_Int32 nAttributeToken,
const OUString& rValue )
{
- switch( nToken )
+ switch( nAttributeToken & TOKEN_MASK )
{
case XML_NODESET:
xforms_setValue( mxBinding, "BindingExpression", rValue );
@@ -112,8 +97,9 @@ void XFormsBindContext::HandleAttribute( sal_uInt16 nToken,
}
}
-void XFormsBindContext::StartElement(
- const Reference<XAttributeList>& xAttributeList )
+void XFormsBindContext::startFastElement(
+ sal_Int32 nElement,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
{
// we need to register the namespaces
Reference<XNameContainer> xContainer(
@@ -125,7 +111,7 @@ void XFormsBindContext::StartElement(
lcl_fillNamespaceContainer( GetImport().GetNamespaceMap(), xContainer);
// call super-class for attribute handling
- TokenContext::StartElement( xAttributeList );
+ TokenContext::startFastElement( nElement, xAttrList );
}
/** will be called for each child element */
diff --git a/xmloff/source/xforms/XFormsBindContext.hxx b/xmloff/source/xforms/XFormsBindContext.hxx
index 46fc38df4d43..9498851ef072 100644
--- a/xmloff/source/xforms/XFormsBindContext.hxx
+++ b/xmloff/source/xforms/XFormsBindContext.hxx
@@ -44,11 +44,12 @@ public:
// implement SvXMLImportContext & TokenContext methods:
- virtual void StartElement(
- const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList ) override;
+ virtual void SAL_CALL startFastElement(
+ sal_Int32 nElement,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
protected:
- virtual void HandleAttribute( sal_uInt16 nToken,
+ virtual void HandleAttribute( sal_Int32 nAttributeToken,
const OUString& rValue ) override;
virtual SvXMLImportContext* HandleChild(
diff --git a/xmloff/source/xforms/XFormsInstanceContext.cxx b/xmloff/source/xforms/XFormsInstanceContext.cxx
index 86e11cff4132..90fa14f29b49 100644
--- a/xmloff/source/xforms/XFormsInstanceContext.cxx
+++ b/xmloff/source/xforms/XFormsInstanceContext.cxx
@@ -46,17 +46,10 @@ using com::sun::star::xml::sax::XAttributeList;
using xmloff::token::XML_SRC;
using xmloff::token::XML_ID;
-const SvXMLTokenMapEntry aAttributes[] =
-{
- TOKEN_MAP_ENTRY( NONE, SRC ),
- TOKEN_MAP_ENTRY( NONE, ID ),
- XML_TOKEN_MAP_END
-};
-
XFormsInstanceContext::XFormsInstanceContext(
SvXMLImport& rImport,
const Reference<XModel2> & xModel ) :
- TokenContext( rImport, aAttributes ),
+ TokenContext( rImport ),
mxModel( xModel )
{
SAL_WARN_IF( !mxModel.is(), "xmloff", "need model" );
@@ -104,15 +97,15 @@ void XFormsInstanceContext::endFastElement(sal_Int32 )
void XFormsInstanceContext::HandleAttribute(
- sal_uInt16 nToken,
+ sal_Int32 nAttributeToken,
const OUString& rValue )
{
- switch( nToken )
+ switch( nAttributeToken )
{
- case XML_SRC:
+ case XML_ELEMENT(NONE, XML_SRC):
msURL = rValue;
break;
- case XML_ID:
+ case XML_ELEMENT(NONE, XML_ID):
msId = rValue;
break;
default:
diff --git a/xmloff/source/xforms/XFormsInstanceContext.hxx b/xmloff/source/xforms/XFormsInstanceContext.hxx
index 337a6934e039..02b76c37f910 100644
--- a/xmloff/source/xforms/XFormsInstanceContext.hxx
+++ b/xmloff/source/xforms/XFormsInstanceContext.hxx
@@ -57,7 +57,7 @@ public:
protected:
virtual void HandleAttribute(
- sal_uInt16 nToken,
+ sal_Int32 nAttributeToken,
const OUString& rValue ) override;
virtual SvXMLImportContext* HandleChild(
diff --git a/xmloff/source/xforms/XFormsModelContext.cxx b/xmloff/source/xforms/XFormsModelContext.cxx
index 966b93837edc..d07bedb6f254 100644
--- a/xmloff/source/xforms/XFormsModelContext.cxx
+++ b/xmloff/source/xforms/XFormsModelContext.cxx
@@ -38,35 +38,27 @@
#include <com/sun/star/xforms/XModel2.hpp>
-using com::sun::star::xml::sax::XAttributeList;
using com::sun::star::util::XUpdatable;
using namespace com::sun::star::uno;
using namespace xmloff::token;
-const SvXMLTokenMapEntry aAttributes[] =
-{
- TOKEN_MAP_ENTRY( NONE, ID ),
- TOKEN_MAP_ENTRY( NONE, SCHEMA ),
- XML_TOKEN_MAP_END
-};
-
XFormsModelContext::XFormsModelContext( SvXMLImport& rImport ) :
- TokenContext( rImport, aAttributes ),
+ TokenContext( rImport ),
mxModel( xforms_createXFormsModel() )
{
}
void XFormsModelContext::HandleAttribute(
- sal_uInt16 nToken,
+ sal_Int32 nAttributeToken,
const OUString& rValue )
{
- switch( nToken )
+ switch( nAttributeToken )
{
- case XML_ID:
+ case XML_ELEMENT(NONE, XML_ID):
mxModel->setPropertyValue( "ID", makeAny( rValue ) );
break;
- case XML_SCHEMA:
+ case XML_ELEMENT(NONE, XML_SCHEMA):
GetImport().SetError( XMLERROR_XFORMS_NO_SCHEMA_SUPPORT );
break;
default:
diff --git a/xmloff/source/xforms/XFormsModelContext.hxx b/xmloff/source/xforms/XFormsModelContext.hxx
index 1a23659317f5..e2f0e1ee5712 100644
--- a/xmloff/source/xforms/XFormsModelContext.hxx
+++ b/xmloff/source/xforms/XFormsModelContext.hxx
@@ -46,7 +46,7 @@ public:
protected:
virtual void HandleAttribute(
- sal_uInt16 nToken,
+ sal_Int32 nAttributeToken,
const OUString& rValue ) override;
virtual SvXMLImportContext* HandleChild(
diff --git a/xmloff/source/xforms/XFormsSubmissionContext.cxx b/xmloff/source/xforms/XFormsSubmissionContext.cxx
index e25a8bc2dafa..08c927e72599 100644
--- a/xmloff/source/xforms/XFormsSubmissionContext.cxx
+++ b/xmloff/source/xforms/XFormsSubmissionContext.cxx
@@ -41,30 +41,10 @@ using namespace com::sun::star::uno;
using namespace xmloff::token;
-const struct SvXMLTokenMapEntry aAttributeMap[] =
-{
- TOKEN_MAP_ENTRY( NONE, ID ),
- TOKEN_MAP_ENTRY( NONE, BIND ),
- TOKEN_MAP_ENTRY( NONE, REF ),
- TOKEN_MAP_ENTRY( NONE, ACTION ),
- TOKEN_MAP_ENTRY( NONE, METHOD ),
- TOKEN_MAP_ENTRY( NONE, VERSION ),
- TOKEN_MAP_ENTRY( NONE, INDENT ),
- TOKEN_MAP_ENTRY( NONE, MEDIATYPE ),
- TOKEN_MAP_ENTRY( NONE, ENCODING ),
- TOKEN_MAP_ENTRY( NONE, OMIT_XML_DECLARATION ),
- TOKEN_MAP_ENTRY( NONE, STANDALONE ),
- TOKEN_MAP_ENTRY( NONE, CDATA_SECTION_ELEMENTS ),
- TOKEN_MAP_ENTRY( NONE, REPLACE ),
- TOKEN_MAP_ENTRY( NONE, SEPARATOR ),
- TOKEN_MAP_ENTRY( NONE, INCLUDENAMESPACEPREFIXES ),
- XML_TOKEN_MAP_END
-};
-
XFormsSubmissionContext::XFormsSubmissionContext(
SvXMLImport& rImport,
const Reference<XModel2>& xModel ) :
- TokenContext( rImport, aAttributeMap ),
+ TokenContext( rImport ),
mxSubmission()
{
// register submission with model
@@ -89,55 +69,55 @@ Any toBool( const OUString& rValue )
} // namespace
-void XFormsSubmissionContext::HandleAttribute( sal_uInt16 nToken,
+void XFormsSubmissionContext::HandleAttribute( sal_Int32 nAttributeToken,
const OUString& rValue )
{
- switch( nToken )
+ switch( nAttributeToken )
{
- case XML_ID:
+ case XML_ELEMENT(NONE, XML_ID):
xforms_setValue( mxSubmission, "ID", rValue );
break;
- case XML_BIND:
+ case XML_ELEMENT(NONE, XML_BIND):
xforms_setValue( mxSubmission, "Bind", rValue );
break;
- case XML_REF:
+ case XML_ELEMENT(NONE, XML_REF):
xforms_setValue( mxSubmission, "Ref", rValue );
break;
- case XML_ACTION:
+ case XML_ELEMENT(NONE, XML_ACTION):
xforms_setValue( mxSubmission, "Action", rValue );
break;
- case XML_METHOD:
+ case XML_ELEMENT(NONE, XML_METHOD):
xforms_setValue( mxSubmission, "Method", rValue );
break;
- case XML_VERSION:
+ case XML_ELEMENT(NONE, XML_VERSION):
xforms_setValue( mxSubmission, "Version", rValue );
break;
- case XML_INDENT:
+ case XML_ELEMENT(NONE, XML_INDENT):
xforms_setValue( mxSubmission, "Indent", toBool( rValue ) );
break;
- case XML_MEDIATYPE:
+ case XML_ELEMENT(NONE, XML_MEDIATYPE):
xforms_setValue( mxSubmission, "MediaType", rValue );
break;
- case XML_ENCODING:
+ case XML_ELEMENT(NONE, XML_ENCODING):
xforms_setValue( mxSubmission, "Encoding", rValue );
break;
- case XML_OMIT_XML_DECLARATION:
+ case XML_ELEMENT(NONE, XML_OMIT_XML_DECLARATION):
xforms_setValue( mxSubmission, "OmitXmlDeclaration",
toBool( rValue ) );
break;
- case XML_STANDALONE:
+ case XML_ELEMENT(NONE, XML_STANDALONE):
xforms_setValue( mxSubmission, "Standalone", toBool( rValue ) );
break;
- case XML_CDATA_SECTION_ELEMENTS:
+ case XML_ELEMENT(NONE, XML_CDATA_SECTION_ELEMENTS):
xforms_setValue( mxSubmission, "CDataSectionElement", rValue );
break;
- case XML_REPLACE:
+ case XML_ELEMENT(NONE, XML_REPLACE):
xforms_setValue( mxSubmission, "Replace", rValue );
break;
- case XML_SEPARATOR:
+ case XML_ELEMENT(NONE, XML_SEPARATOR):
xforms_setValue( mxSubmission, "Separator", rValue );
break;
- case XML_INCLUDENAMESPACEPREFIXES:
+ case XML_ELEMENT(NONE, XML_INCLUDENAMESPACEPREFIXES):
xforms_setValue( mxSubmission, "IncludeNamespacePrefixes", rValue );
break;
default:
diff --git a/xmloff/source/xforms/XFormsSubmissionContext.hxx b/xmloff/source/xforms/XFormsSubmissionContext.hxx
index 23d248574e90..8234e935b87f 100644
--- a/xmloff/source/xforms/XFormsSubmissionContext.hxx
+++ b/xmloff/source/xforms/XFormsSubmissionContext.hxx
@@ -44,7 +44,7 @@ public:
// implement TokenContext methods:
protected:
- virtual void HandleAttribute( sal_uInt16 nToken,
+ virtual void HandleAttribute( sal_Int32 nAttributeToken,
const OUString& rValue ) override;
virtual SvXMLImportContext* HandleChild(