Created attachment 125198 [details] Problem Sample Problem Concerning Undo Manager Problem originally found on: Version: 5.1.3.2 Build ID: 644e4637d1d8544fd9f56425bd6cec110e49301b CPU Threads: 4; OS Version: Linux 4.4; UI Render: default; Locale: en-US (en_US.UTF-8) Also tested with the following on the same system: v4.4.7.2 v5.0.6.3 v5.2.0.0 alpha 05/19/2016 All packages were X86_64 deb Sheet Annotations insert & removeByIndex(x) is changing Undo isLocked from True to False & it cannot be set back to TRUE unless the document is closed & re-opened. Using sheet Annotations: 1. Undo manager is set to .lock() 2. Call to insert new sheet annotation 3. no Undo is set for the inserted item – this is expected 4. checked .isLocked() - now set to FALSE – should not be 5. Next call to insert new sheet annotation 6. Undo is set for the inserted item – this is not what is wanted 7. If Undo manager is set to .lock() at this point, .isLocked remains at FALSE To reset you must close the document & re-open Using the same scenario as above, if Undo is set to .unlock() before the insert, it can be set to .lock() after the insert. .clear() wipes all Undo’s. No way to wipe just the last undo, otherwise this would be a workaround. Almost the same holds true for .removeByIndex(x). Can set lock after first remove but is frozen after that. See tests below. Using .setString(sSomeText) from cell annotation on an existing annotation, has no affect on Undo manager but you cannot insert or remove an annotation from the cell object. Need this to keep Undo preserved prior to macro which can insert/delete hundreds (and potentially thousands) of items, thus wiping out any previous undo data. Having no problem with other operations such as inserting/deleting rectangles. Also, I am using annotations so I can quickly locate the affected cells. The attached sample demonstrates the problem. Toolbar (Annotation Bug) provided for macro execution. Insert – Test 1 This macro inserts comments in A1:A4. Before each insert, Undo is set to unlock and after each insert Undo is set to lock. Shows Undo can be locked after an annotation insert if it is NOT locked before the insert. Undo is set to unlock at the end of the macro. Insert – Test 2 This macro inserts comments in A1:A4. Before the FIRST insert, Undo is set to lock and after each insert Undo is again set to lock. Shows Undo CANNOT be locked after an annotation is inserted if it IS locked before the insert. Undo is set to unlock at the end of the macro. Running Insert #1 after Insert #2 or Remove #2 will show all FALSE results. Only way to reset is close document & re-open. Remove – Test 1 Run Insert – Test 1 first to set comments. This macro removes comments in A1:A4. Before each remove, Undo is set to unlock and after each remove Undo is set to lock. Shows Undo can be locked after an annotation is removed if it is NOT locked before the removal. Undo is set to unlock at the end of the macro. Remove – Test 2 Run Insert – Test 1 first to set comments. This macro removes comments in A1:A4. Before the FIRST remove, Undo is set to lock and after each remove Undo is again set to lock. CAN set lock after first remove but frozen after that. Shows Undo CANNOT be locked after an annotation is removed if it IS locked before the removal. Undo is set to unlock at the end of the macro. Running Remove #1 after Insert #2 or Remove #2 will show all FALSE results. Only way to reset is close document & re-open. Manually inserting/deleting comments seems to have no affect on the Undo flag.
I just discovered something that may narrow down the problem. If you issue a oUndoManager.unlock() when islocked is already FALSE, you will get an error. If you issue a oUndoManager.lock() when isLocked is already TRUE, you get NO error and the problem begins immediately. This indicates there may be two problems. 1) the ability to set lock when it is already set (unlike unlock) 2) the possibility in Annotations .lock & .unlock are being used within
Created attachment 125218 [details] bt with symbols On pc Debian x86-64 with master sources updated today, I could reproduce this. I attached a bt which may help to have a starting code pointer.
I submitted a patch for master sources (future 5.2.0) to review here: https://gerrit.libreoffice.org/#/c/25325/ I'm not sure it's ok but the behavior seemed to me better with it.
The patch seems wrong so I abandonned it. Certainly someone else will help here.
Taking a different approach in my project, I discovered this problem also occurs when changing 'UserDefinedAttributes' in a Cell. Again, if not unlocked before changing the attributes, Undo Manager will remain unlocked until the document is closed and re-opened. It is exactly the same scenario as Annotations.
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present on a currently supported version of LibreOffice (5.4.1 or 5.3.6 https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug-20170901
Just retested using v5.4.1.2 on Linux Mint18.2 and problem is still present.
This bug is still present in Beta of: Version: 6.0.0.1 Build ID: d2bec56d7865f05a1003dc88449f2b0fdd85309a CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk2; Locale: en-US (en_US.UTF-8); Calc: group
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
Dear Stang, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
Dear Stang, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug