Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: ODF 1.2 Part 2 CD 3
    • Component/s: OpenFormula
    • Labels:
      None
    • Proposal:
      Hide

      Remove any reference to date/time/currency.

      Rewrite the regular expression as an example (see below).

      If some non-digit character other than leading space characters or one leading sign character or trailing spaces is present, an error is generated. Except if given separator information as follows:

      If the second parameter (optional decimal separator) is not given, only integer numbers are parsed.

      Define a third optional parameter for the group separator. If not given, only
      integer and decimal (if the second parameter is present) numbers are parsed.

      Resulting in a syntax of:

      NUMBERVALUE( Text T [ ; Text DecimalSeparator [ ; Text GroupSeparator ]] )

      Constraints: LEN(DecimalSeparator) = 1, DecimalSeparator shall not appear in GroupSeparator

      Semantics:

      Replace
      DecimalPoint defines the character used as the decimal point, either "." (period) or "," (comma).
      with
      DecimalSeparator defines the character used as the decimal separator, for example "." (period) or "," (comma). If this parameter is not given, only integer numbers are parsed.

      Add:
      GroupSeparator defines the character(s) used as grouping separator, for example "," (comma) or "." (period). If this parameter is not given, only integer or decimal numbers containing the DecimalSeparator are parsed. If this parameter is given, all characters contained are ignored in T if each is surrounded by a digit on each side. If GroupSeparator contains " " U+0020 (SPACE), U+0020 and U+00A0 (NO-BREAK SPACE) shall be equally treated.

      Replace the regular expression with a sample regex for DecimalSeparator="." and GroupSeparator="," and Grouping="3":
      [+|-]?([0-9](,[0-9])*)?(\.[0-9])?(([eE][+-]?[0-9]+)|%)?

      Replace
      If DecimalPoint is "," (a comma), use the expression above but swapping the comma for the period (so "." is ignored, and "," is the decimal point).
      with
      If, for example, DecimalSeparator is "," (a comma) and GroupSeparator is "."
      (a period), use the expression above but swapping the comma for the period (so
      "." is ignored).

      Remove
      "If the provided text does not match the pattern, an evaluator shall at least accept the same formats as VALUE does, and should accept the given DecimalPoint where appropriate (e.g., HH:MM:SS.sss or HH:MM:SS,sss depending on the DecimalPoint value)."
      as this function is not a general purpose text to number converter.

      Remove
      "An evaluator may accept other formats as well, but these are implementation-defined."
      as this function has a very specific purpose.

      Adapt the Rationale offset note.

      Show
      Remove any reference to date/time/currency. Rewrite the regular expression as an example (see below). If some non-digit character other than leading space characters or one leading sign character or trailing spaces is present, an error is generated. Except if given separator information as follows: If the second parameter (optional decimal separator) is not given, only integer numbers are parsed. Define a third optional parameter for the group separator. If not given, only integer and decimal (if the second parameter is present) numbers are parsed. Resulting in a syntax of: NUMBERVALUE( Text T [ ; Text DecimalSeparator [ ; Text GroupSeparator ]] ) Constraints: LEN(DecimalSeparator) = 1, DecimalSeparator shall not appear in GroupSeparator Semantics: Replace DecimalPoint defines the character used as the decimal point, either "." (period) or "," (comma). with DecimalSeparator defines the character used as the decimal separator, for example "." (period) or "," (comma). If this parameter is not given, only integer numbers are parsed. Add: GroupSeparator defines the character(s) used as grouping separator, for example "," (comma) or "." (period). If this parameter is not given, only integer or decimal numbers containing the DecimalSeparator are parsed. If this parameter is given, all characters contained are ignored in T if each is surrounded by a digit on each side. If GroupSeparator contains " " U+0020 (SPACE), U+0020 and U+00A0 (NO-BREAK SPACE) shall be equally treated. Replace the regular expression with a sample regex for DecimalSeparator="." and GroupSeparator="," and Grouping="3": [+|-] ?( [0-9] (, [0-9] )*)?(\. [0-9] )?(( [eE] [+-] ? [0-9] +)|%)? Replace If DecimalPoint is "," (a comma), use the expression above but swapping the comma for the period (so "." is ignored, and "," is the decimal point). with If, for example, DecimalSeparator is "," (a comma) and GroupSeparator is "." (a period), use the expression above but swapping the comma for the period (so "." is ignored). Remove "If the provided text does not match the pattern, an evaluator shall at least accept the same formats as VALUE does, and should accept the given DecimalPoint where appropriate (e.g., HH:MM:SS.sss or HH:MM:SS,sss depending on the DecimalPoint value)." as this function is not a general purpose text to number converter. Remove "An evaluator may accept other formats as well, but these are implementation-defined." as this function has a very specific purpose. Adapt the Rationale offset note.
    • Resolution:
      Hide

      Applied proposal.

      Show
      Applied proposal.

      Description

        Attachments

          Activity

            People

            • Assignee:
              erack Eike Rathke (Inactive)
              Reporter:
              erack Eike Rathke (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: