[ooo-build-commit] Branch 'ooo/master' - 3 commits - filter/source oox/inc oox/source unoxml/source

Jan Holesovsky kendy at kemper.freedesktop.org
Fri Sep 11 21:43:11 PDT 2009


 filter/source/pdf/impdialog.cxx  |    4 
 oox/inc/oox/xls/formulabase.hxx  |  164 +++++-
 oox/source/dump/biffdumper.cxx   |    1 
 oox/source/dump/biffdumper.ini   |    1 
 oox/source/xls/formulabase.cxx   |  934 ++++++++++++++++++++-------------------
 oox/source/xls/formulaparser.cxx |   14 
 unoxml/source/rdf/CLiteral.cxx   |    2 
 7 files changed, 635 insertions(+), 485 deletions(-)

New commits:
commit c13370bda683033267890f1dfbd94878fdeb4235
Author: Kurt Zenker <kz at openoffice.org>
Date:   Fri Sep 11 18:55:06 2009 +0000

    CWS-TOOLING: integrate CWS odff06
    2009-09-10 18:58:49 +0200 dr  r276042 : #i104954# excel export: fixed broken handling of unary operators
    2009-09-06 19:30:43 +0200 er  r275861 : warnings
    2009-09-05 19:48:41 +0200 er  r275849 : warnings; wntmsci12 tries to be too smart
    2009-09-05 19:37:47 +0200 er  r275848 : warnings
    2009-09-03 22:45:42 +0200 er  r275776 : #i5658# GetCellValueOrZero: missed the formula cell case
    2009-09-03 14:28:41 +0200 er  r275752 : #i90759# better description of ZTEST
    2009-09-03 03:34:03 +0200 er  r275739 : warnings
    2009-09-03 03:31:19 +0200 er  r275738 : warnings
    2009-09-03 03:16:46 +0200 er  r275737 : warnings
    2009-09-03 03:11:42 +0200 er  r275736 : CELLTYPE_DESTROYED only if DBG_UTIL
    2009-09-03 03:06:31 +0200 er  r275735 : warnings
    2009-09-03 03:00:30 +0200 er  r275734 : warnings
    2009-09-03 02:32:35 +0200 er  r275733 : fix broken rebase merge
    2009-09-02 22:27:53 +0200 er  r275730 : CWS-TOOLING: rebase CWS odff06 to trunk at 275331 (milestone: DEV300:m56)
    2009-09-02 14:45:05 +0200 er  r275712 : #i5658# calculate with string operands as long as they unambiguously represent an integer or ISO 8601 date and/or time value
    2009-08-29 22:05:31 +0200 er  r275559 : #i99140# CONVERT_ADD new conversions as per ODFF; patch from <lvyue>, slightly changed
    2009-08-25 13:23:59 +0200 er  r275349 : #i90759# rewording of ZTEST description
    2009-08-21 00:10:22 +0200 er  r275204 : #i82007# correct description of POWER and parameters; patch from <regina>
    2009-08-20 23:58:20 +0200 er  r275203 : #i74704# B correct calculation for SP arguments 0 and 1; patch from <regina>
    2009-08-20 22:58:57 +0200 er  r275201 : #i90759# ZTEST correct calculation using the 3rd parameter sigma
    2009-08-14 17:55:45 +0200 er  r275000 : #i81214# LOOKUP with single values, data arrays and result arrays; based on a patch from <lvyue>
    2009-08-11 00:47:48 +0200 er  r274845 : unxlngi6 compiler warnings
    2009-08-11 00:43:06 +0200 er  r274844 : unxlngi6 compiler warnings
    2009-08-10 23:59:05 +0200 er  r274843 : #91351# make HYPERLINK accept and return numeric values, propagate errors
    2009-07-08 18:46:00 +0200 dr  r273846 : #i102022# export 3D refs to cond. formats and data validation
    2009-07-02 17:59:40 +0200 dr  r273667 : #i102702# adapt changes from sc/source/filter/excel
    2009-07-02 15:20:37 +0200 dr  r273656 : #i102702# reimplementation of formula token class export
    2009-07-02 14:41:02 +0200 er  r273653 : a surrogate with value 0x10000 is also valid (ran into when testing #i99900# Calc's UNICHAR function), and Unicode ends at 0x10ffff
    2009-07-01 00:10:16 +0200 er  r273536 : #i99900# iterateCodePoints: check index against string length to avoid assertion; caught this when testing Calc's new UNICHAR function, with the result of a surrogate pair forming one character.
    2009-07-01 00:03:57 +0200 er  r273535 : #i99900# new UNICODE and UNICHAR functions; patch from <tanchengbiao>
    2009-06-15 16:42:06 +0200 er  r272999 : merge patch from #i102701
    2009-06-15 11:15:16 +0200 dr  r272970 : #i102702# in BIFF, the SKIP flag may be missing for the tAttrSkip token
    2009-06-11 13:27:46 +0200 er  r272867 : CWS-TOOLING: rebase CWS odff06 to trunk at 272827 (milestone: DEV300:m50)
    2009-04-30 18:28:02 +0200 er  r271423 : #i94618# on status bar, ignore error of cell for COUNT and COUNTA if selection; patch from <kohei>
    2009-04-30 13:58:44 +0200 er  r271413 : get rid of that ugly mail address thingie in RTL_LOGFILE_CONTEXT_AUTHOR introduced by CWS frmdlg ...
    2009-04-30 12:32:44 +0200 er  r271411 : #i94618# do not display error of cell for COUNT and COUNTA status bar functions
    2009-04-30 01:32:38 +0200 er  r271399 : #i101316# improve accuracy of STDEV on equal values; patch from <regina>
    2009-04-30 01:18:54 +0200 er  r271398 : #i97605# improve accuracy of ASINH and ACOSH; patch from <regina>
    2009-04-30 00:46:00 +0200 er  r271397 : #i59153# improve accuracy of MOD; patch from <regina>
    2009-04-30 00:29:43 +0200 er  r271396 : #i69069# improve accuracy of NORMSDIST and POISSON; patch from <regina>
    2009-04-29 23:53:28 +0200 er  r271395 : #i100119# NORMDIST and LOGNORMDIST optional parameters, plus improvement in accuracy also of NORMSDIST (part of i69069); patch from <regina>
    2009-04-28 18:22:07 +0200 er  r271337 : #i97052# REPLACE with no length of text to be removed simply inserts new text; patch from <lvyue>, slightly modified
    2009-03-24 17:29:36 +0100 er  r269982 : #i97091# moved implementation of erf() and erfc() from scaddins to sal to provide C99 functions for compilers lacking it

diff --git a/oox/inc/oox/xls/formulabase.hxx b/oox/inc/oox/xls/formulabase.hxx
index b2e576d..11a0be4 100644
--- a/oox/inc/oox/xls/formulabase.hxx
+++ b/oox/inc/oox/xls/formulabase.hxx
@@ -58,8 +58,6 @@ const size_t BIFF_TOKARR_MAXLEN                 = 4096;     /// Maximum size of
 // token class flags ----------------------------------------------------------
 
 const sal_uInt8 BIFF_TOKCLASS_MASK              = 0x60;
-const sal_uInt8 BIFF_TOKID_MASK                 = 0x1F;
-
 const sal_uInt8 BIFF_TOKCLASS_NONE              = 0x00;     /// 00-1F: Base tokens.
 const sal_uInt8 BIFF_TOKCLASS_REF               = 0x20;     /// 20-3F: Reference class tokens.
 const sal_uInt8 BIFF_TOKCLASS_VAL               = 0x40;     /// 40-5F: Value class tokens.
@@ -69,6 +67,8 @@ const sal_uInt8 BIFF_TOKFLAG_INVALID            = 0x80;     /// This bit must be
 
 // base token identifiers -----------------------------------------------------
 
+const sal_uInt8 BIFF_TOKID_MASK                 = 0x1F;
+
 const sal_uInt8 BIFF_TOKID_NONE                 = 0x00;     /// Placeholder for invalid token id.
 const sal_uInt8 BIFF_TOKID_EXP                  = 0x01;     /// Array or shared formula reference.
 const sal_uInt8 BIFF_TOKID_TBL                  = 0x02;     /// Multiple operation reference.
@@ -361,6 +361,115 @@ struct ApiOpCodes
     sal_Int32           OPCODE_RANGE;           /// Range operator.
 };
 
+// Function parameter info ====================================================
+
+/** Enumerates validity modes for a function parameter. */
+enum FuncParamValidity
+{
+    FUNC_PARAM_NONE = 0,        /// Default for an unspecified entry in a C-array.
+    FUNC_PARAM_REGULAR,         /// Parameter supported by Calc and Excel.
+    FUNC_PARAM_CALCONLY,        /// Parameter supported by Calc only.
+    FUNC_PARAM_EXCELONLY        /// Parameter supported by Excel only.
+};
+
+/** Enumerates different types of token class conversion in function parameters. */
+enum FuncParamConversion
+{
+    FUNC_PARAMCONV_ORG,         /// Use original class of current token.
+    FUNC_PARAMCONV_VAL,         /// Convert tokens to VAL class.
+    FUNC_PARAMCONV_ARR,         /// Convert tokens to ARR class.
+    FUNC_PARAMCONV_RPT,         /// Repeat parent conversion in VALTYPE parameters.
+    FUNC_PARAMCONV_RPX,         /// Repeat parent conversion in REFTYPE parameters.
+    FUNC_PARAMCONV_RPO          /// Repeat parent conversion in operands of operators.
+};
+
+/** Structure that contains all needed information for a parameter in a
+    function.
+
+    The member meValid specifies which application supports the parameter. If
+    set to CALCONLY, import filters have to insert a default value for this
+    parameter, and export filters have to skip the parameter. If set to
+    EXCELONLY, import filters have to skip the parameter, and export filters
+    have to insert a default value for this parameter.
+
+    The member mbValType specifies whether the parameter requires tokens to be
+    of value type (VAL or ARR class).
+
+        If set to false, the parameter is called to be REFTYPE. Tokens with REF
+        default class can be inserted for the parameter (e.g. tAreaR tokens).
+
+        If set to true, the parameter is called to be VALTYPE. Tokens with REF
+        class need to be converted to VAL tokens first (e.g. tAreaR will be
+        converted to tAreaV), and further conversion is done according to this
+        new token class.
+
+    The member meConv specifies how to convert the current token class of the
+    token inserted for the parameter. If the token class is still REF this
+    means that the token has default REF class and the parameter is REFTYPE
+    (see member mbValType), the token will not be converted at all and remains
+    in REF class. Otherwise, token class conversion is depending on the actual
+    token class of the return value of the function containing this parameter.
+    The function may return REF class (tFuncR, tFuncVarR, tFuncCER), or it may
+    return VAL or ARR class (tFuncV, tFuncA, tFuncVarV, tFuncVarA, tFuncCEV,
+    tFuncCEA). Even if the function is able to return REF class, it may return
+    VAL or ARR class instead due to the VALTYPE data type of the parent
+    function parameter that calls the own function. Example: The INDIRECT
+    function returns REF class by default. But if called from a VALTYPE
+    function parameter, e.g. in the formula =ABS(INDIRECT("A1")), it returns
+    VAL or ARR class instead. Additionally, the repeating conversion types RPT
+    and RPX rely on the conversion executed for the function token class.
+
+        1) ORG:
+        Use the original class of the token (VAL or ARR), regardless of any
+        conversion done for the function return class.
+
+        2) VAL:
+        Convert ARR tokens to VAL class, regardless of any conversion done for
+        the function return class.
+
+        3) ARR:
+        Convert VAL tokens to ARR class, regardless of any conversion done for
+        the function return class.
+
+        4) RPT:
+        If the own function returns REF class (thus it is called from a REFTYPE
+        parameter, see above), and the parent conversion type (for the function
+        return class) was ORG, VAL, or ARR, ignore that conversion and always
+        use VAL conversion for the own token instead. If the parent conversion
+        type was RPT or RPX, repeat the conversion that would have been used if
+        the function would return value type.
+        If the own function returns value type (VAL or ARR class, see above),
+        and the parent conversion type (for the function return class) was ORG,
+        VAL, ARR, or RPT, repeat this conversion for the own token. If the
+        parent conversion type was RPX, always use ORG conversion type for the
+        own token instead.
+
+        5) RPX:
+        This type of conversion only occurs in functions returning VAL class by
+        default. If the own token is value type, and the VAL return class of
+        the own function has been changed to ARR class (due to direct ARR
+        conversion, or due to ARR conversion repeated by RPT or RPX), set the
+        own token to ARR type. Otherwise use the original token type (VAL
+        conversion from parent parameter will not be repeated at all). If
+        nested functions have RPT or value-type RPX parameters, they will not
+        repeat this conversion type, but will use ORG conversion instead (see
+        description of RPT above).
+
+        6) RPO:
+        This type of conversion is only used for the operands of all operators
+        (unary and binary arithmetic operators, comparison operators, and range
+        operators). It is not used for function parameters. On conversion, it
+        will be replaced by the last conversion type that was not the RPO
+        conversion. This leads to a slightly different behaviour than the RPT
+        conversion for operands in conjunction with a parent RPX conversion.
+ */
+struct FunctionParamInfo
+{
+    FuncParamValidity   meValid;        /// Parameter validity.
+    FuncParamConversion meConv;         /// Token class conversion type.
+    bool                mbValType;      /// Data type (false = REFTYPE, true = VALTYPE).
+};
+
 // function data ==============================================================
 
 /** This enumeration contains constants for all known external libraries
@@ -373,23 +482,13 @@ enum FunctionLibraryType
 
 // ----------------------------------------------------------------------------
 
-const sal_uInt8 FUNCINFO_MAXPARAM           = 30;       /// Maximum parameter count.
-
-const sal_uInt8 FUNCINFO_PARAM_EXCELONLY    = 0x01;     /// Flag for a parameter existing in Excel, but not in Calc.
-const sal_uInt8 FUNCINFO_PARAM_CALCONLY     = 0x02;     /// Flag for a parameter existing in Calc, but not in Excel.
-const sal_uInt8 FUNCINFO_PARAM_INVALID      = 0x04;     /// Flag for an invalid token class.
-
 /** Represents information for a spreadsheet function.
 
-    The member mpnParamClass contains an array of BIFF token classes for each
-    parameter of the function. The last existing (non-null) value in this array
-    is used for all following parameters used in a function. Additionally to
-    the three actual token classes, this array may contain the special values
-    FUNCINFO_PARAM_CALCONLY, FUNCINFO_PARAM_EXCELONLY, and
-    FUNCINFO_PARAM_INVALID. The former two specify parameters only existing in
-    one of the applications. FUNCINFO_PARAM_INVALID is simply a terminator for
-    the array to prevent repetition of the last token class or special value
-    for additional parameters.
+    The member mpParamInfos points to an array of type information structures
+    for all parameters of the function. The last initialized structure
+    describing a regular parameter (member meValid == EXC_PARAMVALID_ALWAYS) in
+    this array is used repeatedly for all following parameters supported by a
+    function.
  */
 struct FunctionInfo
 {
@@ -404,7 +503,8 @@ struct FunctionInfo
     sal_uInt8           mnMinParamCount;    /// Minimum number of parameters.
     sal_uInt8           mnMaxParamCount;    /// Maximum number of parameters.
     sal_uInt8           mnRetClass;         /// BIFF token class of the return value.
-    const sal_uInt8*    mpnParamClass;      /// Expected BIFF token classes of parameters.
+    const FunctionParamInfo* mpParamInfos;  /// Information about all parameters.
+    bool                mbParamPairs;       /// true = optional parameters are expected to appear in pairs.
     bool                mbVolatile;         /// True = volatile function.
     bool                mbExternal;         /// True = external function in Calc.
     bool                mbMacroFunc;        /// True = macro sheet function or command.
@@ -415,28 +515,28 @@ typedef RefVector< FunctionInfo > FunctionInfoVector;
 
 // function info parameter class iterator =====================================
 
-/** Iterator working on the mpnParamClass member of the FunctionInfo struct.
+/** Iterator working on the mpParamInfos member of the FunctionInfo struct.
 
     This iterator can be used to iterate through the array containing the
-    expected token classes of function parameters. This iterator repeats the
-    last valid token class in the array - it stops automatically before the
-    first empty array entry or before the end of the array, even for repeated
-    calls to the increment operator.
+    token class conversion information of function parameters. This iterator
+    repeats the last valid structure in the array - it stops automatically
+    before the first empty array entry or before the end of the array, even for
+    repeated calls to the increment operator.
  */
-class FuncInfoParamClassIterator
+class FunctionParamInfoIterator
 {
 public:
-    explicit            FuncInfoParamClassIterator( const FunctionInfo& rFuncInfo );
-
-    FuncInfoParamClassIterator& operator++();
+    explicit            FunctionParamInfoIterator( const FunctionInfo& rFuncInfo );
 
-    inline sal_uInt8    getParamClass() const { return *mpnParamClass; }
-    inline sal_uInt8    isExcelOnlyParam() const { return getFlag( *mpnParamClass, FUNCINFO_PARAM_EXCELONLY ); }
-    inline sal_uInt8    isCalcOnlyParam() const { return getFlag( *mpnParamClass, FUNCINFO_PARAM_CALCONLY ); }
+    const FunctionParamInfo& getParamInfo() const;
+    bool                isCalcOnlyParam() const;
+    bool                isExcelOnlyParam() const;
+    FunctionParamInfoIterator& operator++();
 
 private:
-    const sal_uInt8*    mpnParamClass;
-    const sal_uInt8*    mpnParamClassEnd;
+    const FunctionParamInfo* mpParamInfo;
+    const FunctionParamInfo* mpParamInfoEnd;
+    bool                mbParamPairs;
 };
 
 // base function provider =====================================================
diff --git a/oox/source/dump/biffdumper.cxx b/oox/source/dump/biffdumper.cxx
index f4a53a4..60cca87 100644
--- a/oox/source/dump/biffdumper.cxx
+++ b/oox/source/dump/biffdumper.cxx
@@ -1337,6 +1337,7 @@ bool FormulaObject::dumpAttrToken()
             dumpDec< sal_uInt16, sal_uInt8 >( !bBiff2, "skip-err" );
         }
         break;
+        case 0:     // in array formulas and defined names, the skip-bit may be 0
         case BIFF_TOK_ATTR_SKIP:
             dumpDec< sal_uInt16, sal_uInt8 >( !bBiff2, "skip" );
         break;
diff --git a/oox/source/dump/biffdumper.ini b/oox/source/dump/biffdumper.ini
index df9518e..48c514b 100644
--- a/oox/source/dump/biffdumper.ini
+++ b/oox/source/dump/biffdumper.ini
@@ -207,6 +207,7 @@ combilist=NLRADDFLAGS
 end
 
 flagslist=ATTRTYPES
+  0x00=skip
   0x01=volatile
   0x02=if
   0x04=choose
