Hi Eike,

Thanks for replying so fast. ;-)
I have no other questions about things you mentioned, 
but SC_MATVAL_EMPTYPATH and SC_MATVAL_EMPTY.
Let's see some definations.

const ScMatValType SC_MATVAL_STRING       = 0x02;
const ScMatValType SC_MATVAL_EMPTY        = SC_MATVAL_STRING | 0x04; // STRING 
plus flag
const ScMatValType SC_MATVAL_EMPTYPATH = SC_MATVAL_EMPTY | 0x08;  // EMPTY plus 
flag

/// String, empty or empty path, but not value nor boolean.
inline static bool IsStringType( ScMatValType nType )
{
    return (nType & SC_MATVAL_STRING) != 0;
}

/// Empty, but not empty path or any other type.
inline static bool IsEmptyType( ScMatValType nType )
{
    return (nType & SC_MATVAL_EMPTY) == SC_MATVAL_EMPTY;
}

/// Empty path, but not empty or any other type.
inline static bool IsEmptyPathType( ScMatValType nType )
{
    return (nType & SC_MATVAL_EMPTYPATH) == SC_MATVAL_EMPTYPATH;
}

then you can calculate, if nType is SC_MATVAL_EMPTYPATH (14), 
the three functions will all return Ture, because the flags are defined like 
that.

so, I think we should call IsEmptyPathType( ScMatValType nType ) first to
see if the type is EmptyPath.

Another sweet weeken is coming, wish you a happy time! :)

Yue




2008-06-27

Reply via email to