https://bugs.documentfoundation.org/show_bug.cgi?id=143192

            Bug ID: 143192
           Summary: 'Format' Basic function doesn't handle Null values
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: mikekagan...@hotmail.com

Format function's format string takes up to four sections separated by
semicolons. The fourth section is for Null values.

This is defined in SbxValue::Format, which handles SbxNULL values explicitly,
calling SbxBasicFormater::BasicFormatNull. However, calling

> Format(Null)

or

> Format(Null, ";;;""NNN""")

results in "Inadmissible value or data type. Data type mismatch" error.
This works in VBA [1]: the former call returns "", and the latter returns
"NNN".

[1]
https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/format-function-visual-basic-for-applications

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to