Bug 153077

Summary: A ComboBox inserted into a spreadsheet and raising an onLosingFocus event doesn't pass the .Source correctly
Product: LibreOffice Reporter: Wolfgang Jäger <jag>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: minor CC: buzea.bogdan, info, jag
Priority: medium    
Version: 3.3.0 release   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 107659    
Attachments: Minimal demo of the bug
Add Annotation

Description Wolfgang Jäger 2023-01-17 21:36:13 UTC
Created attachment 184721 [details]
Minimal demo of the bug

A comboBox is inserted into one of more spreadsheets of one document. 
There are assigned event handlers for "When receiving focus" and for "When losing focus". Both are given as Basic Subs here.

Both handlers are called as expected, but only the receive-handler gets always correctly passed the event with .Source including the .Source.Model. 

The lose-handfler only gets a correct event under some condition, in specific if the focus is passed to a cell of the sheet to which the control is anchored.
If the control loses the focus due to the user selecting a different sheet, the event is defective. 

The .Source claims to be an OComboBoxControl object, but its .Model is Null.

See attached demo.

The respective bug does not occur for all the FormControl types. A simple button e.g. is not afflicted.
Comment 1 TANAKA Hidemune 2023-01-24 13:00:36 UTC
Created attachment 184870 [details]
Add Annotation

Reproduced.
At least the combobox LostFocus seems to have a bug.