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

            Bug ID: 146742
           Summary: The return value of Basic function is not initialized
                    when called from Calc formula
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

Created attachment 177527
  --> https://bugs.documentfoundation.org/attachment.cgi?id=177527&action=edit
A spreadsheet with a macro used as spreadsheet function

The attachment contains this macro:

Function Foo(n) As Boolean
  If n = 3 Then Foo = True
End Function

This function is used in cells B1-B9, like "=FOO(A1)"; the cells A1-A9 contain
numbers from 1 to 9. The intended behavior is that only B3 should show TRUE,
and all other cells in B should be FALSE (because when a function is not
explicitly assigned a return value, it should use default value of its return
type, which for Boolean is False). However, when applying the function, it only
shows FALSE in A1 and A2, and if you later re-calculate those cells, they will
become TRUE - as if the first calculated result gets stuck - very similar to
bug 143582.

Tested with Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 840b4eb2f3443ff883016e6a8a8ae49e9cbd9e4e
CPU threads: 12; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to