https://bugs.documentfoundation.org/show_bug.cgi?id=99975

            Bug ID: 99975
           Summary: Problem Concerning Undo Manager
           Product: LibreOffice
           Version: 4.4.7.2 release
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: sgre...@yahoo.com

Created attachment 125198
  --> https://bugs.documentfoundation.org/attachment.cgi?id=125198&action=edit
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to