diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-06-27 15:49:40 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-06-27 16:22:39 +0200 |
commit | d752e0b9aaa0b08f80b0e903633f80912cd9325f (patch) | |
tree | b7452f7bf4ceb17c7f02d8decfd25c0c5e629a0c /include/xmloff | |
parent | 6e427e0bd194ae74e704e2cdbe6fe183eafbf4c5 (diff) |
xmloff: remove obnoxious ## usage from XML_NAMESPACE macros
So we can finally grep these things.
Change-Id: I7ab4d0c82d8abf3fad4063321fc73772a7a6cb8d
Diffstat (limited to 'include/xmloff')
-rw-r--r-- | include/xmloff/xmlnmspe.hxx | 172 |
1 files changed, 85 insertions, 87 deletions
diff --git a/include/xmloff/xmlnmspe.hxx b/include/xmloff/xmlnmspe.hxx index d1811e258ab4..a00628b6b999 100644 --- a/include/xmloff/xmlnmspe.hxx +++ b/include/xmloff/xmlnmspe.hxx @@ -23,122 +23,120 @@ #include <sal/types.h> #define XML_NAMESPACE( prefix, key ) \ -const sal_uInt16 XML_NAMESPACE_##prefix = key; - -#define XML_OLD_NAMESPACE( prefix, index ) \ -const sal_uInt16 XML_OLD_NAMESPACE_##prefix = \ - (XML_OLD_NAMESPACE_BASE+index); +const sal_uInt16 prefix = key; // current namespaces // These namespaces have the same index in the namespace table as prefix used. // If a namespace is added, XML_OLD_NAMESPACE_BASE has to be adjusted! -XML_NAMESPACE( OFFICE, 0U ) -XML_NAMESPACE( STYLE, 1U ) -XML_NAMESPACE( TEXT , 2U ) -XML_NAMESPACE( TABLE, 3U ) -XML_NAMESPACE( DRAW , 4U ) -XML_NAMESPACE( FO , 5U ) -XML_NAMESPACE( XLINK, 6U ) -XML_NAMESPACE( DC , 7U ) -XML_NAMESPACE( META , 8U ) -XML_NAMESPACE( NUMBER, 9U ) -XML_NAMESPACE( PRESENTATION, 10U ) -XML_NAMESPACE( SVG, 11U ) -XML_NAMESPACE( CHART, 12U ) -XML_NAMESPACE( DR3D, 13U ) -XML_NAMESPACE( MATH, 14U ) -XML_NAMESPACE( FORM, 15U ) -XML_NAMESPACE( SCRIPT, 16U ) -XML_NAMESPACE( BLOCKLIST, 17U ) -XML_NAMESPACE( FRAMEWORK, 18U ) -XML_NAMESPACE( CONFIG, 19U ) -XML_NAMESPACE( OOO, 20U ) -XML_NAMESPACE( OOOW, 21U ) -XML_NAMESPACE( OOOC, 22U ) -XML_NAMESPACE( DOM, 23U ) -XML_NAMESPACE( TCD, 24U ) // text conversion dictionary -XML_NAMESPACE( DB, 25U ) -XML_NAMESPACE( DLG, 26U ) -XML_NAMESPACE( XFORMS, 27U ) -XML_NAMESPACE( XSD, 28U ) -XML_NAMESPACE( XSI, 29U ) -XML_NAMESPACE( SMIL, 30U ) -XML_NAMESPACE( ANIMATION, 31U ) -XML_NAMESPACE( XML, 32U ) -XML_NAMESPACE( REPORT, 33U ) -XML_NAMESPACE( OF, 34U ) // OpenFormula aka ODFF -XML_NAMESPACE( XHTML, 35U ) -XML_NAMESPACE( GRDDL, 36U ) -XML_NAMESPACE( VERSIONS_LIST, 37U ) +XML_NAMESPACE( XML_NAMESPACE_OFFICE, 0U ) +XML_NAMESPACE( XML_NAMESPACE_STYLE, 1U ) +XML_NAMESPACE( XML_NAMESPACE_TEXT , 2U ) +XML_NAMESPACE( XML_NAMESPACE_TABLE, 3U ) +XML_NAMESPACE( XML_NAMESPACE_DRAW , 4U ) +XML_NAMESPACE( XML_NAMESPACE_FO , 5U ) +XML_NAMESPACE( XML_NAMESPACE_XLINK, 6U ) +XML_NAMESPACE( XML_NAMESPACE_DC , 7U ) +XML_NAMESPACE( XML_NAMESPACE_META , 8U ) +XML_NAMESPACE( XML_NAMESPACE_NUMBER, 9U ) +XML_NAMESPACE( XML_NAMESPACE_PRESENTATION, 10U ) +XML_NAMESPACE( XML_NAMESPACE_SVG, 11U ) +XML_NAMESPACE( XML_NAMESPACE_CHART, 12U ) +XML_NAMESPACE( XML_NAMESPACE_DR3D, 13U ) +XML_NAMESPACE( XML_NAMESPACE_MATH, 14U ) +XML_NAMESPACE( XML_NAMESPACE_FORM, 15U ) +XML_NAMESPACE( XML_NAMESPACE_SCRIPT, 16U ) +XML_NAMESPACE( XML_NAMESPACE_BLOCKLIST, 17U ) +XML_NAMESPACE( XML_NAMESPACE_FRAMEWORK, 18U ) +XML_NAMESPACE( XML_NAMESPACE_CONFIG, 19U ) +XML_NAMESPACE( XML_NAMESPACE_OOO, 20U ) +XML_NAMESPACE( XML_NAMESPACE_OOOW, 21U ) +XML_NAMESPACE( XML_NAMESPACE_OOOC, 22U ) +XML_NAMESPACE( XML_NAMESPACE_DOM, 23U ) +XML_NAMESPACE( XML_NAMESPACE_TCD, 24U ) // text conversion dictionary +XML_NAMESPACE( XML_NAMESPACE_DB, 25U ) +XML_NAMESPACE( XML_NAMESPACE_DLG, 26U ) +XML_NAMESPACE( XML_NAMESPACE_XFORMS, 27U ) +XML_NAMESPACE( XML_NAMESPACE_XSD, 28U ) +XML_NAMESPACE( XML_NAMESPACE_XSI, 29U ) +XML_NAMESPACE( XML_NAMESPACE_SMIL, 30U ) +XML_NAMESPACE( XML_NAMESPACE_ANIMATION, 31U ) +XML_NAMESPACE( XML_NAMESPACE_XML, 32U ) +XML_NAMESPACE( XML_NAMESPACE_REPORT, 33U ) +XML_NAMESPACE( XML_NAMESPACE_OF, 34U ) // OpenFormula aka ODFF +XML_NAMESPACE( XML_NAMESPACE_XHTML, 35U ) +XML_NAMESPACE( XML_NAMESPACE_GRDDL, 36U ) +XML_NAMESPACE( XML_NAMESPACE_VERSIONS_LIST, 37U ) // namespaces for odf extended formats #define XML_NAMESPACE_EXT_BASE 38U #define XML_NAMESPACE_EXT( prefix, index ) \ -const sal_uInt16 XML_NAMESPACE_##prefix##_EXT = (XML_NAMESPACE_EXT_BASE+index); +const sal_uInt16 prefix = (XML_NAMESPACE_EXT_BASE+index); -XML_NAMESPACE_EXT( OFFICE, 0U ) -XML_NAMESPACE_EXT( TABLE, 1U ) -XML_NAMESPACE_EXT( CHART, 2U ) -XML_NAMESPACE_EXT( DRAW, 3U ) -XML_NAMESPACE_EXT( CALC, 4U ) -XML_NAMESPACE_EXT( LO, 5U ) +XML_NAMESPACE_EXT( XML_NAMESPACE_OFFICE_EXT, 0U ) +XML_NAMESPACE_EXT( XML_NAMESPACE_TABLE_EXT, 1U ) +XML_NAMESPACE_EXT( XML_NAMESPACE_CHART_EXT, 2U ) +XML_NAMESPACE_EXT( XML_NAMESPACE_DRAW_EXT, 3U ) +XML_NAMESPACE_EXT( XML_NAMESPACE_CALC_EXT, 4U ) +XML_NAMESPACE_EXT( XML_NAMESPACE_LO_EXT, 5U ) // namespaces for OOo formats #define XML_NAMESPACE_OOO_BASE 44U #define XML_NAMESPACE_OOO( prefix, index ) \ -const sal_uInt16 XML_NAMESPACE_##prefix##_OOO = (XML_NAMESPACE_OOO_BASE+index); - -XML_NAMESPACE_OOO( OFFICE, 0U ) -XML_NAMESPACE_OOO( META, 1U ) -XML_NAMESPACE_OOO( STYLE, 2U ) -XML_NAMESPACE_OOO( NUMBER, 3U ) -XML_NAMESPACE_OOO( TEXT, 4U ) -XML_NAMESPACE_OOO( TABLE, 5U ) -XML_NAMESPACE_OOO( DRAW, 6U ) -XML_NAMESPACE_OOO( DR3D, 7U ) -XML_NAMESPACE_OOO( PRESENTATION, 8U ) -XML_NAMESPACE_OOO( CHART, 9U ) -XML_NAMESPACE_OOO( CONFIG, 10U ) -XML_NAMESPACE_OOO( FORM, 11U ) -XML_NAMESPACE_OOO( SCRIPT, 12U ) +const sal_uInt16 prefix = (XML_NAMESPACE_OOO_BASE+index); + +XML_NAMESPACE_OOO( XML_NAMESPACE_OFFICE_OOO, 0U ) +XML_NAMESPACE_OOO( XML_NAMESPACE_META_OOO, 1U ) +XML_NAMESPACE_OOO( XML_NAMESPACE_STYLE_OOO, 2U ) +XML_NAMESPACE_OOO( XML_NAMESPACE_NUMBER_OOO, 3U ) +XML_NAMESPACE_OOO( XML_NAMESPACE_TEXT_OOO, 4U ) +XML_NAMESPACE_OOO( XML_NAMESPACE_TABLE_OOO, 5U ) +XML_NAMESPACE_OOO( XML_NAMESPACE_DRAW_OOO, 6U ) +XML_NAMESPACE_OOO( XML_NAMESPACE_DR3D_OOO, 7U ) +XML_NAMESPACE_OOO( XML_NAMESPACE_PRESENTATION_OOO, 8U ) +XML_NAMESPACE_OOO( XML_NAMESPACE_CHART_OOO, 9U ) +XML_NAMESPACE_OOO( XML_NAMESPACE_CONFIG_OOO, 10U ) +XML_NAMESPACE_OOO( XML_NAMESPACE_FORM_OOO, 11U ) +XML_NAMESPACE_OOO( XML_NAMESPACE_SCRIPT_OOO, 12U ) #define XML_NAMESPACE_COMPAT_BASE 57U #define XML_NAMESPACE_COMPAT( prefix, index ) \ -const sal_uInt16 XML_NAMESPACE_##prefix##_COMPAT = (XML_NAMESPACE_COMPAT_BASE+index); +const sal_uInt16 prefix = (XML_NAMESPACE_COMPAT_BASE+index); -XML_NAMESPACE_COMPAT( SVG, 0U ) -XML_NAMESPACE_COMPAT( FO, 1U ) -XML_NAMESPACE_COMPAT( SMIL, 2U ) +XML_NAMESPACE_COMPAT( XML_NAMESPACE_SVG_COMPAT, 0U ) +XML_NAMESPACE_COMPAT( XML_NAMESPACE_FO_COMPAT, 1U ) +XML_NAMESPACE_COMPAT( XML_NAMESPACE_SMIL_COMPAT, 2U ) #define XML_NAMESPACE_OASIS_BASE 60U #define XML_NAMESPACE_OASIS( prefix, index ) \ -const sal_uInt16 XML_NAMESPACE_##prefix##_OASIS = (XML_NAMESPACE_OASIS_BASE+index); +const sal_uInt16 prefix = (XML_NAMESPACE_OASIS_BASE+index); -XML_NAMESPACE_OASIS( DB, 0U ) -XML_NAMESPACE_OASIS( REPORT, 1U ) +XML_NAMESPACE_OASIS( XML_NAMESPACE_DB_OASIS, 0U ) +XML_NAMESPACE_OASIS( XML_NAMESPACE_REPORT_OASIS, 1U ) #define XML_OLD_NAMESPACE_BASE 62U +#define XML_OLD_NAMESPACE( prefix, index ) \ +const sal_uInt16 prefix = (XML_OLD_NAMESPACE_BASE+index); // namespaces used in the technical preview (SO 5.2) -XML_OLD_NAMESPACE( FO, 0U ) -XML_OLD_NAMESPACE( XLINK, 1U ) -XML_OLD_NAMESPACE( OFFICE, 2U ) -XML_OLD_NAMESPACE( STYLE, 3U ) -XML_OLD_NAMESPACE( TEXT, 4U ) -XML_OLD_NAMESPACE( TABLE, 5U ) -XML_OLD_NAMESPACE( META, 6U ) -XML_OLD_NAMESPACE( DRAW, 7U ) -XML_OLD_NAMESPACE( NUMBER, 8U ) -XML_OLD_NAMESPACE( PRESENTATION, 9U ) -XML_OLD_NAMESPACE( CHART, 10U ) -XML_OLD_NAMESPACE( SMIL, 11U ) +XML_OLD_NAMESPACE( XML_OLD_NAMESPACE_FO, 0U ) +XML_OLD_NAMESPACE( XML_OLD_NAMESPACE_XLINK, 1U ) +XML_OLD_NAMESPACE( XML_OLD_NAMESPACE_OFFICE, 2U ) +XML_OLD_NAMESPACE( XML_OLD_NAMESPACE_STYLE, 3U ) +XML_OLD_NAMESPACE( XML_OLD_NAMESPACE_TEXT, 4U ) +XML_OLD_NAMESPACE( XML_OLD_NAMESPACE_TABLE, 5U ) +XML_OLD_NAMESPACE( XML_OLD_NAMESPACE_META, 6U ) +XML_OLD_NAMESPACE( XML_OLD_NAMESPACE_DRAW, 7U ) +XML_OLD_NAMESPACE( XML_OLD_NAMESPACE_NUMBER, 8U ) +XML_OLD_NAMESPACE( XML_OLD_NAMESPACE_PRESENTATION, 9U ) +XML_OLD_NAMESPACE( XML_OLD_NAMESPACE_CHART, 10U ) +XML_OLD_NAMESPACE( XML_OLD_NAMESPACE_SMIL, 11U ) // experimental namespaces -XML_NAMESPACE( FIELD, 100U ) -XML_NAMESPACE( CSS3TEXT, 103U ) // CSS Text Level 3 -XML_NAMESPACE( FORMX, 101U ) // form interop extensions +XML_NAMESPACE( XML_NAMESPACE_FIELD, 100U ) +XML_NAMESPACE( XML_NAMESPACE_CSS3TEXT, 103U ) // CSS Text Level 3 +XML_NAMESPACE( XML_NAMESPACE_FORMX, 101U ) // form interop extensions #endif // INCLUDED_XMLOFF_XMLNMSPE_HXX |