Bug 153077 - A ComboBox inserted into a spreadsheet and raising an onLosingFocus event doesn't pass the .Source correctly
Summary: A ComboBox inserted into a spreadsheet and raising an onLosingFocus event doe...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Macro
  Show dependency treegraph
 
Reported: 2023-01-17 21:36 UTC by Wolfgang Jäger
Modified: 2023-07-28 20:22 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Minimal demo of the bug (12.18 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-01-17 21:36 UTC, Wolfgang Jäger
Details
Add Annotation (12.76 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-01-24 13:00 UTC, TANAKA Hidemune
Details

Note You need to log in before you can comment on or make changes to this bug.
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.