diff --git a/oox/source/xls/formulabase.cxx b/oox/source/xls/formulabase.cxx
index 7ba8af3..5240960 100644
--- a/oox/source/xls/formulabase.cxx
+++ b/oox/source/xls/formulabase.cxx
@@ -227,7 +227,7 @@ void ApiTokenIterator::skipSpaces()
 
 namespace {
 
-const size_t FUNCINFO_CLASSCOUNT            = 5;        /// Number of token class entries.
+const size_t FUNCINFO_PARAMINFOCOUNT        = 5;        /// Number of parameter type entries.
 
 const sal_uInt16 FUNCFLAG_VOLATILE          = 0x0001;   /// Result is volatile (e.g. NOW() function).
 const sal_uInt16 FUNCFLAG_IMPORTONLY        = 0x0002;   /// Only used in import filter.
@@ -237,6 +237,7 @@ const sal_uInt16 FUNCFLAG_EXTERNAL          = 0x0010;   /// Function is external
 const sal_uInt16 FUNCFLAG_MACROFUNC         = 0x0020;   /// Function is a macro-sheet function.
 const sal_uInt16 FUNCFLAG_MACROCMD          = 0x0040;   /// Function is a macro-sheet command.
 const sal_uInt16 FUNCFLAG_ALWAYSVAR         = 0x0080;   /// Function is always represented by a tFuncVar token.
+const sal_uInt16 FUNCFLAG_PARAMPAIRS        = 0x0100;   /// Optional parameters are expected to appear in pairs.
 
 const sal_uInt16 FUNCFLAG_FUNCLIBMASK       = 0xF000;   /// Mask for function library bits.
 const sal_uInt16 FUNCFLAG_EUROTOOL          = 0x1000;   /// Function is part of the EuroTool add-in.
@@ -252,7 +253,7 @@ struct FunctionData
     sal_uInt8           mnMinParamCount;    /// Minimum number of parameters.
     sal_uInt8           mnMaxParamCount;    /// Maximum number of parameters.
     sal_uInt8           mnRetClass;         /// BIFF token class of the return value.
-    sal_uInt8           mpnParamClass[ FUNCINFO_CLASSCOUNT ]; /// Expected BIFF token classes of parameters.
+    FunctionParamInfo   mpParamInfos[ FUNCINFO_PARAMINFOCOUNT ]; /// Information about all parameters.
     sal_uInt16          mnFlags;            /// Additional flags.
 
     inline bool         isSupported( bool bImportFilter ) const;
@@ -265,165 +266,179 @@ inline bool FunctionData::isSupported( bool bImportFilter ) const
     return !getFlag( mnFlags, bImportFilter ? FUNCFLAG_EXPORTONLY : FUNCFLAG_IMPORTONLY );
 }
 
-const sal_uInt8 R       = BIFF_TOKCLASS_REF;
-const sal_uInt8 V       = BIFF_TOKCLASS_VAL;
-const sal_uInt8 A       = BIFF_TOKCLASS_ARR;
-const sal_uInt8 ER      = FUNCINFO_PARAM_EXCELONLY | BIFF_TOKCLASS_REF;
-const sal_uInt8 EV      = FUNCINFO_PARAM_EXCELONLY | BIFF_TOKCLASS_VAL;
-const sal_uInt8 EA      = FUNCINFO_PARAM_EXCELONLY | BIFF_TOKCLASS_ARR;
-const sal_uInt8 C       = FUNCINFO_PARAM_CALCONLY;
-const sal_uInt8 I       = FUNCINFO_PARAM_INVALID;
-const sal_uInt16 NOID   = SAL_MAX_UINT16;
-const sal_uInt8 MX      = SAL_MAX_UINT8;
+const sal_uInt16 NOID = SAL_MAX_UINT16;     /// No BIFF/OOBIN function identifier available.
+const sal_uInt8 MX    = SAL_MAX_UINT8;      /// Maximum parameter count.
+
+// abbreviations for function return token class
+const sal_uInt8 R = BIFF_TOKCLASS_REF;
+const sal_uInt8 V = BIFF_TOKCLASS_VAL;
+const sal_uInt8 A = BIFF_TOKCLASS_ARR;
+
+// abbreviations for parameter infos
+#define RO   { FUNC_PARAM_REGULAR,   FUNC_PARAMCONV_ORG, false }
+#define RV   { FUNC_PARAM_REGULAR,   FUNC_PARAMCONV_VAL, false }
+#define RA   { FUNC_PARAM_REGULAR,   FUNC_PARAMCONV_ARR, false }
+#define RR   { FUNC_PARAM_REGULAR,   FUNC_PARAMCONV_RPT, false }
+#define RX   { FUNC_PARAM_REGULAR,   FUNC_PARAMCONV_RPX, false }
+#define VO   { FUNC_PARAM_REGULAR,   FUNC_PARAMCONV_ORG, true  }
+#define VV   { FUNC_PARAM_REGULAR,   FUNC_PARAMCONV_VAL, true  }
+#define VA   { FUNC_PARAM_REGULAR,   FUNC_PARAMCONV_ARR, true  }
+#define VR   { FUNC_PARAM_REGULAR,   FUNC_PARAMCONV_RPT, true  }
+#define VX   { FUNC_PARAM_REGULAR,   FUNC_PARAMCONV_RPX, true  }
+#define RO_E { FUNC_PARAM_EXCELONLY, FUNC_PARAMCONV_ORG, false }
+#define VR_E { FUNC_PARAM_EXCELONLY, FUNC_PARAMCONV_RPT, true  }
+#define C    { FUNC_PARAM_CALCONLY,  FUNC_PARAMCONV_ORG, false }
+
+// Note: parameter types of all macro sheet functions (FUNCFLAG_MACROFUNC/FUNCFLAG_MACROCMD) untested!
 
 /** Functions new in BIFF2. */
 static const FunctionData saFuncTableBiff2[] =
 {
-    { "COUNT",                  "COUNT",                0,      0,      0,  MX, V, { R }, 0 },
-    { "IF",                     "IF",                   1,      1,      2,  3,  R, { V, R }, 0 },
-    { "ISNA",                   "ISNA",                 2,      2,      1,  1,  V, { V }, 0 },
-    { "ISERROR",                "ISERROR",              3,      3,      1,  1,  V, { V }, 0 },
-    { "SUM",                    "SUM",                  4,      4,      0,  MX, V, { R }, 0 },
-    { "AVERAGE",                "AVERAGE",              5,      5,      1,  MX, V, { R }, 0 },
-    { "MIN",                    "MIN",                  6,      6,      1,  MX, V, { R }, 0 },
-    { "MAX",                    "MAX",                  7,      7,      1,  MX, V, { R }, 0 },
-    { "ROW",                    "ROW",                  8,      8,      0,  1,  V, { R }, 0 },
-    { "COLUMN",                 "COLUMN",               9,      9,      0,  1,  V, { R }, 0 },
+    { "COUNT",                  "COUNT",                0,      0,      0,  MX, V, { RX }, 0 },
+    { "IF",                     "IF",                   1,      1,      2,  3,  R, { VO, RO }, 0 },
+    { "ISNA",                   "ISNA",                 2,      2,      1,  1,  V, { VR }, 0 },
+    { "ISERROR",                "ISERROR",              3,      3,      1,  1,  V, { VR }, 0 },
+    { "SUM",                    "SUM",                  4,      4,      0,  MX, V, { RX }, 0 },
+    { "AVERAGE",                "AVERAGE",              5,      5,      1,  MX, V, { RX }, 0 },
+    { "MIN",                    "MIN",                  6,      6,      1,  MX, V, { RX }, 0 },
+    { "MAX",                    "MAX",                  7,      7,      1,  MX, V, { RX }, 0 },
+    { "ROW",                    "ROW",                  8,      8,      0,  1,  V, { RO }, 0 },
+    { "COLUMN",                 "COLUMN",               9,      9,      0,  1,  V, { RO }, 0 },
     { "NA",                     "NA",                   10,     10,     0,  0,  V, {}, 0 },
-    { "NPV",                    "NPV",                  11,     11,     2,  MX, V, { V, R }, 0 },
-    { "STDEV",                  "STDEV",                12,     12,     1,  MX, V, { R }, 0 },
-    { "DOLLAR",                 "DOLLAR",               13,     13,     1,  2,  V, { V }, 0 },
-    { "FIXED",                  "FIXED",                14,     14,     1,  2,  V, { V, V, C, I }, 0 },
-    { "SIN",                    "SIN",                  15,     15,     1,  1,  V, { V }, 0 },
-    { "COS",                    "COS",                  16,     16,     1,  1,  V, { V }, 0 },
-    { "TAN",                    "TAN",                  17,     17,     1,  1,  V, { V }, 0 },
-    { "COT",                    0,                      17,     17,     1,  1,  V, { V }, FUNCFLAG_EXPORTONLY },
-    { "ATAN",                   "ATAN",                 18,     18,     1,  1,  V, { V }, 0 },
-    { "ACOT",                   0,                      18,     18,     1,  1,  V, { V }, FUNCFLAG_EXPORTONLY },
+    { "NPV",                    "NPV",                  11,     11,     2,  MX, V, { VR, RX }, 0 },
+    { "STDEV",                  "STDEV",                12,     12,     1,  MX, V, { RX }, 0 },
+    { "DOLLAR",                 "DOLLAR",               13,     13,     1,  2,  V, { VR }, 0 },
+    { "FIXED",                  "FIXED",                14,     14,     1,  2,  V, { VR, VR, C }, 0 },
+    { "SIN",                    "SIN",                  15,     15,     1,  1,  V, { VR }, 0 },
+    { "COS",                    "COS",                  16,     16,     1,  1,  V, { VR }, 0 },
+    { "TAN",                    "TAN",                  17,     17,     1,  1,  V, { VR }, 0 },
+    { "COT",                    "TAN",                  17,     17,     1,  1,  V, { VR }, FUNCFLAG_EXPORTONLY },
+    { "ATAN",                   "ATAN",                 18,     18,     1,  1,  V, { VR }, 0 },
+    { "ACOT",                   "ATAN",                 18,     18,     1,  1,  V, { VR }, FUNCFLAG_EXPORTONLY },
     { "PI",                     "PI",                   19,     19,     0,  0,  V, {}, 0 },
-    { "SQRT",                   "SQRT",                 20,     20,     1,  1,  V, { V }, 0 },
-    { "EXP",                    "EXP",                  21,     21,     1,  1,  V, { V }, 0 },
-    { "LN",                     "LN",                   22,     22,     1,  1,  V, { V }, 0 },
-    { "LOG10",                  "LOG10",                23,     23,     1,  1,  V, { V }, 0 },
-    { "ABS",                    "ABS",                  24,     24,     1,  1,  V, { V }, 0 },
-    { "INT",                    "INT",                  25,     25,     1,  1,  V, { V }, 0 },
-    { "SIGN",                   "SIGN",                 26,     26,     1,  1,  V, { V }, 0 },
-    { "ROUND",                  "ROUND",                27,     27,     2,  2,  V, { V }, 0 },
-    { "LOOKUP",                 "LOOKUP",               28,     28,     2,  3,  V, { V, R }, 0 },
-    { "INDEX",                  "INDEX",                29,     29,     2,  4,  R, { R, V }, 0 },
-    { "REPT",                   "REPT",                 30,     30,     2,  2,  V, { V }, 0 },
-    { "MID",                    "MID",                  31,     31,     3,  3,  V, { V }, 0 },
-    { "LEN",                    "LEN",                  32,     32,     1,  1,  V, { V }, 0 },
-    { "VALUE",                  "VALUE",                33,     33,     1,  1,  V, { V }, 0 },
+    { "SQRT",                   "SQRT",                 20,     20,     1,  1,  V, { VR }, 0 },
+    { "EXP",                    "EXP",                  21,     21,     1,  1,  V, { VR }, 0 },
+    { "LN",                     "LN",                   22,     22,     1,  1,  V, { VR }, 0 },
+    { "LOG10",                  "LOG10",                23,     23,     1,  1,  V, { VR }, 0 },
+    { "ABS",                    "ABS",                  24,     24,     1,  1,  V, { VR }, 0 },
+    { "INT",                    "INT",                  25,     25,     1,  1,  V, { VR }, 0 },
+    { "SIGN",                   "SIGN",                 26,     26,     1,  1,  V, { VR }, 0 },
+    { "ROUND",                  "ROUND",                27,     27,     2,  2,  V, { VR }, 0 },
+    { "LOOKUP",                 "LOOKUP",               28,     28,     2,  3,  V, { VR, RA }, 0 },
+    { "INDEX",                  "INDEX",                29,     29,     2,  4,  R, { RA, VV }, 0 },
+    { "REPT",                   "REPT",                 30,     30,     2,  2,  V, { VR }, 0 },
+    { "MID",                    "MID",                  31,     31,     3,  3,  V, { VR }, 0 },
+    { "LEN",                    "LEN",                  32,     32,     1,  1,  V, { VR }, 0 },
+    { "VALUE",                  "VALUE",                33,     33,     1,  1,  V, { VR }, 0 },
     { "TRUE",                   "TRUE",                 34,     34,     0,  0,  V, {}, 0 },
     { "FALSE",                  "FALSE",                35,     35,     0,  0,  V, {}, 0 },
-    { "AND",                    "AND",                  36,     36,     1,  MX, V, { R }, 0 },
-    { "OR",                     "OR",                   37,     37,     1,  MX, V, { R }, 0 },
-    { "NOT",                    "NOT",                  38,     38,     1,  1,  V, { V }, 0 },
-    { "MOD",                    "MOD",                  39,     39,     2,  2,  V, { V }, 0 },
-    { "DCOUNT",                 "DCOUNT",               40,     40,     3,  3,  V, { R }, 0 },
-    { "DSUM",                   "DSUM",                 41,     41,     3,  3,  V, { R }, 0 },
-    { "DAVERAGE",               "DAVERAGE",             42,     42,     3,  3,  V, { R }, 0 },
-    { "DMIN",                   "DMIN",                 43,     43,     3,  3,  V, { R }, 0 },
-    { "DMAX",                   "DMAX",                 44,     44,     3,  3,  V, { R }, 0 },
-    { "DSTDEV",                 "DSTDEV",               45,     45,     3,  3,  V, { R }, 0 },
-    { "VAR",                    "VAR",                  46,     46,     1,  MX, V, { R }, 0 },
-    { "DVAR",                   "DVAR",                 47,     47,     3,  3,  V, { R }, 0 },
-    { "TEXT",                   "TEXT",                 48,     48,     2,  2,  V, { V }, 0 },
-    { "LINEST",                 "LINEST",               49,     49,     1,  2,  A, { R, R, C, C, I }, 0 },
-    { "TREND",                  "TREND",                50,     50,     1,  3,  A, { R, R, R, C, I }, 0 },
-    { "LOGEST",                 "LOGEST",               51,     51,     1,  2,  A, { R, R, C, C, I }, 0 },
-    { "GROWTH",                 "GROWTH",               52,     52,     1,  3,  A, { R, R, R, C, I }, 0 },
-    { 0,                        "RETURN",               55,     55,     0,  1,  R, { R }, FUNCFLAG_MACROFUNC },
-    { "PV",                     "PV",                   56,     56,     3,  5,  V, { V }, 0 },
-    { "FV",                     "FV",                   57,     57,     3,  5,  V, { V }, 0 },
-    { "NPER",                   "NPER",                 58,     58,     3,  5,  V, { V }, 0 },
-    { "PMT",                    "PMT",                  59,     59,     3,  5,  V, { V }, 0 },
-    { "RATE",                   "RATE",                 60,     60,     3,  6,  V, { V }, 0 },
-    { "MIRR",                   "MIRR",                 61,     61,     3,  3,  V, { R, V }, 0 },
-    { "IRR",                    "IRR",                  62,     62,     1,  2,  V, { R, V }, 0 },
+    { "AND",                    "AND",                  36,     36,     1,  MX, V, { RX }, 0 },
+    { "OR",                     "OR",                   37,     37,     1,  MX, V, { RX }, 0 },
+    { "NOT",                    "NOT",                  38,     38,     1,  1,  V, { VR }, 0 },
+    { "MOD",                    "MOD",                  39,     39,     2,  2,  V, { VR }, 0 },
+    { "DCOUNT",                 "DCOUNT",               40,     40,     3,  3,  V, { RO, RR }, 0 },
+    { "DSUM",                   "DSUM",                 41,     41,     3,  3,  V, { RO, RR }, 0 },
+    { "DAVERAGE",               "DAVERAGE",             42,     42,     3,  3,  V, { RO, RR }, 0 },
+    { "DMIN",                   "DMIN",                 43,     43,     3,  3,  V, { RO, RR }, 0 },
+    { "DMAX",                   "DMAX",                 44,     44,     3,  3,  V, { RO, RR }, 0 },
+    { "DSTDEV",                 "DSTDEV",               45,     45,     3,  3,  V, { RO, RR }, 0 },
+    { "VAR",                    "VAR",                  46,     46,     1,  MX, V, { RX }, 0 },
+    { "DVAR",                   "DVAR",                 47,     47,     3,  3,  V, { RO, RR }, 0 },
+    { "TEXT",                   "TEXT",                 48,     48,     2,  2,  V, { VR }, 0 },
+    { "LINEST",                 "LINEST",               49,     49,     1,  2,  A, { RA, RA, C, C }, 0 },
+    { "TREND",                  "TREND",                50,     50,     1,  3,  A, { RA, RA, RA, C }, 0 },
+    { "LOGEST",                 "LOGEST",               51,     51,     1,  2,  A, { RA, RA, C, C }, 0 },
+    { "GROWTH",                 "GROWTH",               52,     52,     1,  3,  A, { RA, RA, RA, C }, 0 },
+    { 0,                        "RETURN",               55,     55,     0,  1,  R, { RO }, FUNCFLAG_MACROFUNC },
+    { "PV",                     "PV",                   56,     56,     3,  5,  V, { VR }, 0 },
+    { "FV",                     "FV",                   57,     57,     3,  5,  V, { VR }, 0 },
+    { "NPER",                   "NPER",                 58,     58,     3,  5,  V, { VR }, 0 },
+    { "PMT",                    "PMT",                  59,     59,     3,  5,  V, { VR }, 0 },
+    { "RATE",                   "RATE",                 60,     60,     3,  6,  V, { VR }, 0 },
+    { "MIRR",                   "MIRR",                 61,     61,     3,  3,  V, { RA, VR }, 0 },
+    { "IRR",                    "IRR",                  62,     62,     1,  2,  V, { RA, VR }, 0 },
     { "RAND",                   "RAND",                 63,     63,     0,  0,  V, {}, FUNCFLAG_VOLATILE },
-    { "MATCH",                  "MATCH",                64,     64,     2,  3,  V, { V, R }, 0 },
-    { "DATE",                   "DATE",                 65,     65,     3,  3,  V, { V }, 0 },
-    { "TIME",                   "TIME",                 66,     66,     3,  3,  V, { V }, 0 },
-    { "DAY",                    "DAY",                  67,     67,     1,  1,  V, { V }, 0 },
-    { "MONTH",                  "MONTH",                68,     68,     1,  1,  V, { V }, 0 },
-    { "YEAR",                   "YEAR",                 69,     69,     1,  1,  V, { V }, 0 },
-    { "WEEKDAY",                "WEEKDAY",              70,     70,     1,  1,  V, { V, C, I }, 0 },
-    { "HOUR",                   "HOUR",                 71,     71,     1,  1,  V, { V }, 0 },
-    { "MINUTE",                 "MINUTE",               72,     72,     1,  1,  V, { V }, 0 },
-    { "SECOND",                 "SECOND",               73,     73,     1,  1,  V, { V }, 0 },
+    { "MATCH",                  "MATCH",                64,     64,     2,  3,  V, { VR, RX, RR }, 0 },
+    { "DATE",                   "DATE",                 65,     65,     3,  3,  V, { VR }, 0 },
+    { "TIME",                   "TIME",                 66,     66,     3,  3,  V, { VR }, 0 },
+    { "DAY",                    "DAY",                  67,     67,     1,  1,  V, { VR }, 0 },
+    { "MONTH",                  "MONTH",                68,     68,     1,  1,  V, { VR }, 0 },
+    { "YEAR",                   "YEAR",                 69,     69,     1,  1,  V, { VR }, 0 },
+    { "WEEKDAY",                "WEEKDAY",              70,     70,     1,  1,  V, { VR, C }, 0 },
+    { "HOUR",                   "HOUR",                 71,     71,     1,  1,  V, { VR }, 0 },
+    { "MINUTE",                 "MINUTE",               72,     72,     1,  1,  V, { VR }, 0 },
+    { "SECOND",                 "SECOND",               73,     73,     1,  1,  V, { VR }, 0 },
     { "NOW",                    "NOW",                  74,     74,     0,  0,  V, {}, FUNCFLAG_VOLATILE },
-    { "AREAS",                  "AREAS",                75,     75,     1,  1,  V, { R }, 0 },
-    { "ROWS",                   "ROWS",                 76,     76,     1,  1,  V, { R }, 0 },
-    { "COLUMNS",                "COLUMNS",              77,     77,     1,  1,  V, { R }, 0 },
-    { "OFFSET",                 "OFFSET",               78,     78,     3,  5,  R, { R, V }, FUNCFLAG_VOLATILE },
-    { 0,                        "ABSREF",               79,     79,     2,  2,  R, { V, R }, FUNCFLAG_MACROFUNC },
-    { "SEARCH",                 "SEARCH",               82,     82,     2,  3,  V, { V }, 0 },
-    { "TRANSPOSE",              "TRANSPOSE",            83,     83,     1,  1,  A, { A }, 0 },
-    { "TYPE",                   "TYPE",                 86,     86,     1,  1,  V, { V }, 0 },
+    { "AREAS",                  "AREAS",                75,     75,     1,  1,  V, { RO }, 0 },
+    { "ROWS",                   "ROWS",                 76,     76,     1,  1,  V, { RO }, 0 },
+    { "COLUMNS",                "COLUMNS",              77,     77,     1,  1,  V, { RO }, 0 },
+    { "OFFSET",                 "OFFSET",               78,     78,     3,  5,  R, { RO, VR }, FUNCFLAG_VOLATILE },
+    { 0,                        "ABSREF",               79,     79,     2,  2,  R, { VR, RO }, FUNCFLAG_MACROFUNC },
+    { "SEARCH",                 "SEARCH",               82,     82,     2,  3,  V, { VR }, 0 },
+    { "TRANSPOSE",              "TRANSPOSE",            83,     83,     1,  1,  A, { VO }, 0 },
+    { "TYPE",                   "TYPE",                 86,     86,     1,  1,  V, { VX }, 0 },
     { 0,                        "ACTIVE.CELL",          94,     94,     0,  0,  R, {}, FUNCFLAG_MACROFUNC },
-    { "ATAN2",                  "ATAN2",                97,     97,     2,  2,  V, { V }, 0 },
-    { "ASIN",                   "ASIN",                 98,     98,     1,  1,  V, { V }, 0 },
-    { "ACOS",                   "ACOS",                 99,     99,     1,  1,  V, { V }, 0 },
-    { "CHOOSE",                 "CHOOSE",               100,    100,    2,  MX, R, { V, R }, 0 },
-    { "HLOOKUP",                "HLOOKUP",              101,    101,    3,  3,  V, { V, R, R, C, I }, 0 },
-    { "VLOOKUP",                "VLOOKUP",              102,    102,    3,  3,  V, { V, R, R, C, I }, 0 },
-    { "ISREF",                  "ISREF",                105,    105,    1,  1,  V, { R }, 0 },
-    { "LOG",                    "LOG",                  109,    109,    1,  2,  V, { V }, 0 },
-    { "CHAR",                   "CHAR",                 111,    111,    1,  1,  V, { V }, 0 },
-    { "LOWER",                  "LOWER",                112,    112,    1,  1,  V, { V }, 0 },
-    { "UPPER",                  "UPPER",                113,    113,    1,  1,  V, { V }, 0 },
-    { "PROPER",                 "PROPER",               114,    114,    1,  1,  V, { V }, 0 },
-    { "LEFT",                   "LEFT",                 115,    115,    1,  2,  V, { V }, 0 },
-    { "RIGHT",                  "RIGHT",                116,    116,    1,  2,  V, { V }, 0 },
-    { "EXACT",                  "EXACT",                117,    117,    2,  2,  V, { V }, 0 },
-    { "TRIM",                   "TRIM",                 118,    118,    1,  1,  V, { V }, 0 },
-    { "REPLACE",                "REPLACE",              119,    119,    4,  4,  V, { V }, 0 },
-    { "SUBSTITUTE",             "SUBSTITUTE",           120,    120,    3,  4,  V, { V }, 0 },
-    { "CODE",                   "CODE",                 121,    121,    1,  1,  V, { V }, 0 },
-    { "FIND",                   "FIND",                 124,    124,    2,  3,  V, { V }, 0 },
-    { "CELL",                   "CELL",                 125,    125,    1,  2,  V, { V, R }, FUNCFLAG_VOLATILE },
-    { "ISERR",                  "ISERR",                126,    126,    1,  1,  V, { V }, 0 },
-    { "ISTEXT",                 "ISTEXT",               127,    127,    1,  1,  V, { V }, 0 },
-    { "ISNUMBER",               "ISNUMBER",             128,    128,    1,  1,  V, { V }, 0 },
-    { "ISBLANK",                "ISBLANK",              129,    129,    1,  1,  V, { V }, 0 },
-    { "T",                      "T",                    130,    130,    1,  1,  V, { R }, 0 },
-    { "N",                      "N",                    131,    131,    1,  1,  V, { R }, 0 },
-    { "DATEVALUE",              "DATEVALUE",            140,    140,    1,  1,  V, { V }, 0 },
-    { "TIMEVALUE",              "TIMEVALUE",            141,    141,    1,  1,  V, { V }, 0 },
-    { "SLN",                    "SLN",                  142,    142,    3,  3,  V, { V }, 0 },
-    { "SYD",                    "SYD",                  143,    143,    4,  4,  V, { V }, 0 },
-    { "DDB",                    "DDB",                  144,    144,    4,  5,  V, { V }, 0 },
-    { "INDIRECT",               "INDIRECT",             148,    148,    1,  2,  R, { V }, FUNCFLAG_VOLATILE },
+    { "ATAN2",                  "ATAN2",                97,     97,     2,  2,  V, { VR }, 0 },
+    { "ASIN",                   "ASIN",                 98,     98,     1,  1,  V, { VR }, 0 },
+    { "ACOS",                   "ACOS",                 99,     99,     1,  1,  V, { VR }, 0 },
+    { "CHOOSE",                 "CHOOSE",               100,    100,    2,  MX, R, { VO, RO }, 0 },
+    { "HLOOKUP",                "HLOOKUP",              101,    101,    3,  3,  V, { VV, RO, RO, C }, 0 },
+    { "VLOOKUP",                "VLOOKUP",              102,    102,    3,  3,  V, { VV, RO, RO, C }, 0 },
+    { "ISREF",                  "ISREF",                105,    105,    1,  1,  V, { RX }, 0 },
+    { "LOG",                    "LOG",                  109,    109,    1,  2,  V, { VR }, 0 },
+    { "CHAR",                   "CHAR",                 111,    111,    1,  1,  V, { VR }, 0 },
+    { "LOWER",                  "LOWER",                112,    112,    1,  1,  V, { VR }, 0 },
+    { "UPPER",                  "UPPER",                113,    113,    1,  1,  V, { VR }, 0 },
+    { "PROPER",                 "PROPER",               114,    114,    1,  1,  V, { VR }, 0 },
+    { "LEFT",                   "LEFT",                 115,    115,    1,  2,  V, { VR }, 0 },
+    { "RIGHT",                  "RIGHT",                116,    116,    1,  2,  V, { VR }, 0 },
+    { "EXACT",                  "EXACT",                117,    117,    2,  2,  V, { VR }, 0 },
+    { "TRIM",                   "TRIM",                 118,    118,    1,  1,  V, { VR }, 0 },
+    { "REPLACE",                "REPLACE",              119,    119,    4,  4,  V, { VR }, 0 },
+    { "SUBSTITUTE",             "SUBSTITUTE",           120,    120,    3,  4,  V, { VR }, 0 },
+    { "CODE",                   "CODE",                 121,    121,    1,  1,  V, { VR }, 0 },
+    { "FIND",                   "FIND",                 124,    124,    2,  3,  V, { VR }, 0 },
+    { "CELL",                   "CELL",                 125,    125,    1,  2,  V, { VV, RO }, FUNCFLAG_VOLATILE },
+    { "ISERR",                  "ISERR",                126,    126,    1,  1,  V, { VR }, 0 },
+    { "ISTEXT",                 "ISTEXT",               127,    127,    1,  1,  V, { VR }, 0 },
+    { "ISNUMBER",               "ISNUMBER",             128,    128,    1,  1,  V, { VR }, 0 },
+    { "ISBLANK",                "ISBLANK",              129,    129,    1,  1,  V, { VR }, 0 },
+    { "T",                      "T",                    130,    130,    1,  1,  V, { RO }, 0 },
+    { "N",                      "N",                    131,    131,    1,  1,  V, { RO }, 0 },
+    { "DATEVALUE",              "DATEVALUE",            140,    140,    1,  1,  V, { VR }, 0 },
+    { "TIMEVALUE",              "TIMEVALUE",            141,    141,    1,  1,  V, { VR }, 0 },
+    { "SLN",                    "SLN",                  142,    142,    3,  3,  V, { VR }, 0 },
+    { "SYD",                    "SYD",                  143,    143,    4,  4,  V, { VR }, 0 },
+    { "DDB",                    "DDB",                  144,    144,    4,  5,  V, { VR }, 0 },
+    { "INDIRECT",               "INDIRECT",             148,    148,    1,  2,  R, { VR }, FUNCFLAG_VOLATILE },
     { 0,                        "ADD.BAR",              151,    151,    0,  0,  V, {}, FUNCFLAG_MACROFUNC | FUNCFLAG_ALWAYSVAR },
-    { 0,                        "ADD.MENU",             152,    152,    2,  2,  V, { V, R }, FUNCFLAG_MACROFUNC | FUNCFLAG_ALWAYSVAR },
-    { 0,                        "ADD.COMMAND",          153,    153,    3,  3,  V, { V, R }, FUNCFLAG_MACROFUNC | FUNCFLAG_ALWAYSVAR },
-    { "CLEAN",                  "CLEAN",                162,    162,    1,  1,  V, { V }, 0 },
-    { "MDETERM",                "MDETERM",              163,    163,    1,  1,  V, { A }, 0 },
-    { "MINVERSE",               "MINVERSE",             164,    164,    1,  1,  A, { A }, 0 },
-    { "MMULT",                  "MMULT",                165,    165,    2,  2,  A, { A }, 0 },
-    { "IPMT",                   "IPMT",                 167,    167,    4,  6,  V, { V }, 0 },
-    { "PPMT",                   "PPMT",                 168,    168,    4,  6,  V, { V }, 0 },
-    { "COUNTA",                 "COUNTA",               169,    169,    0,  MX, V, { R }, 0 },
-    { "PRODUCT",                "PRODUCT",              183,    183,    0,  MX, V, { R }, 0 },
-    { "FACT",                   "FACT",                 184,    184,    1,  1,  V, { V }, 0 },
-    { "DPRODUCT",               "DPRODUCT",             189,    189,    3,  3,  V, { R }, 0 },
-    { "ISNONTEXT",              "ISNONTEXT",            190,    190,    1,  1,  V, { V }, 0 },
-    { "STDEVP",                 "STDEVP",               193,    193,    1,  MX, V, { R }, 0 },
-    { "VARP",                   "VARP",                 194,    194,    1,  MX, V, { R }, 0 },
-    { "DSTDEVP",                "DSTDEVP",              195,    195,    3,  3,  V, { R }, 0 },
-    { "DVARP",                  "DVARP",                196,    196,    3,  3,  V, { R }, 0 },
-    { "TRUNC",                  "TRUNC",                197,    197,    1,  1,  V, { V, C, I }, 0 },
-    { "ISLOGICAL",              "ISLOGICAL",            198,    198,    1,  1,  V, { V }, 0 },
-    { "DCOUNTA",                "DCOUNTA",              199,    199,    3,  3,  V, { R }, 0 },
-    { 0,                        "EXTERN.CALL",          255,    255,    1,  MX, R, { ER, R }, FUNCFLAG_IMPORTONLY },
+    { 0,                        "ADD.MENU",             152,    152,    2,  2,  V, { VR, RO }, FUNCFLAG_MACROFUNC | FUNCFLAG_ALWAYSVAR },
+    { 0,                        "ADD.COMMAND",          153,    153,    3,  3,  V, { VR, RO }, FUNCFLAG_MACROFUNC | FUNCFLAG_ALWAYSVAR },
+    { "CLEAN",                  "CLEAN",                162,    162,    1,  1,  V, { VR }, 0 },
+    { "MDETERM",                "MDETERM",              163,    163,    1,  1,  V, { VA }, 0 },
+    { "MINVERSE",               "MINVERSE",             164,    164,    1,  1,  A, { VA }, 0 },
+    { "MMULT",                  "MMULT",                165,    165,    2,  2,  A, { VA }, 0 },
+    { "IPMT",                   "IPMT",                 167,    167,    4,  6,  V, { VR }, 0 },
+    { "PPMT",                   "PPMT",                 168,    168,    4,  6,  V, { VR }, 0 },
+    { "COUNTA",                 "COUNTA",               169,    169,    0,  MX, V, { RX }, 0 },
+    { "PRODUCT",                "PRODUCT",              183,    183,    0,  MX, V, { RX }, 0 },
+    { "FACT",                   "FACT",                 184,    184,    1,  1,  V, { VR }, 0 },
+    { "DPRODUCT",               "DPRODUCT",             189,    189,    3,  3,  V, { RO, RR }, 0 },
+    { "ISNONTEXT",              "ISNONTEXT",            190,    190,    1,  1,  V, { VR }, 0 },
+    { "STDEVP",                 "STDEVP",               193,    193,    1,  MX, V, { RX }, 0 },
+    { "VARP",                   "VARP",                 194,    194,    1,  MX, V, { RX }, 0 },
+    { "DSTDEVP",                "DSTDEVP",              195,    195,    3,  3,  V, { RO, RR }, 0 },
+    { "DVARP",                  "DVARP",                196,    196,    3,  3,  V, { RO, RR }, 0 },
+    { "TRUNC",                  "TRUNC",                197,    197,    1,  1,  V, { VR, C }, 0 },
+    { "ISLOGICAL",              "ISLOGICAL",            198,    198,    1,  1,  V, { VR }, 0 },
+    { "DCOUNTA",                "DCOUNTA",              199,    199,    3,  3,  V, { RO, RR }, 0 },
+    { 0,                        "EXTERN.CALL",          255,    255,    1,  MX, R, { RO_E, RO }, FUNCFLAG_IMPORTONLY },
 
     // *** macro sheet commands ***
 
-    { 0,                        "A1.R1C1",              30,     30,     0,  1,  V, { V }, FUNCFLAG_MACROCMD },
+    { 0,                        "A1.R1C1",              30,     30,     0,  1,  V, { VR }, FUNCFLAG_MACROCMD },
     { 0,                        "ADD.ARROW",            81,     81,     0,  0,  V, {}, FUNCFLAG_MACROCMD },
-    { 0,                        "ACTIVATE",             103,    103,    0,  2,  V, { V }, FUNCFLAG_MACROCMD },
+    { 0,                        "ACTIVATE",             103,    103,    0,  2,  V, { VR }, FUNCFLAG_MACROCMD },
     { 0,                        "ACTIVATE.NEXT",        104,    104,    0,  0,  V, {}, FUNCFLAG_MACROCMD },
     { 0,                        "ACTIVATE.PREV",        105,    105,    0,  0,  V, {}, FUNCFLAG_MACROCMD }
 };
