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

            Bug ID: 167249
           Summary: LO 25.2.4.3 : Deleting a sheet destroys the variable
                    containing the reference to the other sheet
           Product: LibreOffice
           Version: 25.2.4.3 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

Run macro (on a clean profile):

Sub Test
 Dim oDoc, oSheets, oSheet2
 oDoc = StarDesktop.LoadComponentFromUrl("private:factory/scalc", "_blank", 0,
Array())
 oSheets=oDoc.Sheets
 Do While oSheets.Count<2
   oSheets.insertNewByName "Sheet" & (oSheets.Count+1), oSheets.Count
 Loop  
 oSheets(0).Name="Sheet1"

 ' The document now contains 2 sheets: Sheet1, Sheet2
 oSheet2=oSheets.getByName("Sheet2")

 Msgbox oSheet2.AbsoluteName        ' Shows: $Sheet2.$A$1:$XFD$1048576
 oSheets.removeByName("Sheet1")
 Msgbox oSheet2.AbsoluteName        ' Shows: #REF!:$XFD$1048576

End Sub

Result of second Msgbox : #REF!:$XFD$1048576

In 24.2.3.2 version the result of second Msgbox is normal: 
$Sheet2.$A$1:$XFD$1048576

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

Reply via email to