Mobile API Reference  MicroStrategy 2019
CellDataHelper Class Reference

#include <CellDataHelper.h>

Static Public Member Functions

static int SplitCellData (Int32 nParam, CComVariant *pParam, std::vector< double > &orValues, std::vector< EnumCellFormatDataTypes > &orTypes, std::vector< DSS_ID > &orFormatIDs)
 
static int CreateVariantFromCellData (double pValue, EnumCellFormatDataTypes pType, const GUID &pFormatID, CComVariant *oResult)
 
static EnumCellFormatDataTypes CalculateCellDataType (Int32 nParam, EnumCellFormatDataTypes *pParam)
 
static DSS_ID CalculateCellDataFormatID (Int32 nParam, DSS_ID *pParam)
 
static DSS_ID GetDefaultFormatID ()
 
static DSS_ID GetMixFormatID ()
 
static int SplitCellData (Int32 nParam, CComVariant *pParam, std::vector< double > &orValues, std::vector< EnumCellFormatDataTypes > &orTypes, std::vector< DSS_ID > &orFormatIDs)
 
static int CreateVariantFromCellData (double pValue, EnumCellFormatDataTypes pType, const GUID &pFormatID, CComVariant *oResult)
 
static EnumCellFormatDataTypes CalculateCellDataType (Int32 nParam, EnumCellFormatDataTypes *pParam)
 
static DSS_ID CalculateCellDataFormatID (Int32 nParam, DSS_ID *pParam)
 
static DSS_ID GetDefaultFormatID ()
 
static DSS_ID GetMixFormatID ()
 

Detailed Description

CellDataHelper class.

CellDataHelper is a helper class providing methods to deal with cell formatting data.

Member Function Documentation

◆ CalculateCellDataFormatID() [1/2]

static DSS_ID CellDataHelper::CalculateCellDataFormatID ( Int32  nParam,
DSS_ID pParam 
)
static

Calculates the format ID of the resulting cell format object. This method determines the format ID of the resulting cell format object based on the following rule:

  • A op A: A
  • A op B: MIXED
  • A op const: MIXED
  • const op A: MIXED
    Parameters
    Int32the number of input cell format objects
    DSS_ID*the format IDs of the input cell format objects
    Returns
    DSS_ID the format ID of the resulting cell format object

◆ CalculateCellDataFormatID() [2/2]

static DSS_ID CellDataHelper::CalculateCellDataFormatID ( Int32  nParam,
DSS_ID pParam 
)
static

Calculates the format ID of the resulting cell format object. This method determines the format ID of the resulting cell format object based on the following rule:

  • A op A: A
  • A op B: MIXED
  • A op const: MIXED
  • const op A: MIXED
    Parameters
    Int32the number of input cell format objects
    DSS_ID*the format IDs of the input cell format objects
    Returns
    DSS_ID the format ID of the resulting cell format object

◆ CalculateCellDataType() [1/2]

static EnumCellFormatDataTypes CellDataHelper::CalculateCellDataType ( Int32  nParam,
EnumCellFormatDataTypes pParam 
)
static

Calculates the type of the resulting cell format object. This method determines the type of the resulting cell format object based on the following rule:

  • A op A: A
  • A op B: MIXED
  • A op const: MIXED
  • const op A: MIXED
    Parameters
    Int32the number of input cell format objects
    EnumCellFormatDataTypes*the types of the input cell format objects
    Returns
    EnumCellFormatDataTypes the type of the resulting cell format object

◆ CalculateCellDataType() [2/2]

static EnumCellFormatDataTypes CellDataHelper::CalculateCellDataType ( Int32  nParam,
EnumCellFormatDataTypes pParam 
)
static

Calculates the type of the resulting cell format object. This method determines the type of the resulting cell format object based on the following rule:

  • A op A: A
  • A op B: MIXED
  • A op const: MIXED
  • const op A: MIXED
    Parameters
    Int32the number of input cell format objects
    EnumCellFormatDataTypes*the types of the input cell format objects
    Returns
    EnumCellFormatDataTypes the type of the resulting cell format object

◆ CreateVariantFromCellData() [1/2]

static int CellDataHelper::CreateVariantFromCellData ( double  pValue,
EnumCellFormatDataTypes  pType,
const GUID pFormatID,
CComVariant oResult 
)
static

Creates a VARIANT based on the given cell format data components.

Parameters
doublethe value of the cell format object
EnumCellFormatDataTypesthe type (tag) of the cell format object
GUID&the DSS_ID of the cell format object
VARIANT*the constructed VARIANT object (output)
Returns
HRESULT the return status

◆ CreateVariantFromCellData() [2/2]

static int CellDataHelper::CreateVariantFromCellData ( double  pValue,
EnumCellFormatDataTypes  pType,
const GUID pFormatID,
CComVariant oResult 
)
static

Creates a VARIANT based on the given cell format data components.

Parameters
doublethe value of the cell format object
EnumCellFormatDataTypesthe type (tag) of the cell format object
GUID&the DSS_ID of the cell format object
VARIANT*the constructed VARIANT object (output)
Returns
HRESULT the return status

◆ GetDefaultFormatID() [1/2]

static DSS_ID CellDataHelper::GetDefaultFormatID ( )
static
Returns
DSS_ID the default format ID

◆ GetDefaultFormatID() [2/2]

static DSS_ID CellDataHelper::GetDefaultFormatID ( )
static
Returns
DSS_ID the default format ID

◆ GetMixFormatID() [1/2]

static DSS_ID CellDataHelper::GetMixFormatID ( )
static
Returns
DSS_ID the format ID for mixed cell format calculation result

◆ GetMixFormatID() [2/2]

static DSS_ID CellDataHelper::GetMixFormatID ( )
static
Returns
DSS_ID the format ID for mixed cell format calculation result

◆ SplitCellData() [1/2]

static int CellDataHelper::SplitCellData ( Int32  nParam,
CComVariant pParam,
std::vector< double > &  orValues,
std::vector< EnumCellFormatDataTypes > &  orTypes,
std::vector< DSS_ID > &  orFormatIDs 
)
static

Splits an array of VARIANT objects into values, types and format IDs (the three components in a cell format object).

Parameters
Int32the length of the VARIANT array
VARIANT*the VARIANT array
std::vector<double>&the value array (output)
std::vector<EnumCellFormatDataTypes>&the type array (output)
std::vector<DSS_ID>&the format ID array
Returns
HRESULT the return status

◆ SplitCellData() [2/2]

static int CellDataHelper::SplitCellData ( Int32  nParam,
CComVariant pParam,
std::vector< double > &  orValues,
std::vector< EnumCellFormatDataTypes > &  orTypes,
std::vector< DSS_ID > &  orFormatIDs 
)
static

Splits an array of VARIANT objects into values, types and format IDs (the three components in a cell format object).

Parameters
Int32the length of the VARIANT array
VARIANT*the VARIANT array
std::vector<double>&the value array (output)
std::vector<EnumCellFormatDataTypes>&the type array (output)
std::vector<DSS_ID>&the format ID array
Returns
HRESULT the return status