2012-07-16 17:32:30 +01:00
|
|
|
/*
|
|
|
|
* 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 .
|
|
|
|
*/
|
2010-11-08 13:47:01 +01:00
|
|
|
|
2014-02-25 19:37:34 +01:00
|
|
|
|
2010-11-08 13:47:01 +01:00
|
|
|
|
|
|
|
const sal_Int32 TOKEN_MASK = static_cast< sal_Int32 >( (1 << NMSP_SHIFT) - 1 );
|
2011-03-26 00:27:56 +05:30
|
|
|
const sal_Int32 NMSP_MASK = static_cast< sal_Int32 >( SAL_MAX_INT32 & ~TOKEN_MASK );
|
2010-11-08 13:47:01 +01:00
|
|
|
|
|
|
|
/** 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; }
|
|
|
|
|
2011-01-17 10:59:07 +01:00
|
|
|
|
2010-11-08 13:47:01 +01:00
|
|
|
// defines for tokens with specific namespaces
|
2011-01-27 13:20:10 +01:00
|
|
|
#define OOX_TOKEN( namespace, token ) (::oox::NMSP_##namespace | ::oox::XML_##token)
|
|
|
|
|
|
|
|
#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 )
|
2011-05-27 20:45:30 +02:00
|
|
|
#define MCE_TOKEN( token ) OOX_TOKEN( mce, token)
|
2011-01-27 13:20:10 +01:00
|
|
|
#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 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 XDR_TOKEN( token ) OOX_TOKEN( dmlSpreadDr, token )
|
|
|
|
#define XLS_TOKEN( token ) OOX_TOKEN( xls, token )
|
2012-05-20 02:37:16 +02:00
|
|
|
#define XLS_EXT_TOKEN( token ) OOX_TOKEN( xlsExtLst, token )
|
2011-01-27 13:20:10 +01:00
|
|
|
#define XM_TOKEN( token ) OOX_TOKEN( xm, token )
|
|
|
|
#define XML_TOKEN( token ) OOX_TOKEN( xml, token )
|
2011-08-23 14:01:37 +05:30
|
|
|
#define VMLPPT_TOKEN( token ) OOX_TOKEN( vmlPowerpoint, token )
|
2011-12-30 16:09:42 +05:30
|
|
|
#define DSP_TOKEN( token ) OOX_TOKEN( dsp, token )
|
2013-06-19 17:13:29 +02:00
|
|
|
#define LC_TOKEN( token ) OOX_TOKEN( dmlLockedCanvas, token )
|
2013-11-13 10:32:55 +01:00
|
|
|
#define WPS_TOKEN( token ) OOX_TOKEN( wps, token )
|
2013-11-27 10:49:32 +01:00
|
|
|
#define WPG_TOKEN( token ) OOX_TOKEN( wpg, token )
|
2010-11-08 13:47:01 +01:00
|
|
|
|
2014-02-25 19:37:34 +01:00
|
|
|
|
2010-11-08 13:47:01 +01:00
|
|
|
|
|
|
|
} // namespace oox
|
|
|
|
|
|
|
|
#endif
|