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

            Bug ID: 170234
           Summary: Error in getDataArray method
           Product: LibreOffice
           Version: 25.8.3.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

Create a new file and execute the macro:

Sub Test()
  Dim oCell as Object, arr
  oCell = ThisComponent.Sheets(0).getCellByPosition(0, 0)

  oCell.String = Chr(9) & "0" & Chr(10)  
  arr = oCell.getDataArray()

  Msgbox Asc(Mid(oCell.String, 1, 1)) ' Shows 9
  Msgbox Asc(Mid(oCell.String, 2, 1)) ' Shows 48
  Msgbox Asc(Mid(oCell.String, 3, 1)) ' Shows 10

  Msgbox Asc(Mid(arr(0)(0), 1, 1))    ' Shows 1  : incorrect
  Msgbox Asc(Mid(arr(0)(0), 2, 1))    ' Shows 48 : correct
  Msgbox Asc(Mid(arr(0)(0), 3, 1))    ' Shows 10 : correct
End Sub

The macro shows that the getDataArray method incorrectly returns the value of
cell A1. The first character has been changed from U+0009 to U+0001.

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

Reply via email to