@@ -431,336 +446,336 @@ static const FunctionData saFuncTableBiff2[] =
 /** Functions new in BIFF3. */
 static const FunctionData saFuncTableBiff3[] =
 {
-    { "LINEST",                 "LINEST",               49,     49,     1,  4,  A, { R, R, V, V }, 0 },             // BIFF2: 1-2, BIFF3: 1-4
-    { "TREND",                  "TREND",                50,     50,     1,  4,  A, { R, R, R, V }, 0 },             // BIFF2: 1-3, BIFF3: 1-4
-    { "LOGEST",                 "LOGEST",               51,     51,     1,  4,  A, { R, R, V, V }, 0 },             // BIFF2: 1-2, BIFF3: 1-4
-    { "GROWTH",                 "GROWTH",               52,     52,     1,  4,  A, { R, R, R, V }, 0 },             // BIFF2: 1-3, BIFF3: 1-4
-    { 0,                        "ADD.BAR",              151,    151,    0,  1,  V, { V }, FUNCFLAG_MACROFUNC },     // BIFF2: 0,   BIFF3: 0-1
-    { 0,                        "ADD.MENU",             152,    152,    2,  3,  V, { V, R }, FUNCFLAG_MACROFUNC },  // BIFF2: 2,   BIFF3: 2-3
-    { 0,                        "ADD.COMMAND",          153,    153,    3,  4,  V, { V, R }, FUNCFLAG_MACROFUNC },  // BIFF2: 3,   BIFF3: 3-4
-    { "TRUNC",                  "TRUNC",                197,    197,    1,  2,  V, { V }, 0 },                      // BIFF2: 1,   BIFF3: 1-2
-    { "DOLLAR",                 "USDOLLAR",             204,    204,    1,  2,  V, { V }, FUNCFLAG_IMPORTONLY },
-    { 0/*"FIND"*/,              "FINDB",                205,    205,    2,  3,  V, { V }, 0 },
-    { 0/*"SEARCH"*/,            "SEARCHB",              206,    206,    2,  3,  V, { V }, 0 },
-    { 0/*"REPLACE"*/,           "REPLACEB",             207,    207,    4,  4,  V, { V }, 0 },
-    { 0/*"LEFT"*/,              "LEFTB",                208,    208,    1,  2,  V, { V }, 0 },
-    { 0/*"RIGHT"*/,             "RIGHTB",               209,    209,    1,  2,  V, { V }, 0 },
-    { 0/*"MID"*/,               "MIDB",                 210,    210,    3,  3,  V, { V }, 0 },
-    { 0/*"LEN"*/,               "LENB",                 211,    211,    1,  1,  V, { V }, 0 },
-    { "ROUNDUP",                "ROUNDUP",              212,    212,    2,  2,  V, { V }, 0 },
-    { "ROUNDDOWN",              "ROUNDDOWN",            213,    213,    2,  2,  V, { V }, 0 },
-    { "ASC",                    "ASC",                  214,    214,    1,  1,  V, { V }, 0 },
-    { "JIS",                    "DBCS",                 215,    215,    1,  1,  V, { V }, 0 },
-    { "ADDRESS",                "ADDRESS",              219,    219,    2,  5,  V, { V }, 0 },
-    { "DAYS360",                "DAYS360",              220,    220,    2,  2,  V, { V, V, C, I }, 0 },
+    { "LINEST",                 "LINEST",               49,     49,     1,  4,  A, { RA, RA, VV }, 0 },             // BIFF2: 1-2, BIFF3: 1-4
+    { "TREND",                  "TREND",                50,     50,     1,  4,  A, { RA, RA, RA, VV }, 0 },             // BIFF2: 1-3, BIFF3: 1-4
+    { "LOGEST",                 "LOGEST",               51,     51,     1,  4,  A, { RA, RA, VV }, 0 },             // BIFF2: 1-2, BIFF3: 1-4
+    { "GROWTH",                 "GROWTH",               52,     52,     1,  4,  A, { RA, RA, RA, VV }, 0 },             // BIFF2: 1-3, BIFF3: 1-4
+    { 0,                        "ADD.BAR",              151,    151,    0,  1,  V, { VR }, FUNCFLAG_MACROFUNC },     // BIFF2: 0,   BIFF3: 0-1
+    { 0,                        "ADD.MENU",             152,    152,    2,  3,  V, { VR, RO }, FUNCFLAG_MACROFUNC },  // BIFF2: 2,   BIFF3: 2-3
+    { 0,                        "ADD.COMMAND",          153,    153,    3,  4,  V, { VR, RO }, FUNCFLAG_MACROFUNC },  // BIFF2: 3,   BIFF3: 3-4
+    { "TRUNC",                  "TRUNC",                197,    197,    1,  2,  V, { VR }, 0 },                      // BIFF2: 1,   BIFF3: 1-2
+    { "DOLLAR",                 "USDOLLAR",             204,    204,    1,  2,  V, { VR }, FUNCFLAG_IMPORTONLY },
+    { 0/*"FIND"*/,              "FINDB",                205,    205,    2,  3,  V, { VR }, 0 },
+    { 0/*"SEARCH"*/,            "SEARCHB",              206,    206,    2,  3,  V, { VR }, 0 },
+    { 0/*"REPLACE"*/,           "REPLACEB",             207,    207,    4,  4,  V, { VR }, 0 },
+    { 0/*"LEFT"*/,              "LEFTB",                208,    208,    1,  2,  V, { VR }, 0 },
+    { 0/*"RIGHT"*/,             "RIGHTB",               209,    209,    1,  2,  V, { VR }, 0 },
+    { 0/*"MID"*/,               "MIDB",                 210,    210,    3,  3,  V, { VR }, 0 },
+    { 0/*"LEN"*/,               "LENB",                 211,    211,    1,  1,  V, { VR }, 0 },
+    { "ROUNDUP",                "ROUNDUP",              212,    212,    2,  2,  V, { VR }, 0 },
+    { "ROUNDDOWN",              "ROUNDDOWN",            213,    213,    2,  2,  V, { VR }, 0 },
+    { "ASC",                    "ASC",                  214,    214,    1,  1,  V, { VR }, 0 },
+    { "JIS",                    "DBCS",                 215,    215,    1,  1,  V, { VR }, 0 },
+    { "ADDRESS",                "ADDRESS",              219,    219,    2,  5,  V, { VR }, 0 },
+    { "DAYS360",                "DAYS360",              220,    220,    2,  2,  V, { VR, VR, C }, 0 },
     { "TODAY",                  "TODAY",                221,    221,    0,  0,  V, {}, FUNCFLAG_VOLATILE },
-    { "VDB",                    "VDB",                  222,    222,    5,  7,  V, { V }, 0 },
-    { "MEDIAN",                 "MEDIAN",               227,    227,    1,  MX, V, { R }, 0 },
-    { "SUMPRODUCT",             "SUMPRODUCT",           228,    228,    1,  MX, V, { A }, 0 },
-    { "SINH",                   "SINH",                 229,    229,    1,  1,  V, { V }, 0 },
-    { "COSH",                   "COSH",                 230,    230,    1,  1,  V, { V }, 0 },
-    { "TANH",                   "TANH",                 231,    231,    1,  1,  V, { V }, 0 },
-    { "COTH",                   0,                      231,    231,    1,  1,  V, { V }, FUNCFLAG_EXPORTONLY },
-    { "ASINH",                  "ASINH",                232,    232,    1,  1,  V, { V }, 0 },
-    { "ACOSH",                  "ACOSH",                233,    233,    1,  1,  V, { V }, 0 },
-    { "ATANH",                  "ATANH",                234,    234,    1,  1,  V, { V }, 0 },
-    { "ACOTH",                  0,                      234,    234,    1,  1,  V, { V }, FUNCFLAG_EXPORTONLY },
-    { "DGET",                   "DGET",                 235,    235,    3,  3,  V, { R }, 0 },
-    { "INFO",                   "INFO",                 244,    244,    1,  1,  V, { V }, FUNCFLAG_VOLATILE }
+    { "VDB",                    "VDB",                  222,    222,    5,  7,  V, { VR }, 0 },
+    { "MEDIAN",                 "MEDIAN",               227,    227,    1,  MX, V, { RX }, 0 },
+    { "SUMPRODUCT",             "SUMPRODUCT",           228,    228,    1,  MX, V, { VA }, 0 },
+    { "SINH",                   "SINH",                 229,    229,    1,  1,  V, { VR }, 0 },
+    { "COSH",                   "COSH",                 230,    230,    1,  1,  V, { VR }, 0 },
+    { "TANH",                   "TANH",                 231,    231,    1,  1,  V, { VR }, 0 },
+    { "COTH",                   "TANH",                 231,    231,    1,  1,  V, { VR }, FUNCFLAG_EXPORTONLY },
+    { "ASINH",                  "ASINH",                232,    232,    1,  1,  V, { VR }, 0 },
+    { "ACOSH",                  "ACOSH",                233,    233,    1,  1,  V, { VR }, 0 },
+    { "ATANH",                  "ATANH",                234,    234,    1,  1,  V, { VR }, 0 },
+    { "ACOTH",                  "ATANH",                234,    234,    1,  1,  V, { VR }, FUNCFLAG_EXPORTONLY },
+    { "DGET",                   "DGET",                 235,    235,    3,  3,  V, { RO, RR }, 0 },
+    { "INFO",                   "INFO",                 244,    244,    1,  1,  V, { VR }, FUNCFLAG_VOLATILE }
 };
 
 /** Functions new in BIFF4. */
 static const FunctionData saFuncTableBiff4[] =
 {
-    { "FIXED",                  "FIXED",                14,     14,     1,  3,  V, { V }, 0 },       // BIFF2-3: 1-2, BIFF4: 1-3
-    { "RANK",                   "RANK",                 216,    216,    2,  3,  V, { V, R, V }, 0 },
-    { "DB",                     "DB",                   247,    247,    4,  5,  V, { V }, 0 },
-    { "FREQUENCY",              "FREQUENCY",            252,    252,    2,  2,  A, { R }, 0 },
-    { "ORG.OPENOFFICE.ERRORTYPE","ERROR.TYPE",          261,    261,    1,  1,  V, { V }, 0 },
-    { "AVEDEV",                 "AVEDEV",               269,    269,    1,  MX, V, { R }, 0 },
-    { "BETADIST",               "BETADIST",             270,    270,    3,  5,  V, { V }, 0 },
-    { "GAMMALN",                "GAMMALN",              271,    271,    1,  1,  V, { V }, 0 },
-    { "BETAINV",                "BETAINV",              272,    272,    3,  5,  V, { V }, 0 },
-    { "BINOMDIST",              "BINOMDIST",            273,    273,    4,  4,  V, { V }, 0 },
-    { "LEGACY.CHIDIST",         "CHIDIST",              274,    274,    2,  2,  V, { V }, 0 },
-    { "LEGACY.CHIINV",          "CHIINV",               275,    275,    2,  2,  V, { V }, 0 },
-    { "COMBIN",                 "COMBIN",               276,    276,    2,  2,  V, { V }, 0 },
-    { "CONFIDENCE",             "CONFIDENCE",           277,    277,    3,  3,  V, { V }, 0 },
-    { "CRITBINOM",              "CRITBINOM",            278,    278,    3,  3,  V, { V }, 0 },
-    { "EVEN",                   "EVEN",                 279,    279,    1,  1,  V, { V }, 0 },
-    { "EXPONDIST",              "EXPONDIST",            280,    280,    3,  3,  V, { V }, 0 },
-    { "LEGACY.FDIST",           "FDIST",                281,    281,    3,  3,  V, { V }, 0 },
-    { "LEGACY.FINV",            "FINV",                 282,    282,    3,  3,  V, { V }, 0 },
-    { "FISHER",                 "FISHER",               283,    283,    1,  1,  V, { V }, 0 },
-    { "FISHERINV",              "FISHERINV",            284,    284,    1,  1,  V, { V }, 0 },
-    { "FLOOR",                  "FLOOR",                285,    285,    2,  2,  V, { V, V, C, I }, 0 },
-    { "GAMMADIST",              "GAMMADIST",            286,    286,    4,  4,  V, { V }, 0 },
-    { "GAMMAINV",               "GAMMAINV",             287,    287,    3,  3,  V, { V }, 0 },
-    { "CEILING",                "CEILING",              288,    288,    2,  2,  V, { V, V, C, I }, 0 },
-    { "HYPGEOMDIST",            "HYPGEOMDIST",          289,    289,    4,  4,  V, { V }, 0 },
-    { "LOGNORMDIST",            "LOGNORMDIST",          290,    290,    3,  3,  V, { V }, 0 },
-    { "LOGINV",                 "LOGINV",               291,    291,    3,  3,  V, { V }, 0 },
-    { "NEGBINOMDIST",           "NEGBINOMDIST",         292,    292,    3,  3,  V, { V }, 0 },
-    { "NORMDIST",               "NORMDIST",             293,    293,    4,  4,  V, { V }, 0 },
-    { "LEGACY.NORMSDIST",       "NORMSDIST",            294,    294,    1,  1,  V, { V }, 0 },
-    { "NORMINV",                "NORMINV",              295,    295,    3,  3,  V, { V }, 0 },
-    { "LEGACY.NORMSINV",        "NORMSINV",             296,    296,    1,  1,  V, { V }, 0 },
-    { "STANDARDIZE",            "STANDARDIZE",          297,    297,    3,  3,  V, { V }, 0 },
-    { "ODD",                    "ODD",                  298,    298,    1,  1,  V, { V }, 0 },
-    { "PERMUT",                 "PERMUT",               299,    299,    2,  2,  V, { V }, 0 },
-    { "POISSON",                "POISSON",              300,    300,    3,  3,  V, { V }, 0 },
-    { "TDIST",                  "TDIST",                301,    301,    3,  3,  V, { V }, 0 },
-    { "WEIBULL",                "WEIBULL",              302,    302,    4,  4,  V, { V }, 0 },
-    { "SUMXMY2",                "SUMXMY2",              303,    303,    2,  2,  V, { A }, 0 },
-    { "SUMX2MY2",               "SUMX2MY2",             304,    304,    2,  2,  V, { A }, 0 },
-    { "SUMX2PY2",               "SUMX2PY2",             305,    305,    2,  2,  V, { A }, 0 },
-    { "LEGACY.CHITEST",         "CHITEST",              306,    306,    2,  2,  V, { A }, 0 },
-    { "CORREL",                 "CORREL",               307,    307,    2,  2,  V, { A }, 0 },
-    { "COVAR",                  "COVAR",                308,    308,    2,  2,  V, { A }, 0 },
-    { "FORECAST",               "FORECAST",             309,    309,    3,  3,  V, { V, A }, 0 },
-    { "FTEST",                  "FTEST",                310,    310,    2,  2,  V, { A }, 0 },
-    { "INTERCEPT",              "INTERCEPT",            311,    311,    2,  2,  V, { A }, 0 },
-    { "PEARSON",                "PEARSON",              312,    312,    2,  2,  V, { A }, 0 },
-    { "RSQ",                    "RSQ",                  313,    313,    2,  2,  V, { A }, 0 },
-    { "STEYX",                  "STEYX",                314,    314,    2,  2,  V, { A }, 0 },
-    { "SLOPE",                  "SLOPE",                315,    315,    2,  2,  V, { A }, 0 },
-    { "TTEST",                  "TTEST",                316,    316,    4,  4,  V, { A, A, V }, 0 },
-    { "PROB",                   "PROB",                 317,    317,    3,  4,  V, { A, A, V }, 0 },
-    { "DEVSQ",                  "DEVSQ",                318,    318,    1,  MX, V, { R }, 0 },
-    { "GEOMEAN",                "GEOMEAN",              319,    319,    1,  MX, V, { R }, 0 },
-    { "HARMEAN",                "HARMEAN",              320,    320,    1,  MX, V, { R }, 0 },
-    { "SUMSQ",                  "SUMSQ",                321,    321,    0,  MX, V, { R }, 0 },
-    { "KURT",                   "KURT",                 322,    322,    1,  MX, V, { R }, 0 },
-    { "SKEW",                   "SKEW",                 323,    323,    1,  MX, V, { R }, 0 },
-    { "ZTEST",                  "ZTEST",                324,    324,    2,  3,  V, { R, V }, 0 },
-    { "LARGE",                  "LARGE",                325,    325,    2,  2,  V, { R, V }, 0 },
-    { "SMALL",                  "SMALL",                326,    326,    2,  2,  V, { R, V }, 0 },
-    { "QUARTILE",               "QUARTILE",             327,    327,    2,  2,  V, { R, V }, 0 },
-    { "PERCENTILE",             "PERCENTILE",           328,    328,    2,  2,  V, { R, V }, 0 },
-    { "PERCENTRANK",            "PERCENTRANK",          329,    329,    2,  3,  V, { R, V, EV, I }, 0 },
-    { "MODE",                   "MODE",                 330,    330,    1,  MX, V, { A }, 0 },
-    { "TRIMMEAN",               "TRIMMEAN",             331,    331,    2,  2,  V, { R, V }, 0 },
-    { "TINV",                   "TINV",                 332,    332,    2,  2,  V, { V }, 0 },
+    { "FIXED",                  "FIXED",                14,     14,     1,  3,  V, { VR }, 0 },       // BIFF2-3: 1-2, BIFF4: 1-3
+    { "RANK",                   "RANK",                 216,    216,    2,  3,  V, { VR, RO, VR }, 0 },
+    { "DB",                     "DB",                   247,    247,    4,  5,  V, { VR }, 0 },
+    { "FREQUENCY",              "FREQUENCY",            252,    252,    2,  2,  A, { RA }, 0 },
+    { "ORG.OPENOFFICE.ERRORTYPE","ERROR.TYPE",          261,    261,    1,  1,  V, { VR }, 0 },
+    { "AVEDEV",                 "AVEDEV",               269,    269,    1,  MX, V, { RX }, 0 },
+    { "BETADIST",               "BETADIST",             270,    270,    3,  5,  V, { VR }, 0 },
+    { "GAMMALN",                "GAMMALN",              271,    271,    1,  1,  V, { VR }, 0 },
+    { "BETAINV",                "BETAINV",              272,    272,    3,  5,  V, { VR }, 0 },
+    { "BINOMDIST",              "BINOMDIST",            273,    273,    4,  4,  V, { VR }, 0 },
+    { "LEGACY.CHIDIST",         "CHIDIST",              274,    274,    2,  2,  V, { VR }, 0 },
+    { "LEGACY.CHIINV",          "CHIINV",               275,    275,    2,  2,  V, { VR }, 0 },
+    { "COMBIN",                 "COMBIN",               276,    276,    2,  2,  V, { VR }, 0 },
+    { "CONFIDENCE",             "CONFIDENCE",           277,    277,    3,  3,  V, { VR }, 0 },
+    { "CRITBINOM",              "CRITBINOM",            278,    278,    3,  3,  V, { VR }, 0 },
+    { "EVEN",                   "EVEN",                 279,    279,    1,  1,  V, { VR }, 0 },
+    { "EXPONDIST",              "EXPONDIST",            280,    280,    3,  3,  V, { VR }, 0 },
+    { "LEGACY.FDIST",           "FDIST",                281,    281,    3,  3,  V, { VR }, 0 },
+    { "LEGACY.FINV",            "FINV",                 282,    282,    3,  3,  V, { VR }, 0 },
+    { "FISHER",                 "FISHER",               283,    283,    1,  1,  V, { VR }, 0 },
+    { "FISHERINV",              "FISHERINV",            284,    284,    1,  1,  V, { VR }, 0 },
+    { "FLOOR",                  "FLOOR",                285,    285,    2,  2,  V, { VR, VR, C }, 0 },
+    { "GAMMADIST",              "GAMMADIST",            286,    286,    4,  4,  V, { VR }, 0 },
+    { "GAMMAINV",               "GAMMAINV",             287,    287,    3,  3,  V, { VR }, 0 },
+    { "CEILING",                "CEILING",              288,    288,    2,  2,  V, { VR, VR, C }, 0 },
+    { "HYPGEOMDIST",            "HYPGEOMDIST",          289,    289,    4,  4,  V, { VR }, 0 },
+    { "LOGNORMDIST",            "LOGNORMDIST",          290,    290,    3,  3,  V, { VR }, 0 },
+    { "LOGINV",                 "LOGINV",               291,    291,    3,  3,  V, { VR }, 0 },
+    { "NEGBINOMDIST",           "NEGBINOMDIST",         292,    292,    3,  3,  V, { VR }, 0 },
+    { "NORMDIST",               "NORMDIST",             293,    293,    4,  4,  V, { VR }, 0 },
+    { "LEGACY.NORMSDIST",       "NORMSDIST",            294,    294,    1,  1,  V, { VR }, 0 },
+    { "NORMINV",                "NORMINV",              295,    295,    3,  3,  V, { VR }, 0 },
+    { "LEGACY.NORMSINV",        "NORMSINV",             296,    296,    1,  1,  V, { VR }, 0 },
+    { "STANDARDIZE",            "STANDARDIZE",          297,    297,    3,  3,  V, { VR }, 0 },
+    { "ODD",                    "ODD",                  298,    298,    1,  1,  V, { VR }, 0 },
+    { "PERMUT",                 "PERMUT",               299,    299,    2,  2,  V, { VR }, 0 },
+    { "POISSON",                "POISSON",              300,    300,    3,  3,  V, { VR }, 0 },
+    { "TDIST",                  "TDIST",                301,    301,    3,  3,  V, { VR }, 0 },
+    { "WEIBULL",                "WEIBULL",              302,    302,    4,  4,  V, { VR }, 0 },
+    { "SUMXMY2",                "SUMXMY2",              303,    303,    2,  2,  V, { VA }, 0 },
+    { "SUMX2MY2",               "SUMX2MY2",             304,    304,    2,  2,  V, { VA }, 0 },
+    { "SUMX2PY2",               "SUMX2PY2",             305,    305,    2,  2,  V, { VA }, 0 },
+    { "LEGACY.CHITEST",         "CHITEST",              306,    306,    2,  2,  V, { VA }, 0 },
+    { "CORREL",                 "CORREL",               307,    307,    2,  2,  V, { VA }, 0 },
+    { "COVAR",                  "COVAR",                308,    308,    2,  2,  V, { VA }, 0 },
+    { "FORECAST",               "FORECAST",             309,    309,    3,  3,  V, { VR, VA }, 0 },
+    { "FTEST",                  "FTEST",                310,    310,    2,  2,  V, { VA }, 0 },
+    { "INTERCEPT",              "INTERCEPT",            311,    311,    2,  2,  V, { VA }, 0 },
+    { "PEARSON",                "PEARSON",              312,    312,    2,  2,  V, { VA }, 0 },
+    { "RSQ",                    "RSQ",                  313,    313,    2,  2,  V, { VA }, 0 },
+    { "STEYX",                  "STEYX",                314,    314,    2,  2,  V, { VA }, 0 },
+    { "SLOPE",                  "SLOPE",                315,    315,    2,  2,  V, { VA }, 0 },
+    { "TTEST",                  "TTEST",                316,    316,    4,  4,  V, { VA, VA, VR }, 0 },
+    { "PROB",                   "PROB",                 317,    317,    3,  4,  V, { VA, VA, VR }, 0 },
+    { "DEVSQ",                  "DEVSQ",                318,    318,    1,  MX, V, { RX }, 0 },
+    { "GEOMEAN",                "GEOMEAN",              319,    319,    1,  MX, V, { RX }, 0 },
+    { "HARMEAN",                "HARMEAN",              320,    320,    1,  MX, V, { RX }, 0 },
+    { "SUMSQ",                  "SUMSQ",                321,    321,    0,  MX, V, { RX }, 0 },
+    { "KURT",                   "KURT",                 322,    322,    1,  MX, V, { RX }, 0 },
+    { "SKEW",                   "SKEW",                 323,    323,    1,  MX, V, { RX }, 0 },
+    { "ZTEST",                  "ZTEST",                324,    324,    2,  3,  V, { RX, VR }, 0 },
+    { "LARGE",                  "LARGE",                325,    325,    2,  2,  V, { RX, VR }, 0 },
+    { "SMALL",                  "SMALL",                326,    326,    2,  2,  V, { RX, VR }, 0 },
+    { "QUARTILE",               "QUARTILE",             327,    327,    2,  2,  V, { RX, VR }, 0 },
+    { "PERCENTILE",             "PERCENTILE",           328,    328,    2,  2,  V, { RX, VR }, 0 },
+    { "PERCENTRANK",            "PERCENTRANK",          329,    329,    2,  3,  V, { RX, VR, VR_E }, 0 },
+    { "MODE",                   "MODE",                 330,    330,    1,  MX, V, { VA }, 0 },
+    { "TRIMMEAN",               "TRIMMEAN",             331,    331,    2,  2,  V, { RX, VR }, 0 },
+    { "TINV",                   "TINV",                 332,    332,    2,  2,  V, { VR }, 0 },
 
     // *** Analysis add-in ***
 
-    { "HEX2BIN",                "HEX2BIN",              384,    NOID,   1,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "HEX2DEC",                "HEX2DEC",              385,    NOID,   1,  1,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "HEX2OCT",                "HEX2OCT",              386,    NOID,   1,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "DEC2BIN",                "DEC2BIN",              387,    NOID,   1,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "DEC2HEX",                "DEC2HEX",              388,    NOID,   1,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "DEC2OCT",                "DEC2OCT",              389,    NOID,   1,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "OCT2BIN",                "OCT2BIN",              390,    NOID,   1,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "OCT2HEX",                "OCT2HEX",              391,    NOID,   1,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "OCT2DEC",                "OCT2DEC",              392,    NOID,   1,  1,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "BIN2DEC",                "BIN2DEC",              393,    NOID,   1,  1,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "BIN2OCT",                "BIN2OCT",              394,    NOID,   1,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "BIN2HEX",                "BIN2HEX",              395,    NOID,   1,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "IMSUB",                  "IMSUB",                396,    NOID,   2,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "IMDIV",                  "IMDIV",                397,    NOID,   2,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "IMPOWER",                "IMPOWER",              398,    NOID,   2,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "IMABS",                  "IMABS",                399,    NOID,   1,  1,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "IMSQRT",                 "IMSQRT",               400,    NOID,   1,  1,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "IMLN",                   "IMLN",                 401,    NOID,   1,  1,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "IMLOG2",                 "IMLOG2",               402,    NOID,   1,  1,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "IMLOG10",                "IMLOG10",              403,    NOID,   1,  1,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "IMSIN",                  "IMSIN",                404,    NOID,   1,  1,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "IMCOS",                  "IMCOS",                405,    NOID,   1,  1,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "IMEXP",                  "IMEXP",                406,    NOID,   1,  1,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "IMARGUMENT",             "IMARGUMENT",           407,    NOID,   1,  1,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "IMCONJUGATE",            "IMCONJUGATE",          408,    NOID,   1,  1,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "IMAGINARY",              "IMAGINARY",            409,    NOID,   1,  1,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "IMREAL",                 "IMREAL",               410,    NOID,   1,  1,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "COMPLEX",                "COMPLEX",              411,    NOID,   2,  3,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "IMSUM",                  "IMSUM",                412,    NOID,   1,  MX, V, { R }, FUNCFLAG_EXTERNAL },
-    { "IMPRODUCT",              "IMPRODUCT",            413,    NOID,   1,  MX, V, { R }, FUNCFLAG_EXTERNAL },
-    { "SERIESSUM",              "SERIESSUM",            414,    NOID,   4,  4,  V, { V, V, V, R }, FUNCFLAG_EXTERNAL },
-    { "FACTDOUBLE",             "FACTDOUBLE",           415,    NOID,   1,  1,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "SQRTPI",                 "SQRTPI",               416,    NOID,   1,  1,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "QUOTIENT",               "QUOTIENT",             417,    NOID,   2,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "DELTA",                  "DELTA",                418,    NOID,   1,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "GESTEP",                 "GESTEP",               419,    NOID,   1,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "ISEVEN",                 "ISEVEN",               420,    NOID,   1,  1,  V, { V }, FUNCFLAG_EXTERNAL },       // Calc: builtin and add-in
-    { "ISODD",                  "ISODD",                421,    NOID,   1,  1,  V, { V }, FUNCFLAG_EXTERNAL },       // Calc: builtin and add-in
-    { "MROUND",                 "MROUND",               422,    NOID,   2,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "ERF",                    "ERF",                  423,    NOID,   1,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "ERFC",                   "ERFC",                 424,    NOID,   1,  1,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "BESSELJ",                "BESSELJ",              425,    NOID,   2,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "BESSELK",                "BESSELK",              426,    NOID,   2,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "BESSELY",                "BESSELY",              427,    NOID,   2,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "BESSELI",                "BESSELI",              428,    NOID,   2,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "XIRR",                   "XIRR",                 429,    NOID,   2,  3,  V, { A, R, V }, FUNCFLAG_EXTERNAL },
-    { "XNPV",                   "XNPV",                 430,    NOID,   3,  3,  V, { V, A, R }, FUNCFLAG_EXTERNAL },
-    { "PRICEMAT",               "PRICEMAT",             431,    NOID,   5,  6,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "YIELDMAT",               "YIELDMAT",             432,    NOID,   5,  6,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "INTRATE",                "INTRATE",              433,    NOID,   4,  5,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "RECEIVED",               "RECEIVED",             434,    NOID,   4,  5,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "DISC",                   "DISC",                 435,    NOID,   4,  5,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "PRICEDISC",              "PRICEDISC",            436,    NOID,   4,  5,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "YIELDDISC",              "YIELDDISC",            437,    NOID,   4,  5,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "TBILLEQ",                "TBILLEQ",              438,    NOID,   3,  3,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "TBILLPRICE",             "TBILLPRICE",           439,    NOID,   3,  3,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "TBILLYIELD",             "TBILLYIELD",           440,    NOID,   3,  3,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "PRICE",                  "PRICE",                441,    NOID,   6,  7,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "YIELD",                  "YIELD",                442,    NOID,   6,  7,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "DOLLARDE",               "DOLLARDE",             443,    NOID,   2,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "DOLLARFR",               "DOLLARFR",             444,    NOID,   2,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "NOMINAL",                "NOMINAL",              445,    NOID,   2,  2,  V, { V }, FUNCFLAG_EXTERNAL },       // Calc: builtin and add-in
-    { "EFFECT",                 "EFFECT",               446,    NOID,   2,  2,  V, { V }, FUNCFLAG_EXTERNAL },       // Calc: builtin and add-in
-    { "CUMPRINC",               "CUMPRINC",             447,    NOID,   6,  6,  V, { V }, FUNCFLAG_EXTERNAL },       // Calc: builtin and add-in
-    { "CUMIPMT",                "CUMIPMT",              448,    NOID,   6,  6,  V, { V }, FUNCFLAG_EXTERNAL },       // Calc: builtin and add-in
-    { "EDATE",                  "EDATE",                449,    NOID,   2,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "EOMONTH",                "EOMONTH",              450,    NOID,   2,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "YEARFRAC",               "YEARFRAC",             451,    NOID,   2,  3,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "COUPDAYBS",              "COUPDAYBS",            452,    NOID,   3,  4,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "COUPDAYS",               "COUPDAYS",             453,    NOID,   3,  4,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "COUPDAYSNC",             "COUPDAYSNC",           454,    NOID,   3,  4,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "COUPNCD",                "COUPNCD",              455,    NOID,   3,  4,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "COUPNUM",                "COUPNUM",              456,    NOID,   3,  4,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "COUPPCD",                "COUPPCD",              457,    NOID,   3,  4,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "DURATION",               "DURATION",             458,    NOID,   5,  6,  V, { V }, FUNCFLAG_EXTERNAL },       // Calc: builtin and add-in
-    { "MDURATION",              "MDURATION",            459,    NOID,   5,  6,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "ODDLPRICE",              "ODDLPRICE",            460,    NOID,   7,  8,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "ODDLYIELD",              "ODDLYIELD",            461,    NOID,   8,  9,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "ODDFPRICE",              "ODDFPRICE",            462,    NOID,   8,  9,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "ODDFYIELD",              "ODDFYIELD",            463,    NOID,   8,  9,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "RANDBETWEEN",            "RANDBETWEEN",          464,    NOID,   2,  2,  V, {}, FUNCFLAG_VOLATILE | FUNCFLAG_EXTERNAL },
-    { "WEEKNUM",                "WEEKNUM",              465,    NOID,   1,  2,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "AMORDEGRC",              "AMORDEGRC",            466,    NOID,   6,  7,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "AMORLINC",               "AMORLINC",             467,    NOID,   6,  7,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "CONVERT",                "CONVERT",              468,    NOID,   3,  3,  V, { V }, FUNCFLAG_EXTERNAL },       // Calc: builtin and add-in
-    { "ACCRINT",                "ACCRINT",              469,    NOID,   6,  7,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "ACCRINTM",               "ACCRINTM",             470,    NOID,   4,  5,  V, { V }, FUNCFLAG_EXTERNAL },
-    { "WORKDAY",                "WORKDAY",              471,    NOID,   2,  3,  V, { V, V, A, C, I }, FUNCFLAG_EXTERNAL },
-    { "NETWORKDAYS",            "NETWORKDAYS",          472,    NOID,   2,  3,  V, { V, V, A, C, I }, FUNCFLAG_EXTERNAL },
-    { "GCD",                    "GCD",                  473,    NOID,   1,  MX, V, { R }, FUNCFLAG_EXTERNAL },       // Calc: builtin and add-in
-    { "MULTINOMIAL",            "MULTINOMIAL",          474,    NOID,   1,  MX, V, { R }, FUNCFLAG_EXTERNAL },
-    { "LCM",                    "LCM",                  475,    NOID,   1,  MX, V, { R }, FUNCFLAG_EXTERNAL },       // Calc: builtin and add-in
-    { "FVSCHEDULE",             "FVSCHEDULE",           476,    NOID,   2,  2,  V, { V, A }, FUNCFLAG_EXTERNAL },
+    { "HEX2BIN",                "HEX2BIN",              384,    NOID,   1,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "HEX2DEC",                "HEX2DEC",              385,    NOID,   1,  1,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "HEX2OCT",                "HEX2OCT",              386,    NOID,   1,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "DEC2BIN",                "DEC2BIN",              387,    NOID,   1,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "DEC2HEX",                "DEC2HEX",              388,    NOID,   1,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "DEC2OCT",                "DEC2OCT",              389,    NOID,   1,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "OCT2BIN",                "OCT2BIN",              390,    NOID,   1,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "OCT2HEX",                "OCT2HEX",              391,    NOID,   1,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "OCT2DEC",                "OCT2DEC",              392,    NOID,   1,  1,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "BIN2DEC",                "BIN2DEC",              393,    NOID,   1,  1,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "BIN2OCT",                "BIN2OCT",              394,    NOID,   1,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "BIN2HEX",                "BIN2HEX",              395,    NOID,   1,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "IMSUB",                  "IMSUB",                396,    NOID,   2,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "IMDIV",                  "IMDIV",                397,    NOID,   2,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "IMPOWER",                "IMPOWER",              398,    NOID,   2,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "IMABS",                  "IMABS",                399,    NOID,   1,  1,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "IMSQRT",                 "IMSQRT",               400,    NOID,   1,  1,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "IMLN",                   "IMLN",                 401,    NOID,   1,  1,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "IMLOG2",                 "IMLOG2",               402,    NOID,   1,  1,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "IMLOG10",                "IMLOG10",              403,    NOID,   1,  1,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "IMSIN",                  "IMSIN",                404,    NOID,   1,  1,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "IMCOS",                  "IMCOS",                405,    NOID,   1,  1,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "IMEXP",                  "IMEXP",                406,    NOID,   1,  1,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "IMARGUMENT",             "IMARGUMENT",           407,    NOID,   1,  1,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "IMCONJUGATE",            "IMCONJUGATE",          408,    NOID,   1,  1,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "IMAGINARY",              "IMAGINARY",            409,    NOID,   1,  1,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "IMREAL",                 "IMREAL",               410,    NOID,   1,  1,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "COMPLEX",                "COMPLEX",              411,    NOID,   2,  3,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "IMSUM",                  "IMSUM",                412,    NOID,   1,  MX, V, { RX }, FUNCFLAG_EXTERNAL },
+    { "IMPRODUCT",              "IMPRODUCT",            413,    NOID,   1,  MX, V, { RX }, FUNCFLAG_EXTERNAL },
+    { "SERIESSUM",              "SERIESSUM",            414,    NOID,   4,  4,  V, { RR, RR, RR, RX }, FUNCFLAG_EXTERNAL },
+    { "FACTDOUBLE",             "FACTDOUBLE",           415,    NOID,   1,  1,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "SQRTPI",                 "SQRTPI",               416,    NOID,   1,  1,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "QUOTIENT",               "QUOTIENT",             417,    NOID,   2,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "DELTA",                  "DELTA",                418,    NOID,   1,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "GESTEP",                 "GESTEP",               419,    NOID,   1,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "ISEVEN",                 "ISEVEN",               420,    NOID,   1,  1,  V, { RR }, FUNCFLAG_EXTERNAL },       // Calc: builtin and add-in
+    { "ISODD",                  "ISODD",                421,    NOID,   1,  1,  V, { RR }, FUNCFLAG_EXTERNAL },       // Calc: builtin and add-in
+    { "MROUND",                 "MROUND",               422,    NOID,   2,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "ERF",                    "ERF",                  423,    NOID,   1,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "ERFC",                   "ERFC",                 424,    NOID,   1,  1,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "BESSELJ",                "BESSELJ",              425,    NOID,   2,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "BESSELK",                "BESSELK",              426,    NOID,   2,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "BESSELY",                "BESSELY",              427,    NOID,   2,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "BESSELI",                "BESSELI",              428,    NOID,   2,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "XIRR",                   "XIRR",                 429,    NOID,   2,  3,  V, { RX, RX, RR }, FUNCFLAG_EXTERNAL },
+    { "XNPV",                   "XNPV",                 430,    NOID,   3,  3,  V, { RR, RX, RX }, FUNCFLAG_EXTERNAL },
+    { "PRICEMAT",               "PRICEMAT",             431,    NOID,   5,  6,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "YIELDMAT",               "YIELDMAT",             432,    NOID,   5,  6,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "INTRATE",                "INTRATE",              433,    NOID,   4,  5,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "RECEIVED",               "RECEIVED",             434,    NOID,   4,  5,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "DISC",                   "DISC",                 435,    NOID,   4,  5,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "PRICEDISC",              "PRICEDISC",            436,    NOID,   4,  5,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "YIELDDISC",              "YIELDDISC",            437,    NOID,   4,  5,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "TBILLEQ",                "TBILLEQ",              438,    NOID,   3,  3,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "TBILLPRICE",             "TBILLPRICE",           439,    NOID,   3,  3,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "TBILLYIELD",             "TBILLYIELD",           440,    NOID,   3,  3,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "PRICE",                  "PRICE",                441,    NOID,   6,  7,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "YIELD",                  "YIELD",                442,    NOID,   6,  7,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "DOLLARDE",               "DOLLARDE",             443,    NOID,   2,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "DOLLARFR",               "DOLLARFR",             444,    NOID,   2,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "NOMINAL",                "NOMINAL",              445,    NOID,   2,  2,  V, { RR }, FUNCFLAG_EXTERNAL },       // Calc: builtin and add-in
+    { "EFFECT",                 "EFFECT",               446,    NOID,   2,  2,  V, { RR }, FUNCFLAG_EXTERNAL },       // Calc: builtin and add-in
+    { "CUMPRINC",               "CUMPRINC",             447,    NOID,   6,  6,  V, { RR }, FUNCFLAG_EXTERNAL },       // Calc: builtin and add-in
+    { "CUMIPMT",                "CUMIPMT",              448,    NOID,   6,  6,  V, { RR }, FUNCFLAG_EXTERNAL },       // Calc: builtin and add-in
+    { "EDATE",                  "EDATE",                449,    NOID,   2,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "EOMONTH",                "EOMONTH",              450,    NOID,   2,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "YEARFRAC",               "YEARFRAC",             451,    NOID,   2,  3,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "COUPDAYBS",              "COUPDAYBS",            452,    NOID,   3,  4,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "COUPDAYS",               "COUPDAYS",             453,    NOID,   3,  4,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "COUPDAYSNC",             "COUPDAYSNC",           454,    NOID,   3,  4,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "COUPNCD",                "COUPNCD",              455,    NOID,   3,  4,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "COUPNUM",                "COUPNUM",              456,    NOID,   3,  4,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "COUPPCD",                "COUPPCD",              457,    NOID,   3,  4,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "DURATION",               "DURATION",             458,    NOID,   5,  6,  V, { RR }, FUNCFLAG_EXTERNAL },       // Calc: builtin and add-in
+    { "MDURATION",              "MDURATION",            459,    NOID,   5,  6,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "ODDLPRICE",              "ODDLPRICE",            460,    NOID,   7,  8,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "ODDLYIELD",              "ODDLYIELD",            461,    NOID,   8,  9,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "ODDFPRICE",              "ODDFPRICE",            462,    NOID,   8,  9,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "ODDFYIELD",              "ODDFYIELD",            463,    NOID,   8,  9,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "RANDBETWEEN",            "RANDBETWEEN",          464,    NOID,   2,  2,  V, { RR }, FUNCFLAG_VOLATILE | FUNCFLAG_EXTERNAL },
+    { "WEEKNUM",                "WEEKNUM",              465,    NOID,   1,  2,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "AMORDEGRC",              "AMORDEGRC",            466,    NOID,   6,  7,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "AMORLINC",               "AMORLINC",             467,    NOID,   6,  7,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "CONVERT",                "CONVERT",              468,    NOID,   3,  3,  V, { RR }, FUNCFLAG_EXTERNAL },       // Calc: builtin and add-in
+    { "ACCRINT",                "ACCRINT",              469,    NOID,   6,  7,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "ACCRINTM",               "ACCRINTM",             470,    NOID,   4,  5,  V, { RR }, FUNCFLAG_EXTERNAL },
+    { "WORKDAY",                "WORKDAY",              471,    NOID,   2,  3,  V, { RR, RR, RX, C }, FUNCFLAG_EXTERNAL },
+    { "NETWORKDAYS",            "NETWORKDAYS",          472,    NOID,   2,  3,  V, { RR, RR, RX, C }, FUNCFLAG_EXTERNAL },
+    { "GCD",                    "GCD",                  473,    NOID,   1,  MX, V, { RX }, FUNCFLAG_EXTERNAL },       // Calc: builtin and add-in
+    { "MULTINOMIAL",            "MULTINOMIAL",          474,    NOID,   1,  MX, V, { RX }, FUNCFLAG_EXTERNAL },
+    { "LCM",                    "LCM",                  475,    NOID,   1,  MX, V, { RX }, FUNCFLAG_EXTERNAL },       // Calc: builtin and add-in
+    { "FVSCHEDULE",             "FVSCHEDULE",           476,    NOID,   2,  2,  V, { RR, RX }, FUNCFLAG_EXTERNAL },
 
     // *** macro sheet commands ***
 
-    { 0,                        "ACTIVATE.NEXT",        104,    104,    0,  1,  V, { V }, FUNCFLAG_MACROCMD },      // BIFF2-3: 0, BIFF4: 0-1
-    { 0,                        "ACTIVATE.PREV",        105,    105,    0,  1,  V, { V }, FUNCFLAG_MACROCMD }       // BIFF2-3: 0, BIFF4: 0-1
+    { 0,                        "ACTIVATE.NEXT",        104,    104,    0,  1,  V, { VR }, FUNCFLAG_MACROCMD },      // BIFF2-3: 0, BIFF4: 0-1
+    { 0,                        "ACTIVATE.PREV",        105,    105,    0,  1,  V, { VR }, FUNCFLAG_MACROCMD }       // BIFF2-3: 0, BIFF4: 0-1
 };
 
 /** Functions new in BIFF5/BIFF7. */
 static const FunctionData saFuncTableBiff5[] =
 {
-    { "WEEKDAY",                "WEEKDAY",              70,     70,     1,  2,  V, { V }, 0 },                              // BIFF2-4: 1,   BIFF5: 1-2
-    { "HLOOKUP",                "HLOOKUP",              101,    101,    3,  4,  V, { V, R, R, V }, 0 },                     // BIFF2-4: 3,   BIFF5: 3-4
-    { "VLOOKUP",                "VLOOKUP",              102,    102,    3,  4,  V, { V, R, R, V }, 0 },                     // BIFF2-4: 3,   BIFF5: 3-4
-    { 0,                        "ADD.MENU",             152,    152,    2,  4,  V, { V, R, R, V }, FUNCFLAG_MACROFUNC },    // BIFF3-4: 2-3, BIFF5: 2-4
-    { 0,                        "ADD.COMMAND",          153,    153,    3,  5,  V, { V, R, R, R, V }, FUNCFLAG_MACROFUNC }, // BIFF3-4: 3-4, BIFF5: 3-5
-    { "DAYS360",                "DAYS360",              220,    220,    2,  3,  V, { V }, 0 },                              // BIFF3-4: 2,   BIFF5: 2-3
-    { 0,                        "EXTERN.CALL",          255,    255,    1,  MX, R, { ER, R }, FUNCFLAG_EXPORTONLY },        // MACRO or EXTERNAL
-    { "CONCATENATE",            "CONCATENATE",          336,    336,    0,  MX, V, { V }, 0 },
-    { "POWER",                  "POWER",                337,    337,    2,  2,  V, { V }, 0 },
-    { "RADIANS",                "RADIANS",              342,    342,    1,  1,  V, { V }, 0 },
-    { "DEGREES",                "DEGREES",              343,    343,    1,  1,  V, { V }, 0 },
-    { "SUBTOTAL",               "SUBTOTAL",             344,    344,    2,  MX, V, { V, R }, 0 },
-    { "SUMIF",                  "SUMIF",                345,    345,    2,  3,  V, { R, V, R }, 0 },
-    { "COUNTIF",                "COUNTIF",              346,    346,    2,  2,  V, { R, V }, 0 },
-    { "COUNTBLANK",             "COUNTBLANK",           347,    347,    1,  1,  V, { R }, 0 },
-    { "ISPMT",                  "ISPMT",                350,    350,    4,  4,  V, { V }, 0 },
-    { 0,                        "DATEDIF",              351,    351,    3,  3,  V, { V }, FUNCFLAG_IMPORTONLY },   // not supported in Calc
-    { 0,                        "DATESTRING",           352,    352,    1,  1,  V, { V }, FUNCFLAG_IMPORTONLY },   // not supported in Calc, missing in OOX spec
-    { 0,                        "NUMBERSTRING",         353,    353,    2,  2,  V, { V }, FUNCFLAG_IMPORTONLY },   // not supported in Calc, missing in OOX spec
-    { "ROMAN",                  "ROMAN",                354,    354,    1,  2,  V, { V }, 0 },
+    { "WEEKDAY",                "WEEKDAY",              70,     70,     1,  2,  V, { VR }, 0 },                              // BIFF2-4: 1,   BIFF5: 1-2
+    { "HLOOKUP",                "HLOOKUP",              101,    101,    3,  4,  V, { VV, RO, RO, VV }, 0 },                     // BIFF2-4: 3,   BIFF5: 3-4
+    { "VLOOKUP",                "VLOOKUP",              102,    102,    3,  4,  V, { VV, RO, RO, VV }, 0 },                     // BIFF2-4: 3,   BIFF5: 3-4
+    { 0,                        "ADD.MENU",             152,    152,    2,  4,  V, { VR, RO, RO, VR }, FUNCFLAG_MACROFUNC },    // BIFF3-4: 2-3, BIFF5: 2-4
+    { 0,                        "ADD.COMMAND",          153,    153,    3,  5,  V, { VR, RO, RO, RO, VR }, FUNCFLAG_MACROFUNC }, // BIFF3-4: 3-4, BIFF5: 3-5
+    { "DAYS360",                "DAYS360",              220,    220,    2,  3,  V, { VR }, 0 },                              // BIFF3-4: 2,   BIFF5: 2-3
+    { 0,                        "EXTERN.CALL",          255,    255,    1,  MX, R, { RO_E, RO }, FUNCFLAG_EXPORTONLY },        // MACRO or EXTERNAL
+    { "CONCATENATE",            "CONCATENATE",          336,    336,    0,  MX, V, { VR }, 0 },
+    { "POWER",                  "POWER",                337,    337,    2,  2,  V, { VR }, 0 },
+    { "RADIANS",                "RADIANS",              342,    342,    1,  1,  V, { VR }, 0 },
+    { "DEGREES",                "DEGREES",              343,    343,    1,  1,  V, { VR }, 0 },
+    { "SUBTOTAL",               "SUBTOTAL",             344,    344,    2,  MX, V, { VR, RO }, 0 },
+    { "SUMIF",                  "SUMIF",                345,    345,    2,  3,  V, { RO, VR, RO }, 0 },
+    { "COUNTIF",                "COUNTIF",              346,    346,    2,  2,  V, { RO, VR }, 0 },
+    { "COUNTBLANK",             "COUNTBLANK",           347,    347,    1,  1,  V, { RO }, 0 },
+    { "ISPMT",                  "ISPMT",                350,    350,    4,  4,  V, { VR }, 0 },
+    { 0,                        "DATEDIF",              351,    351,    3,  3,  V, { VR }, FUNCFLAG_IMPORTONLY },   // not supported in Calc
+    { 0,                        "DATESTRING",           352,    352,    1,  1,  V, { VR }, FUNCFLAG_IMPORTONLY },   // not supported in Calc, missing in OOX spec
+    { 0,                        "NUMBERSTRING",         353,    353,    2,  2,  V, { VR }, FUNCFLAG_IMPORTONLY },   // not supported in Calc, missing in OOX spec
+    { "ROMAN",                  "ROMAN",                354,    354,    1,  2,  V, { VR }, 0 },
 
     // *** EuroTool add-in ***
 
-    { "EUROCONVERT",            "EUROCONVERT",          NOID,   NOID,   3,  5,  V, { V }, FUNCFLAG_EUROTOOL },
+    { "EUROCONVERT",            "EUROCONVERT",          NOID,   NOID,   3,  5,  V, { VR }, FUNCFLAG_EUROTOOL },
 
     // *** macro sheet commands ***
 
-    { 0,                        "ADD.CHART.AUTOFORMAT", 390,    390,    0,  2,  V, { V }, FUNCFLAG_MACROCMD },
-    { 0,                        "ADD.LIST.ITEM",        451,    451,    0,  2,  V, { V }, FUNCFLAG_MACROCMD },
-    { 0,                        "ACTIVE.CELL.FONT",     476,    476,    0,  14, V, { V }, FUNCFLAG_MACROCMD }
+    { 0,                        "ADD.CHART.AUTOFORMAT", 390,    390,    0,  2,  V, { VR }, FUNCFLAG_MACROCMD },
+    { 0,                        "ADD.LIST.ITEM",        451,    451,    0,  2,  V, { VR }, FUNCFLAG_MACROCMD },
+    { 0,                        "ACTIVE.CELL.FONT",     476,    476,    0,  14, V, { VR }, FUNCFLAG_MACROCMD }
 };
 
 /** Functions new in BIFF8. */
 static const FunctionData saFuncTableBiff8[] =
 {
-    { "GETPIVOTDATA",           "GETPIVOTDATA",         358,    358,    2,  MX, V, { V, R, V }, FUNCFLAG_IMPORTONLY },
-    { "HYPERLINK",              "HYPERLINK",            359,    359,    1,  2,  V, { V }, 0 },
-    { 0,                        "PHONETIC",             360,    360,    1,  1,  V, { R }, FUNCFLAG_IMPORTONLY },
-    { "AVERAGEA",               "AVERAGEA",             361,    361,    1,  MX, V, { R }, 0 },
-    { "MAXA",                   "MAXA",                 362,    362,    1,  MX, V, { R }, 0 },
-    { "MINA",                   "MINA",                 363,    363,    1,  MX, V, { R }, 0 },
-    { "STDEVPA",                "STDEVPA",              364,    364,    1,  MX, V, { R }, 0 },
-    { "VARPA",                  "VARPA",                365,    365,    1,  MX, V, { R }, 0 },
-    { "STDEVA",                 "STDEVA",               366,    366,    1,  MX, V, { R }, 0 },
-    { "VARA",                   "VARA",                 367,    367,    1,  MX, V, { R }, 0 },
-    { "COM.MICROSOFT.BAHTTEXT", "BAHTTEXT",             368,    368,    1,  1,  V, { V }, FUNCFLAG_MACROCALL },
-    { 0,                        "THAIDAYOFWEEK",        369,    369,    1,  1,  V, { V }, FUNCFLAG_MACROCALL },
-    { 0,                        "THAIDIGIT",            370,    370,    1,  1,  V, { V }, FUNCFLAG_MACROCALL },
-    { 0,                        "THAIMONTHOFYEAR",      371,    371,    1,  1,  V, { V }, FUNCFLAG_MACROCALL },
-    { 0,                        "THAINUMSOUND",         372,    372,    1,  1,  V, { V }, FUNCFLAG_MACROCALL },
-    { 0,                        "THAINUMSTRING",        373,    373,    1,  1,  V, { V }, FUNCFLAG_MACROCALL },
-    { 0,                        "THAISTRINGLENGTH",     374,    374,    1,  1,  V, { V }, FUNCFLAG_MACROCALL },
-    { 0,                        "ISTHAIDIGIT",          375,    375,    1,  1,  V, { V }, FUNCFLAG_MACROCALL },
-    { 0,                        "ROUNDBAHTDOWN",        376,    376,    1,  1,  V, { V }, FUNCFLAG_MACROCALL },
-    { 0,                        "ROUNDBAHTUP",          377,    377,    1,  1,  V, { V }, FUNCFLAG_MACROCALL },
-    { 0,                        "THAIYEAR",             378,    378,    1,  1,  V, { V }, FUNCFLAG_MACROCALL },
-    { 0,                        "RTD",                  379,    379,    3,  3,  A, { V, V, R }, 0 }
+    { "GETPIVOTDATA",           "GETPIVOTDATA",         358,    358,    2,  MX, V, { RR, RR, VR, VR }, FUNCFLAG_IMPORTONLY | FUNCFLAG_PARAMPAIRS },
+    { "HYPERLINK",              "HYPERLINK",            359,    359,    1,  2,  V, { VV, VO }, 0 },
+    { 0,                        "PHONETIC",             360,    360,    1,  1,  V, { RO }, FUNCFLAG_IMPORTONLY },
+    { "AVERAGEA",               "AVERAGEA",             361,    361,    1,  MX, V, { RX }, 0 },
+    { "MAXA",                   "MAXA",                 362,    362,    1,  MX, V, { RX }, 0 },
+    { "MINA",                   "MINA",                 363,    363,    1,  MX, V, { RX }, 0 },
+    { "STDEVPA",                "STDEVPA",              364,    364,    1,  MX, V, { RX }, 0 },
+    { "VARPA",                  "VARPA",                365,    365,    1,  MX, V, { RX }, 0 },
+    { "STDEVA",                 "STDEVA",               366,    366,    1,  MX, V, { RX }, 0 },
+    { "VARA",                   "VARA",                 367,    367,    1,  MX, V, { RX }, 0 },
+    { "COM.MICROSOFT.BAHTTEXT", "BAHTTEXT",             368,    368,    1,  1,  V, { VR }, FUNCFLAG_MACROCALL },
+    { 0,                        "THAIDAYOFWEEK",        369,    369,    1,  1,  V, { VR }, FUNCFLAG_MACROCALL },
+    { 0,                        "THAIDIGIT",            370,    370,    1,  1,  V, { VR }, FUNCFLAG_MACROCALL },
+    { 0,                        "THAIMONTHOFYEAR",      371,    371,    1,  1,  V, { VR }, FUNCFLAG_MACROCALL },
+    { 0,                        "THAINUMSOUND",         372,    372,    1,  1,  V, { VR }, FUNCFLAG_MACROCALL },
+    { 0,                        "THAINUMSTRING",        373,    373,    1,  1,  V, { VR }, FUNCFLAG_MACROCALL },
+    { 0,                        "THAISTRINGLENGTH",     374,    374,    1,  1,  V, { VR }, FUNCFLAG_MACROCALL },
+    { 0,                        "ISTHAIDIGIT",          375,    375,    1,  1,  V, { VR }, FUNCFLAG_MACROCALL },
+    { 0,                        "ROUNDBAHTDOWN",        376,    376,    1,  1,  V, { VR }, FUNCFLAG_MACROCALL },
+    { 0,                        "ROUNDBAHTUP",          377,    377,    1,  1,  V, { VR }, FUNCFLAG_MACROCALL },
+    { 0,                        "THAIYEAR",             378,    378,    1,  1,  V, { VR }, FUNCFLAG_MACROCALL },
+    { 0,                        "RTD",                  379,    379,    3,  3,  A, { VR, VR, RO }, 0 }
 };
 
 /** Functions new in OOX. */
 static const FunctionData saFuncTableOox[] =
 {
-    { 0,                        "IFERROR",              480,    NOID,   2,  2,  V, { V, R }, 0 },
-    { 0,                        "COUNTIFS",             481,    NOID,   3,  MX, V, { R, V }, 0 },
-    { 0,                        "SUMIFS",               482,    NOID,   3,  MX, V, { R, V }, 0 },
-    { 0,                        "AVERAGEIF",            483,    NOID,   2,  3,  V, { R, V, R }, 0 },
-    { 0,                        "AVERAGEIFS",           484,    NOID,   3,  MX, V, { R, V }, 0 },
-    { 0,                        "CUBEKPIMEMBER",        NOID,   NOID,   3,  4,  V, { V }, 0 },
-    { 0,                        "CUBEMEMBER",           NOID,   NOID,   2,  3,  V, { V, A, V }, 0 },
-    { 0,                        "CUBEMEMBERPROPERTY",   NOID,   NOID,   3,  3,  V, { V }, 0 },
-    { 0,                        "CUBERANKEDMEMBER",     NOID,   NOID,   3,  4,  V, { V }, 0 },
-    { 0,                        "CUBESET",              NOID,   NOID,   2,  5,  V, { V, R, V }, 0 },
-    { 0,                        "CUBESETCOUNT",         NOID,   NOID,   1,  1,  V, { V }, 0 },
-    { 0,                        "CUBEVALUE",            NOID,   NOID,   2,  2,  V, { V, R }, 0 }
+    { 0,                        "CUBEVALUE",            380,    NOID,   1,  MX, V, { VR, RX }, 0 },
+    { 0,                        "CUBEMEMBER",           381,    NOID,   2,  3,  V, { VR, RX, VR }, 0 },
+    { 0,                        "CUBEMEMBERPROPERTY",   382,    NOID,   3,  3,  V, { VR }, 0 },
+    { 0,                        "CUBERANKEDMEMBER",     383,    NOID,   3,  4,  V, { VR }, 0 },
+    { 0,                        "CUBEKPIMEMBER",        477,    NOID,   3,  4,  V, { VR }, 0 },
+    { 0,                        "CUBESET",              478,    NOID,   2,  5,  V, { VR, RX, VR }, 0 },
+    { 0,                        "CUBESETCOUNT",         479,    NOID,   1,  1,  V, { VR }, 0 },
+    { 0,                        "IFERROR",              480,    NOID,   2,  2,  V, { VO, RO }, 0 },
+    { 0,                        "COUNTIFS",             481,    NOID,   2,  MX, V, { RO, VR }, FUNCFLAG_PARAMPAIRS },
+    { 0,                        "SUMIFS",               482,    NOID,   3,  MX, V, { RO, RO, VR }, FUNCFLAG_PARAMPAIRS },
+    { 0,                        "AVERAGEIF",            483,    NOID,   2,  3,  V, { RO, VR, RO }, 0 },
+    { 0,                        "AVERAGEIFS",           484,    NOID,   3,  MX, V, { RO, RO, VR }, 0 }
 };
 
 /** Functions defined by OpenFormula, but not supported by Calc or by Excel. */
 static const FunctionData saFuncTableOdf[] =
 {
-    { "ARABIC",                 0,                      NOID,   NOID,   1,  1,  V, { V }, 0 },
-    { "B",                      0,                      NOID,   NOID,   3,  4,  V, { V }, 0 },
-    { "BASE",                   0,                      NOID,   NOID,   2,  3,  V, { V }, 0 },
-    { "BITAND",                 0,                      NOID,   NOID,   2,  2,  V, { V }, 0 },
-    { "BITLSHIFT",              0,                      NOID,   NOID,   2,  2,  V, { V }, 0 },
-    { "BITOR",                  0,                      NOID,   NOID,   2,  2,  V, { V }, 0 },
-    { "BITRSHIFT",              0,                      NOID,   NOID,   2,  2,  V, { V }, 0 },
-    { "BITXOR",                 0,                      NOID,   NOID,   2,  2,  V, { V }, 0 },
-    { "CHISQDIST",              0,                      NOID,   NOID,   2,  3,  V, { V }, 0 },
-    { "CHISQINV",               0,                      NOID,   NOID,   2,  2,  V, { V }, 0 },
-    { "COMBINA",                0,                      NOID,   NOID,   2,  2,  V, { V }, 0 },
-    { "DAYS",                   0,                      NOID,   NOID,   2,  2,  V, { V }, 0 },
-    { "DDE",                    0,                      NOID,   NOID,   3,  4,  V, { V }, 0 },
-    { "DECIMAL",                0,                      NOID,   NOID,   2,  2,  V, { V }, 0 },
-    { "FDIST",                  0,                      NOID,   NOID,   3,  4,  V, { V }, 0 },
-    { "FINV",                   0,                      NOID,   NOID,   3,  3,  V, { V }, 0 },
-    { "FORMULA",                0,                      NOID,   NOID,   1,  1,  V, { R }, 0 },
-    { "GAMMA",                  0,                      NOID,   NOID,   1,  1,  V, { V }, 0 },
-    { "GAUSS",                  0,                      NOID,   NOID,   1,  1,  V, { V }, 0 },
-    { "IFNA",                   0,                      NOID,   NOID,   2,  2,  V, { V, R }, 0 },
-    { "ISFORMULA",              0,                      NOID,   NOID,   1,  1,  V, { R }, 0 },
-    { "ISOWEEKNUM",             0,                      NOID,   NOID,   1,  2,  V, { V }, 0 },
-    { "MULTIPLE.OPERATIONS",    0,                      NOID,   NOID,   3,  5,  V, { R }, 0 },
-    { "MUNIT",                  0,                      NOID,   NOID,   1,  1,  A, { V }, 0 },
-    { "NUMBERVALUE",            0,                      NOID,   NOID,   2,  2,  V, { V }, 0 },
-    { "PDURATION",              0,                      NOID,   NOID,   3,  3,  V, { V }, 0 },
-    { "PERMUTATIONA",           0,                      NOID,   NOID,   2,  2,  V, { V }, 0 },
-    { "PHI",                    0,                      NOID,   NOID,   1,  1,  V, { V }, 0 },
-    { "RRI",                    0,                      NOID,   NOID,   3,  3,  V, { V }, 0 },
-    { "SHEET",                  0,                      NOID,   NOID,   1,  1,  V, { R }, 0 },
-    { "SHEETS",                 0,                      NOID,   NOID,   0,  1,  V, { R }, 0 },
-    { "SKEWP",                  0,                      NOID,   NOID,   1,  MX, V, { R }, 0 },
-    { "UNICHAR",                0,                      NOID,   NOID,   1,  1,  V, { V }, 0 },
-    { "UNICODE",                0,                      NOID,   NOID,   1,  1,  V, { V }, 0 },
-    { "XOR",                    0,                      NOID,   NOID,   1,  MX, V, { R }, 0 }
+    { "ARABIC",                 0,                      NOID,   NOID,   1,  1,  V, { VR }, 0 },
+    { "B",                      0,                      NOID,   NOID,   3,  4,  V, { VR }, 0 },
+    { "BASE",                   0,                      NOID,   NOID,   2,  3,  V, { VR }, 0 },
+    { "BITAND",                 0,                      NOID,   NOID,   2,  2,  V, { VR }, 0 },
+    { "BITLSHIFT",              0,                      NOID,   NOID,   2,  2,  V, { VR }, 0 },
+    { "BITOR",                  0,                      NOID,   NOID,   2,  2,  V, { VR }, 0 },
+    { "BITRSHIFT",              0,                      NOID,   NOID,   2,  2,  V, { VR }, 0 },
+    { "BITXOR",                 0,                      NOID,   NOID,   2,  2,  V, { VR }, 0 },
+    { "CHISQDIST",              0,                      NOID,   NOID,   2,  3,  V, { VR }, 0 },
+    { "CHISQINV",               0,                      NOID,   NOID,   2,  2,  V, { VR }, 0 },
+    { "COMBINA",                0,                      NOID,   NOID,   2,  2,  V, { VR }, 0 },
+    { "DAYS",                   0,                      NOID,   NOID,   2,  2,  V, { VR }, 0 },
+    { "DDE",                    0,                      NOID,   NOID,   3,  4,  V, { VR }, 0 },
+    { "DECIMAL",                0,                      NOID,   NOID,   2,  2,  V, { VR }, 0 },
+    { "FDIST",                  0,                      NOID,   NOID,   3,  4,  V, { VR }, 0 },
+    { "FINV",                   0,                      NOID,   NOID,   3,  3,  V, { VR }, 0 },
+    { "FORMULA",                0,                      NOID,   NOID,   1,  1,  V, { RO }, 0 },
+    { "GAMMA",                  0,                      NOID,   NOID,   1,  1,  V, { VR }, 0 },
+    { "GAUSS",                  0,                      NOID,   NOID,   1,  1,  V, { VR }, 0 },
+    { "IFNA",                   0,                      NOID,   NOID,   2,  2,  V, { VR, RO }, 0 },
+    { "ISFORMULA",              0,                      NOID,   NOID,   1,  1,  V, { RO }, 0 },
+    { "ISOWEEKNUM",             0,                      NOID,   NOID,   1,  2,  V, { VR }, 0 },
+    { "MULTIPLE.OPERATIONS",    0,                      NOID,   NOID,   3,  5,  V, { RO }, 0 },
+    { "MUNIT",                  0,                      NOID,   NOID,   1,  1,  A, { VR }, 0 },
+    { "NUMBERVALUE",            0,                      NOID,   NOID,   2,  2,  V, { VR }, 0 },
+    { "PDURATION",              0,                      NOID,   NOID,   3,  3,  V, { VR }, 0 },
+    { "PERMUTATIONA",           0,                      NOID,   NOID,   2,  2,  V, { VR }, 0 },
+    { "PHI",                    0,                      NOID,   NOID,   1,  1,  V, { VR }, 0 },
+    { "RRI",                    0,                      NOID,   NOID,   3,  3,  V, { VR }, 0 },
+    { "SHEET",                  0,                      NOID,   NOID,   1,  1,  V, { RO }, 0 },
+    { "SHEETS",                 0,                      NOID,   NOID,   0,  1,  V, { RO }, 0 },
+    { "SKEWP",                  0,                      NOID,   NOID,   1,  MX, V, { RX }, 0 },
+    { "UNICHAR",                0,                      NOID,   NOID,   1,  1,  V, { VR }, 0 },
+    { "UNICODE",                0,                      NOID,   NOID,   1,  1,  V, { VR }, 0 },
+    { "XOR",                    0,                      NOID,   NOID,   1,  MX, V, { RX }, 0 }
 };
 
 // ----------------------------------------------------------------------------
