Bug 159134 - Forms Listeners stop working after a different sheet is activated
Summary: Forms Listeners stop working after a different sheet is activated
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.5.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-11 14:48 UTC by vibrationoflife
Modified: 2024-01-22 15:12 UTC (History)
1 user (show)

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 vibrationoflife 2024-01-11 14:48:57 UTC
Description:
I am putting together an example to demonstrate building a form from python.
The example automatically creates control and adds them to the spreadsheet.
Event listeners are added to the form controls.

Everything works fine until I select another sheet and then go back to the sheet that has the form controls.
Many of form control events no longer work. I even tried reattaching the events but no luck.

Interestingly some events still work such as property events using XPropertyChangeListener and spin events using XSpinListener

Other listeners such as XItemListener and XTextListener stop working after sheet regains focus.

More details and example links are found on ASK:
https://ask.libreoffice.org/t/calc-form-controls-stop-working-when-sheet-is-de-activated-why/100427



Steps to Reproduce:
1. Add a form control to a Calc Sheet
2. Attach a listener to the form control
3. Assert that event listener work ( it should )
4. Switch to another sheet
5. Switch to sheet that contains form.

Actual Results:
After switching back some listeners such as Other listeners such as XItemListener and XTextListener stop working.

Expected Results:
Listeners continue to work.


Reproducible: Always


User Profile Reset: No

Additional Info:
Also as noted in my post on ASK the model no longer are attached to the controls after switching to another sheet and back again.
Comment 1 elmau 2024-01-11 18:19:52 UTC
Confirm this bug in my system:

Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: 60(Build:1)
CPU threads: 16; OS: Linux 6.6; UI render: default; VCL: gtk3
Locale: es-MX (en_US.UTF-8); UI: en-US
7.6.4-2
Calc: threaded
Comment 2 Buovjaga 2024-01-22 15:12:23 UTC
NEW per previous comment.