diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /oox/source/token/namespaces.hxx.tail | |
parent | Initial commit. (diff) | |
download | libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | oox/source/token/namespaces.hxx.tail | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/oox/source/token/namespaces.hxx.tail b/oox/source/token/namespaces.hxx.tail new file mode 100644 index 000000000..382955683 --- /dev/null +++ b/oox/source/token/namespaces.hxx.tail @@ -0,0 +1,71 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + + +const sal_Int32 TOKEN_MASK = static_cast< sal_Int32 >( (1 << NMSP_SHIFT) - 1 ); +const sal_Int32 NMSP_MASK = static_cast< sal_Int32 >( SAL_MAX_INT32 & ~TOKEN_MASK ); + +/** Returns the raw token identifier without namespace of the passed token. */ +inline sal_Int32 getBaseToken( sal_Int32 nToken ) { return nToken & TOKEN_MASK; } + +/** Returns the namespace without token identifier of the passed token. */ +inline sal_Int32 getNamespace( sal_Int32 nToken ) { return nToken & NMSP_MASK; } + + +// defines for tokens with specific namespaces +#define OOX_TOKEN( namespace, token ) (::oox::NMSP_##namespace | ::oox::XML_##token) +#define OOX_NS( namespace ) (::oox::NMSP_##namespace) + +#define A_TOKEN( token ) OOX_TOKEN( dml, token ) +#define AX_TOKEN( token ) OOX_TOKEN( ax, token ) +#define C_TOKEN( token ) OOX_TOKEN( dmlChart, token ) +#define CDR_TOKEN( token ) OOX_TOKEN( dmlChartDr, token ) +#define DGM_TOKEN( token ) OOX_TOKEN( dmlDiagram, token ) +#define MCE_TOKEN( token ) OOX_TOKEN( mce, token) +#define O_TOKEN( token ) OOX_TOKEN( vmlOffice, token ) +#define PC_TOKEN( token ) OOX_TOKEN( packageContentTypes, token ) +#define PPT_TOKEN( token ) OOX_TOKEN( ppt, token ) +#define P14_TOKEN( token ) OOX_TOKEN( p14, token ) +#define P15_TOKEN( token ) OOX_TOKEN( p15, token ) +#define C15_TOKEN( token ) OOX_TOKEN( c15, token ) +#define PR_TOKEN( token ) OOX_TOKEN( packageRel, token ) +#define R_TOKEN( token ) OOX_TOKEN( officeRel, token ) +#define VML_TOKEN( token ) OOX_TOKEN( vml, token ) +#define VMLX_TOKEN( token ) OOX_TOKEN( vmlExcel, token ) +#define X12AC_TOKEN( token ) OOX_TOKEN( x12ac, token ) +#define XDR_TOKEN( token ) OOX_TOKEN( dmlSpreadDr, token ) +#define XLS_TOKEN( token ) OOX_TOKEN( xls, token ) +#define XLS14_TOKEN( token ) OOX_TOKEN( xls14Lst, token ) +#define XM_TOKEN( token ) OOX_TOKEN( xm, token ) +#define XML_TOKEN( token ) OOX_TOKEN( xml, token ) +#define VMLPPT_TOKEN( token ) OOX_TOKEN( vmlPowerpoint, token ) +#define DSP_TOKEN( token ) OOX_TOKEN( dsp, token ) +#define LC_TOKEN( token ) OOX_TOKEN( dmlLockedCanvas, token ) +#define WPS_TOKEN( token ) OOX_TOKEN( wps, token ) +#define WPG_TOKEN( token ) OOX_TOKEN( wpg, token ) +#define W_TOKEN( token ) OOX_TOKEN( doc, token ) +#define LOEXT_TOKEN( token ) OOX_TOKEN( loext, token ) +#define M_TOKEN(token) OOX_TOKEN(officeMath, token) +#define XR2_TOKEN(token) OOX_TOKEN(xr2, token) + + + +} // namespace oox + +#endif |