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

            Bug ID: 145069
           Summary: The return value of a Basic function is not
                    initialized
           Product: LibreOffice
           Version: 4.0.0.3 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: [email protected]
          Reporter: [email protected]

Description:
Consider the following snippet in a Calc document:

Function sheetNames As String

oDoc=thisComponent
sheets = oDoc.sheets
For i = 0 to sheets.Count-1
    sheetNames = sheetNames + sheets.getByIndex(i).Name
Next i

MsgBox sheetNames

End Function

Steps to Reproduce:
1. Open a Calc document
2. Press ALT+F11
3. Open the default module and copy/paste the above snippet
4. Execute it twice

Actual Results:
First time: Sheet1
Second time: Sheet1Sheet1

Expected Results:
First time: Sheet1
Second time: Sheet1


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.0.3 (x64) / LibreOffice Community
Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c
CPU threads: 6; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: CL

and in 

Version 4.0.0.1 (Build ID: 527dba6f6e0cfbbc71bd6e7b88a52699bb48799)

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

Reply via email to