Created attachment 110126 [details] Sample spreadsheet to reproduce the problem Description: I am trying to create a change listener (XModifyListener) and associate it with several cells (not the cell range, since I want the source object of the event to be the modified cell only). The macro executed creates a new sheet from a template (copyByName). Actual results: Depending on the version of LibreOffice and OS I run into various issues...: - On Linux with 4.3.4.1, LibreOffice simply crashes when the macro completes. - On Windows with 4.2.5.2, I continuously get the message "Protected cells can not be modified" and I have to forcefully kill LibreOffice. With the sample spreadsheet that I attached, it looks like I can sometimes modify one cell without running into the error, but it eventually fails on subsequent attempts. Note: the macro is working perfectly fine when it is not triggered by the listener... On the more complex spreadsheet that I am working on, I also noticed that the events are triggered when I delete the sheets with the DeleteSheet macro, even though this doesn't modify the cells associated with the listener (but will change other cells in the same sheet). Steps to reproduce the crash/error with the sample provided: - open the document. - run the macro 'AddChangeListener' (this adds a listener on Monitored.A1:A3) - modify any cell from Monitored.A1:A3 - a new sheet (a cpoy of the 'Template' sheet) should get created. => if there is no error/crash, try to modify another value, LO will eventually crash. Note that you can run the macros 'CreateSheet' and 'DeleteSheet' any number of times without any problem as long as they are not triggered by the listener (so if the macro is executed manually rather than by change the cell value).
I can reproduce crash with Version: 4.4.0.0.alpha2+ Build ID: d273a60bfdbf9bb7623bed38667ec0647753157c TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-11-20_03:05:21
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=1c43d48c62db766ffdf23e8f20ed07cbd7a660ee Resolves: fdo#86786 take of a copy of the MarkData It will be available in 4.5.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-4-4": http://cgit.freedesktop.org/libreoffice/core/commit/?id=76358a71a937b5af93e4257c0dd0c1cf0e9b7ab7&h=libreoffice-4-4 Resolves: fdo#86786 take of a copy of the MarkData It will be available in 4.4.0.0.beta3. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Seems to be ok after that change.