@@ -778,16 +793,46 @@ const sal_Unicode API_TOKEN_ARRAY_COLSEP    = ';';
 
 // function info parameter class iterator =====================================
 
-FuncInfoParamClassIterator::FuncInfoParamClassIterator( const FunctionInfo& rFuncInfo ) :
-    mpnParamClass( rFuncInfo.mpnParamClass ),
-    mpnParamClassEnd( rFuncInfo.mpnParamClass + FUNCINFO_CLASSCOUNT )
+FunctionParamInfoIterator::FunctionParamInfoIterator( const FunctionInfo& rFuncInfo ) :
+    mpParamInfo( rFuncInfo.mpParamInfos ),
+    mpParamInfoEnd( rFuncInfo.mpParamInfos + FUNCINFO_PARAMINFOCOUNT ),
+    mbParamPairs( rFuncInfo.mbParamPairs )
+{
+    OSL_ENSURE( !mbParamPairs || (mpParamInfo + 1 < mpParamInfoEnd),
+        "FunctionParamInfoIterator::FunctionParamInfoIterator - expecting at least 2 infos for paired parameters" );
+}
+
+const FunctionParamInfo& FunctionParamInfoIterator::getParamInfo() const
+{
+    static const FunctionParamInfo saInvalidInfo = { FUNC_PARAM_NONE, FUNC_PARAMCONV_ORG, false };
+    return mpParamInfo ? *mpParamInfo : saInvalidInfo;
+}
+
+bool FunctionParamInfoIterator::isCalcOnlyParam() const
 {
+    return mpParamInfo && (mpParamInfo->meValid == FUNC_PARAM_CALCONLY);
 }
 
