Bug 167249 - LO 25.2.4.3 : Deleting a sheet destroys the variable containing the reference to the other sheet
Summary: LO 25.2.4.3 : Deleting a sheet destroys the variable containing the reference...
Status: RESOLVED DUPLICATE of bug 167178
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.2.4.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-26 16:32 UTC by Vladimir Sokolinskiy
Modified: 2025-06-26 16:38 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Sokolinskiy 2025-06-26 16:32:33 UTC
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
Comment 1 Mike Kaganski 2025-06-26 16:38:17 UTC

*** This bug has been marked as a duplicate of bug 167178 ***