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

            Bug ID: 158833
           Summary: Deleting a sheet destroys the variable containing the
                    reference to the other sheet.
           Product: LibreOffice
           Version: 7.6.4.1 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: so...@comec92.ru

Run macro (on a clean profile):

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

 ' The document now contains 3 sheets: Sheet1, Sheet2, Sheet3
 oSheet=oSheets.getByName("Sheet2")
 oSheets.removeByName("Sheet3")
 Msgbox oSheet.AbsoluteName  ' Shows: $Sheet2.$A$1:$Sheet1.$XFD$1048576
End Sub

Result: the unthinkable $Sheet2.$A$1:$Sheet1.$XFD$1048576

In 7.4.3.2 version the result is normal: $Sheet2.$A$1:$XFD$1048576

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

Reply via email to