-FuncInfoParamClassIterator& FuncInfoParamClassIterator::operator++()
+bool FunctionParamInfoIterator::isExcelOnlyParam() const
 {
-    if( (mpnParamClass + 1 < mpnParamClassEnd) && (mpnParamClass[ 1 ] != 0) )
-        ++mpnParamClass;
+    return mpParamInfo && (mpParamInfo->meValid == FUNC_PARAM_EXCELONLY);
+}
+
+FunctionParamInfoIterator& FunctionParamInfoIterator::operator++()
+{
+    if( mpParamInfo )
+    {
+        // move pointer to next entry, if something explicit follows
+        if( (mpParamInfo + 1 < mpParamInfoEnd) && (mpParamInfo[ 1 ].meValid != FUNC_PARAM_NONE) )
+            ++mpParamInfo;
+        // points to last info, but parameter pairs expected, move to previous info
+        else if( mbParamPairs )
+            --mpParamInfo;
+        // if last parameter type is 'Excel-only' or 'Calc-only', do not repeat it
+        else if( isExcelOnlyParam() || isCalcOnlyParam() )
+            mpParamInfo = 0;
+        // otherwise: repeat last parameter class
+    }
     return *this;
 }
 
@@ -876,7 +921,8 @@ void FunctionProviderImpl::initFunc( const FunctionData& rFuncData, sal_uInt8 nM
     xFuncInfo->mnMinParamCount = rFuncData.mnMinParamCount;
     xFuncInfo->mnMaxParamCount = (rFuncData.mnMaxParamCount == MX) ? nMaxParam : rFuncData.mnMaxParamCount;
     xFuncInfo->mnRetClass = rFuncData.mnRetClass;
-    xFuncInfo->mpnParamClass = rFuncData.mpnParamClass;
+    xFuncInfo->mpParamInfos = rFuncData.mpParamInfos;
+    xFuncInfo->mbParamPairs = getFlag( rFuncData.mnFlags, FUNCFLAG_PARAMPAIRS );
     xFuncInfo->mbVolatile = getFlag( rFuncData.mnFlags, FUNCFLAG_VOLATILE );
     xFuncInfo->mbExternal = getFlag( rFuncData.mnFlags, FUNCFLAG_EXTERNAL );
     bool bMacroCmd = getFlag( rFuncData.mnFlags, FUNCFLAG_MACROCMD );
diff --git a/oox/source/xls/formulaparser.cxx b/oox/source/xls/formulaparser.cxx
index d2818ff..f0ff482 100644
--- a/oox/source/xls/formulaparser.cxx
+++ b/oox/source/xls/formulaparser.cxx
@@ -233,23 +233,23 @@ const ApiToken* FormulaFinalizer::processParameters(
             }
 
             // process all parameters
-            FuncInfoParamClassIterator aClassIt( *pRealFuncInfo );
+            FunctionParamInfoIterator aParamInfoIt( *pRealFuncInfo );
             size_t nLastValidSize = maTokens.size();
             size_t nLastValidCount = 0;
-            for( size_t nParam = 0; nParam < nParamCount; ++nParam, ++aPosIt, ++aClassIt )
+            for( size_t nParam = 0; nParam < nParamCount; ++nParam, ++aPosIt, ++aParamInfoIt )
             {
                 // add embedded Calc-only parameters
-                if( aClassIt.isCalcOnlyParam() )
+                if( aParamInfoIt.isCalcOnlyParam() )
                 {
                     appendCalcOnlyParameter( *pRealFuncInfo, nParam );
-                    while( aClassIt.isCalcOnlyParam() ) ++aClassIt;
+                    while( aParamInfoIt.isCalcOnlyParam() ) ++aParamInfoIt;
                 }
 
                 const ApiToken* pParamBegin = *aPosIt + 1;
                 const ApiToken* pParamEnd = *(aPosIt + 1);
                 bool bIsEmpty = isEmptyParameter( pParamBegin, pParamEnd );
 
-                if( !aClassIt.isExcelOnlyParam() )
+                if( !aParamInfoIt.isExcelOnlyParam() )
                 {
                     // replace empty second and third parameter in IF function with zeros
                     if( (pRealFuncInfo->mnOobFuncId == OOBIN_FUNC_IF) && ((nParam == 1) || (nParam == 2)) && bIsEmpty )
@@ -279,7 +279,7 @@ const ApiToken* FormulaFinalizer::processParameters(
             maTokens.resize( nLastValidSize );
 
             // add trailing Calc-only parameters
-            if( aClassIt.isCalcOnlyParam() )
+            if( aParamInfoIt.isCalcOnlyParam() )
                 appendCalcOnlyParameter( *pRealFuncInfo, nLastValidCount );
 
             // add optional parameters that are required in Calc
@@ -1420,6 +1420,7 @@ bool OoxFormulaParserImpl::importAttrToken( RecordInputStream& rStrm )
     // equal flags in BIFF and OOBIN
     switch( nType )
     {
+        case 0:     // sometimes, tAttrSkip tokens miss the type flag
         case OOBIN_TOK_ATTR_VOLATILE:
         case OOBIN_TOK_ATTR_IF:
         case OOBIN_TOK_ATTR_SKIP:
@@ -2199,6 +2200,7 @@ bool BiffFormulaParserImpl::importAttrToken( BiffInputStream& rStrm )
     rStrm >> nType;
     switch( nType )
     {
+        case 0:     // sometimes, tAttrSkip tokens miss the type flag
         case BIFF_TOK_ATTR_VOLATILE:
         case BIFF_TOK_ATTR_IF:
         case BIFF_TOK_ATTR_SKIP:
commit 0899c028bcc76e0a8c885f390f1934fcfcf47ba2
Author: Kurt Zenker <kz at openoffice.org>
Date:   Fri Sep 11 14:29:45 2009 +0000

    CWS-TOOLING: integrate CWS odfmetadata3
    2009-09-11 Michael Stahl merge DEV300_m58
    2009-09-07 Michael Stahl SwFmtFld::Modify(): do nothing on RES_OBJECTDYING
    2009-08-27 Michael Stahl #i91565#, #i91566#: TextPortionEnumerationTest.java: add test document
    2009-08-27 Michael Stahl #i91565#, #i91566#: add complex test: TextPortionEnumerationTest.java
    2009-08-27 Michael Stahl CLiteral::initialize(): zero-length literals probably not an error
    2009-08-27 Michael Stahl #i91565#, #i91566#: offapi: new InContentMetadata and MetadataField services
     adapt TextPortion for InContentMetadata
    2009-08-27 Michael Stahl #i91564#: xmloff: load/store xml:id and RDFa for text:bookmark(-start).
    2009-08-27 Michael Stahl #i91564#: sw core: add support for xml:id at bookmarks:
     sw::mark::Bookmark: derive from Metadatable.
     SwHistoryBookmark, SaveBookmark: store a MetadatableUndo.
     ndcopy.cxx: lcl_CopyBookmarks(): copy the xml:id.
     SwXBookmark: derive from MetadatableMixin.
    2009-08-27 Michael Stahl #i91565#, #i91566#: xmloff: refactor ruby import so nested meta(-field) works:
     remove XMLRubyHint_Impl.
     XMLImpRubyContext_Impl::~XMLImpRubyContext_Impl(): insert ruby directly.
    2009-08-27 Michael Stahl #i91565#, #i91566#: xmloff: fix text:meta(-field) import/export:
     new XMLTextParagraphExport::exportTextField() overload for XTextField.
     CreateAndInsertMark(): set xml:id after insertion.
     fix meta(-field) service names, bugs etc.
    2009-08-27 Michael Stahl #i91565#, #i91566#: sw text formatting: paint background of meta(-field) body:
     SwFont: add member m_nMetaCount.
     txttypes.hxx: add POR_META.
     atrstck.cxx: handle RES_TXTATR_META(FIELD).
     itrform2.cxx: SwTxtFormatter::WhichTxtPor(): create new class SwMetaPortion.
    2009-08-27 Michael Stahl #i91566#: sw text formatting: display meta-field prefix and suffix:
     SwAttrIter::GetAttr(): replace with call to GetTxtAttrForCharAt().
     SwTxtFormatter::NewExtraPortion(): handle meta-field prefix.
     SwTxtFormatter: new member m_nHintEndIndex.
     SwTxtFormatter::WhichFirstPortion(): call TryNewNoLengthPortion().
     SwTxtFormatter::TryNewNoLengthPortion(): new; handle suffix of meta-field.
     SwTxtFormatter::UnderFlow(): UGLY HACK: decrement m_nHintEndIndex.
     SwFldPortion: add flag m_bNoLength: portion has zero length (for suffix).
    2009-08-27 Michael Stahl #i91565#, #i91566#: extend text:meta(-field) uno wrapper with XText interface:
     unoobj.hxx: new CursorType CURSOR_META.
     unoobj2.cxx: refactor SwXText implementation to ensure that when the SwXText
      belongs to a SwXMeta, content is always inserted inside the meta(-field).
     unoobj.cxx: new SwXTextCursor::ForceIntoMeta(): cursor stays in meta(-field).
     unometa.hxx: SwXMeta implements XText, forwarding to a member SwXMetaText.
     DocInsertStringSplitCR(), SwX*::attachToRange(), SwX*::DeleteAndInsert():
      use FORCEHINTEXPAND hack to ensure insert into the meta(-field) at the end.
    2009-08-27 Michael Stahl #i91565#, #i91566#: add text:meta(-field) uno wrapper to sw:
     fmtmeta.hxx, fmtatr2.cxx: new class sw::MetaField, new sw::MetaFieldManager.
     doc.hxx, docnew.cxx: new SwDoc::GetMetaFieldManager().
     unocoll.hxx,.cxx: new SW_SERVICE_FIELDTYPE_METAFIELD, SW_SERVICE_TYPE_META.
     unomap.hxx,.cxx: new PROPERTY_MAP_METAFIELD.
     unoprnms.hxx: new UNO_NAME_META.
     unoport.hxx: new PORTION_META; add "InContentMetadata" prop to SwXTextPortion.
     new unometa.hxx: new class SwXMeta and SwXMetaField.
     unofield.cxx: SwXFieldEnumeration: include meta-fields.
     unoportenum.cxx: handle RES_TXTATR_META(FIELD) by using a portion list stack.
     unotext.cxx: SwXText::insertTextContent(): handle meta(-field) as attribute.
    2009-08-27 Michael Stahl #i91565#, #i91566#: ndhints.cxx: remove sort number from SwTxtAttrNesting
    2009-08-27 Michael Stahl #i91565#, #i91566#: add support for hints with end and CH_TXTATR to sw core:
     doc.hxx, docedt.cxx: replace SwDoc::Delete(), DeleteAndJoin(), ReplaceRange()
      with wrappers that split at left-overlapped end+CH_TXTATR hints.
     txatbase.hxx: new member SwTxtAttr::m_bHasDummyChar.
     ndtxt.hxx: rename SwTxtNode::GetTxtAttr() to GetTxtAttrForCharAt().
     ndtxt.cxx: SwTxtNode::CopyText(): copy end+CH_TXTATR hints iff copy CH_TXTATR.
     txtatr2.cxx, thints.cxx: SwTxtMeta gets a CH_TXTATR.
    2009-08-27 Michael Stahl #i91565#, #i91566#: add text:meta(-field) to sw core:
     txatbase.hxx: new member SwTxtAttr::m_bNesting.
     hintids.hxx: new ids RES_TXTATR_META, RES_TXTATR_METAFIELD.
     txtatr.hxx: new base class SwTxtAttrNesting.
      new hint SwTxtMeta.
      SwTxtRuby derives from SwTxtAttrNesting.
     txtinet.hxx: SwTxtINetFmt derives from SwTxtAttrNesting.
     new header fmtmeta.hxx: new pool item SwFmtMeta. new class sw::Meta.
     ndhints.hxx, thints.cxx: new method SwpHints::TryInsertNesting().
     thints.cxx: refactoring: BuildPortions() no longer handles Ruby/Hyperlink,
      but TryInsertNesting(), which also handles meta(-field).
     SwTxtNode::InsertItem(): check if the hint is actually inserted.
     ndhints.cxx: sort nesting hints based on sort number.
     ndtxt.cxx: lcl_CopyHint(): handle copy of meta/meta-field.
    2009-08-27 Michael Stahl enable expanding hints with m_bLockExpandFlag set:
     add new InsertFlag: INS_FORCEHINTEXPAND.
     add new SetAttrMode: SETATTR_FORCEHINTEXPAND.
     rename SwEditShell::Insert() to Insert2() because changed signature fails
      to compile when SwWrtShell tries to overwrite these non-virtual members...
     SwWrtShell::Insert() sets FOCEHINTEXPAND if range was selected/deleted.
     adapt SwUndoInsert to store flags.
    2009-08-27 Michael Stahl change formal parameters of item insertion methods to type SetAttrMode
    2009-08-27 Michael Stahl fix incorrect resetting of text attributes in SwUndoInsSection, SwUndoInserts
    2009-08-27 Michael Stahl clean up SwTxtNode::CutImpl() and lcl_CopyHint()
    2009-08-27 Michael Stahl rename SwDoc::Copy() to CopyRange(), and _Copy() to CopyImpl()
    2009-08-27 Michael Stahl rename SwNodes::Move() to MoveRange(), and remove unused parameter
    2009-08-27 Michael Stahl rename SwDoc::Move() to MoveRange()/MoveNodeRange()
    2009-08-27 Michael Stahl rename SwDoc::Insert() to InsertString(), and remove sal_Unicode variant
    2009-08-27 Michael Stahl rename SwDoc::Insert() to InsertPoolItem()/InsertItemSet()/InsertSwSection()
    2009-08-27 Michael Stahl rename SwDoc::Replace() to ReplaceRange()
    2009-08-27 Michael Stahl remove SwDoc::Overwrite() sal_Unicode variant
    2009-08-27 Michael Stahl split up SwDoc::DeleteAndJoin(): factor out DeleteAndJoinWithRedline()
    2009-08-27 Michael Stahl rename overloaded SwDoc::Delete() to DeleteRange()/DeleteTOXMark()
    2009-08-27 Michael Stahl rename SwTxtNode::Copy() to CopyText()
    2009-08-27 Michael Stahl rename SwTxtNode::Cut() to CutText(), and _Cut() to CutImpl()
    2009-08-27 Michael Stahl rename SwTxtNode::Delete() to DeleteAttribute()/DeleteAttributes()
    2009-08-27 Michael Stahl rename SwTxtNode::Replace() to ReplaceText(), and remove the xub_Unicode variant
    2009-08-27 Michael Stahl rename SwTxtNode::Erase() to EraseText()
    2009-08-27 Michael Stahl rename SwTxtNode::Insert() to InsertText(), and remove the xub_Unicode variant
    2009-08-27 Michael Stahl clean up SwTxtNode::Update()
    2009-08-27 Michael Stahl remove SwTxtAttr::RemoveFromPool() and make destructor non-public,
     to be invoked by new method SwTxtAttr::Destroy()
    2009-08-27 Michael Stahl ensure that SwDoc::Insert() for item (set) returns success indicator:
     replace SwRegHistory constructor with method InsertItems(), returning bool.
     refactor InsAttr() so that it checks if InsertItems() succeeds.
    2009-08-27 Michael Stahl move SwXTextPortionEnumeration from unoobj.hxx to unoport.hxx
    2009-08-27 Michael Stahl add missing SolarMutex in SwXTextPortion methods
    2009-08-27 Michael Stahl SwXTextPortion: new member m_xTextField (so the TextField property need not
      be returned indirectly via SwUnoCursorHelper).
     factor out function CreateSwXTextField().
    2009-08-27 Michael Stahl SwXTextPortion: remove PORTION_CONTROL_CHAR and implementation of XTextField
    2009-08-27 Michael Stahl remove obsolete hint SwTxtHardBlank and formats SwFmtHardBlank/SwFmtSoftHyph
    2009-08-27 Michael Stahl clean up SwTxtAttr and friends:
     remove many accessor methods for obsolete (due to autofmt) char format items.
     remove unused flag SwTxtAttr::m_bDontMergeAttr.
     MakeRedlineTxtAttr() now dedicated function, no longer calls MakeTxtAttr().
    2009-08-27 Michael Stahl remove obsolete attribute SwTxt2Lines
    2009-08-27 Michael Stahl SwXTextPortionEnumeration: finish refactoring CreatePortions
     change ExportHints so it always returns a text portion for hint w/ CH_TXTATR.
     remove special case for handling end of paragraph.
     unfortunately had to refactor the fieldmarks export as well (got in the way).
    2009-08-27 Michael Stahl SwXTextPortionEnumeration: refactor CreatePortions: frames export
     extract function ExportFrames() from CreatePortions().
     remove (un)dead code that calls evil MovePara(fnParaCurr, fnParaEnd)
    2009-08-27 Michael Stahl clean up SwXParaFrameEnumeration
    2009-08-27 Michael Stahl CollectFrameAtNode: replace SwDependArr with STL based FrameDependList_t
    2009-08-27 Michael Stahl SwXTextPortionEnumeration: tweak refmark/toxmark export
     so ExportHints returns the portion for point marks
    2009-08-27 Michael Stahl clean up SwXTextPortionEnumeration:
     prefix members, remove casts, replace SvWeirdArray with STL, etc.
     make CreatePortions() method a function, and remove lots of members.
     extract fieldmarks function from CreatePortions.
    2009-08-27 Michael Stahl remove FOREACHUNOPAM_START/END macros
    2009-08-27 Michael Stahl clean up SwXTextPortion:
     prefix members, remove casts, etc.
     remove SwXRubyPortion: replace it with another SwXTextPortion constructor
    2009-08-27 Michael Stahl #i102541# SwXReferenceMark::InsertRefMark(): use flag SETATTR_DONTEXPAND
    2009-08-27 Michael Stahl rename SwTxtNode::Insert to SwTxtNode::InsertHint, and
    fix constness in SwTxtNode::InsertItem
    2009-08-27 Michael Stahl turn SwTxtNode::MakeTxtAttr() methods into global functions in ndhints.hxx
    2009-08-27 Michael Stahl remove obsolete sw/inc/bookmrk.hxx
    2009-08-27 Michael Stahl pam.cxx: fix ComparePosition functions (returned wrong result in one case)
    2009-08-27 Michael Stahl #i103613# only import RDF metadata on normal open of a document
    2009-09-11 kz CWS-TOOLING: integrate CWS impress176
    2009-09-08 20:18:24 +0200 sj  r275957 : fixed warning (shadowed variable)
    2009-09-08 18:02:05 +0200 cl  r275948 : #i104315# added missing tab pages
    2009-09-08 17:35:18 +0200 cl  r275947 : #i104866# fixed angle import
    2009-09-08 17:32:53 +0200 cl  r275946 : #i104841# fixed angle import
    2009-09-08 17:01:25 +0200 cl  r275943 : #i103935# fixed the SID_EVENTCONFIG mess
    2009-09-08 14:32:57 +0200 sj  r275928 : #i104685# only comments
    2009-09-07 12:37:36 +0200 sj  r275886 : #i104683# fixed import of bold/italic attributes for normal text shapes
    2009-09-04 15:07:46 +0200 sj  r275808 : #104689# fixed bullet color problem
    2009-09-03 15:25:07 +0200 sj  r275753 : #160200# added vertical alignment of table cells
    2009-09-11 kz CWS-TOOLING: integrate CWS dv14
    2009-09-10 15:16:32 +0200 sg  r276035 : #160513# updated wfs scheme to accept ports
    2009-09-10 07:41:47 +0200 dv  r276019 : #i104942# Better renaming algorithmen
    2009-08-31 13:41:11 +0200 dv  r275604 : #160505# Setting APP1PRODUCTNAME must not overwrite APP1PRODUCTDEF
    2009-09-11 kz CWS-TOOLING: integrate CWS jl131
    2009-09-02 16:42:40 +0200 jl  r275720 : #i97896#
    2009-08-31 13:01:53 +0200 jl  r275599 : CWS-TOOLING: rebase CWS jl131 to trunk at 275331 (milestone: DEV300:m56)
    2009-07-31 14:35:30 +0200 jl  r274531 : CWS-TOOLING: rebase CWS jl131 to trunk at 274203 (milestone: DEV300:m53)
    2009-07-23 14:20:32 +0200 jl  r274272 : #i79839# better error text when trying to modify shared layer without having write permission, eg. unopkg add --shared, unopkg remove --shared, unopkg reinstall --shared
    2009-07-22 16:38:02 +0200 jl  r274252 : #i97896# localize error message for lock file
    2009-07-22 16:37:22 +0200 jl  r274251 : #i80462# unprecise wording in updatedialog
    2009-07-22 16:36:06 +0200 jl  r274250 : #i97896# localize error message for lock file
    2009-07-22 16:35:20 +0200 jl  r274249 : #i97896# localize error message for lock file
    2009-07-22 15:07:30 +0200 jl  r274242 : #i98873# minimum java version is 1.5 since OOo 3.0
    2009-09-11 kz CWS-TOOLING: integrate CWS changehc
    2009-08-31 19:38:50 +0200 pl  r275633 : remove dbug printf
    2009-08-31 17:41:50 +0200 pl  r275623 : CWS-TOOLING: rebase CWS changehc to trunk at 275331 (milestone: DEV300:m56)
    2009-07-15 19:45:46 +0200 pl  r274028 : #i35482# use HC flag to decide high contrast mode
    2009-07-15 17:40:52 +0200 pl  r274020 : #i35482# use HC flag to decide high contrast mode
    2009-07-15 17:39:50 +0200 pl  r274019 : #i35482# update autohc correctly in MergeSystemSettings
    2009-07-15 17:38:57 +0200 pl  r274018 : #i35482# update autohc correctly in MergeSystemSettings
    2009-09-11 kz CWS-TOOLING: integrate CWS notes10
    2009-08-24 07:25:57 +0200 mod  r275287 : 2009-07-26 02:38:32 +0200 mod  r274343 : #i#i103645#
    2009-07-26 02:01:53 +0200 mod  r274342 : #i103645#
    2009-07-26 01:52:42 +0200 mod  r274341 : #i103490#
    2009-07-22 08:31:48 +0200 mod  r274215 : #i103373#
    2009-07-15 00:55:11 +0200 mod  r273987 : #i101419#
    2009-07-14 07:07:55 +0200 mod  r273956 : #i101419#
    2009-07-14 07:07:43 +0200 mod  r273955 : #i101419#
    2009-07-14 07:02:10 +0200 mod  r273954 : changes from notes9
    2009-07-14 06:14:25 +0200 mod  r273953 : #i103476#
    2009-09-11 kz CWS-TOOLING: integrate CWS ab70
    2009-09-10 15:12:54 +0200 jsk  r276034 : #i85434# - mandatory automatic update test
    2009-09-10 15:11:06 +0200 jsk  r276033 : #i85434# - mandatory automatic update test
    2009-09-02 09:49:24 +0200 ab  r275698 : #i85434# Dialog Import
    2009-09-11 kz CWS-TOOLING: integrate CWS hb32bugs02
    2009-09-02 Henning Brinkmann #i102420# revert changes
    2009-08-26 Henning Brinkmann merged DEV300_m56
    2009-08-19 Henning Brinkmann merged DEV300_m55
    2009-08-14 Henning Brinkmann merged changes from wntmsci12
    2009-08-12 Henning Brinkmann Implemented NoSpaceEdit constructor and destructor in .cxx to allow compile with debug on wntmsci12.
    2009-08-12 Henning Brinkmann Added some SW_DLLPUBLIC to make compilable on wntmsci12.
    2009-08-11 Henning Brinkmann #i102420# dbg_out: surround output for SwNodes with <nodes-array>.
    2009-08-10 Henning Brinkmann #i102420# rewritten debug output for SwNodes.
    2009-08-07 Henning Brinkmann #i102420# debug _MoveNodes: output the destination, too. Break after two iterations.
    2009-08-07 Henning Brinkmann #i102420# _MoveNodes: Additionally check if destination index is inside source => false
    Check if current range was already handled => loop
    Debug output current range
    2009-08-06 Henning Brinkmann merged DEV300_m54
    2009-08-06 Henning Brinkmann added master fix
    2009-08-06 Henning Brinkmann debug output for SwNodeRange
    2009-08-04 Henning Brinkmann #i102844# robustness: check for NULL pointer to prevent crash
    2009-08-03 Henning Brinkmann #i103475# applied patch and verified
    2009-08-03 Henning Brinkmann Removed code preventing build of sw with DEBUG.
    2009-09-11 convert-repo update tags
    2009-09-10 kz CWS-TOOLING: integrate CWS os2port06dev300
    2009-09-05 22:49:00 +0200 ydario  r275858 : #i99588# applied os2port06 diff to DEV300 tree.
    2009-09-10 kz CWS-TOOLING: integrate CWS mingwport23
    2009-08-29 07:07:53 +0200 tono  r275555 : i#104522: mingw port graphite
    2009-08-29 07:07:26 +0200 tono  r275554 : i#104522: mingw port printf format fix
    2009-09-10 kz CWS-TOOLING: integrate CWS mh232
    2009-08-26 03:52:57 +0200 mh  r275385 : #i102182# FreeBSD patch
    2009-08-26 03:43:20 +0200 mh  r275384 : #i101333# patch for FreeBSD
    2009-08-26 03:11:20 +0200 mh  r275383 : #i39230
    2009-08-26 03:07:51 +0200 mh  r275382 : #i39230# more space for initials field
    2009-08-26 02:41:19 +0200 mh  r275380 : #i39230# use vos::osecurity for reading the user name
    2009-08-18 22:06:00 +0200 mh  r275130 : #i104243#, line ending problem with newer perl
    2009-08-18 21:53:21 +0200 mh  r275129 : #i39230# read initials via getpwnam
    2009-08-18 21:34:05 +0200 mh  r275128 : enable CAIROCANVAS for Linux and Mac, #i88613#
    2009-08-17 18:02:59 +0200 mh  r275067 : #i95498# make compile with gcc3
    2009-09-10 kz CWS-TOOLING: integrate CWS tkr24
    2009-09-07 14:31:06 +0200 is  r275898 : #160081# adding NO_LICENSE_INTO_COPYRIGHT
    2009-09-10 releng #i10000# change KeyMapping to SingletonRef<framework::KeyMapping>
    2009-09-11 convert-repo update tags
    2009-09-10 kz CWS-TOOLING: integrate CWS os2port06dev300
    2009-09-05 22:49:00 +0200 ydario  r275858 : #i99588# applied os2port06 diff to DEV300 tree.
    2009-09-10 kz CWS-TOOLING: integrate CWS mingwport23
    2009-08-29 07:07:53 +0200 tono  r275555 : i#104522: mingw port graphite
    2009-08-29 07:07:26 +0200 tono  r275554 : i#104522: mingw port printf format fix
    2009-09-10 kz CWS-TOOLING: integrate CWS mh232
    2009-08-26 03:52:57 +0200 mh  r275385 : #i102182# FreeBSD patch
    2009-08-26 03:43:20 +0200 mh  r275384 : #i101333# patch for FreeBSD
    2009-08-26 03:11:20 +0200 mh  r275383 : #i39230
    2009-08-26 03:07:51 +0200 mh  r275382 : #i39230# more space for initials field
    2009-08-26 02:41:19 +0200 mh  r275380 : #i39230# use vos::osecurity for reading the user name
    2009-08-18 22:06:00 +0200 mh  r275130 : #i104243#, line ending problem with newer perl
    2009-08-18 21:53:21 +0200 mh  r275129 : #i39230# read initials via getpwnam
    2009-08-18 21:34:05 +0200 mh  r275128 : enable CAIROCANVAS for Linux and Mac, #i88613#
    2009-08-17 18:02:59 +0200 mh  r275067 : #i95498# make compile with gcc3
    2009-09-10 kz CWS-TOOLING: integrate CWS tkr24
    2009-09-07 14:31:06 +0200 is  r275898 : #160081# adding NO_LICENSE_INTO_COPYRIGHT
    2009-09-10 releng #i10000# change KeyMapping to SingletonRef<framework::KeyMapping>

diff --git a/unoxml/source/rdf/CLiteral.cxx b/unoxml/source/rdf/CLiteral.cxx
index 5b63e81..25a8267 100644
--- a/unoxml/source/rdf/CLiteral.cxx
+++ b/unoxml/source/rdf/CLiteral.cxx
@@ -124,7 +124,7 @@ void SAL_CALL CLiteral::initialize(const css::uno::Sequence< ::com::sun::star::u
                 "argument must be string"), *this, 0);
     }
     //FIXME: what is legal?
-    if (arg0.getLength() > 0) {
+    if (true) {
         m_Value = arg0;
     } else {
         throw css::lang::IllegalArgumentException(
commit dffc6e04ad82ba2e446a7c0f821759e9a25bc090
Author: Kurt Zenker <kz at openoffice.org>
Date:   Thu Sep 10 22:33:17 2009 +0000

    CWS-TOOLING: integrate CWS mh232
    2009-08-26 03:52:57 +0200 mh  r275385 : #i102182# FreeBSD patch
    2009-08-26 03:43:20 +0200 mh  r275384 : #i101333# patch for FreeBSD
    2009-08-26 03:11:20 +0200 mh  r275383 : #i39230
    2009-08-26 03:07:51 +0200 mh  r275382 : #i39230# more space for initials field
    2009-08-26 02:41:19 +0200 mh  r275380 : #i39230# use vos::osecurity for reading the user name
    2009-08-18 22:06:00 +0200 mh  r275130 : #i104243#, line ending problem with newer perl
    2009-08-18 21:53:21 +0200 mh  r275129 : #i39230# read initials via getpwnam
    2009-08-18 21:34:05 +0200 mh  r275128 : enable CAIROCANVAS for Linux and Mac, #i88613#
    2009-08-17 18:02:59 +0200 mh  r275067 : #i95498# make compile with gcc3

diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index dd55fd8..dff72eb 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -1436,8 +1436,8 @@ ImplErrorDialog::ImplErrorDialog( const std::set< vcl::PDFWriter::ErrorCode >& r
 
 {
     // load images
-    Image aWarnImg( BitmapEx( ResId( IMG_WARN, rResMgr ) ) );
-    Image aErrImg( BitmapEx( ResId( IMG_ERR, rResMgr ) ) );
+    Image aWarnImg = Image ( BitmapEx( ResId( IMG_WARN, rResMgr ) ) );
+    Image aErrImg= Image ( BitmapEx( ResId( IMG_ERR, rResMgr ) ) );
 
     for( std::set<vcl::PDFWriter::ErrorCode>::const_iterator it = rErrors.begin();
          it != rErrors.end(); ++it )


More information about the ooo-build-commit mailing list