[Libreoffice-bugs] [Bug 141619] New: Undoing of Replace All operation leaves a "dirty" spreadsheet, force recalculation needed

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Apr 11 05:54:21 UTC 2021


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

            Bug ID: 141619
           Summary: Undoing of Replace All operation leaves a "dirty"
                    spreadsheet, force recalculation needed
           Product: LibreOffice
           Version: 5.2.7.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: plateauwolf at qq.com
            Blocks: 105948

Created attachment 171096
  --> https://bugs.documentfoundation.org/attachment.cgi?id=171096&action=edit
Sample file

This is a bug report translated and forwarded form a Chinese LO user chat
group.

Description:
When "Replace All" is done for a certain column, and then immediately "Undo",
some cells containing a formula related to the replaced cells are not properly
undone.  The displayed result for these cells are still using the replacement
string, not the original string.  A forced recalculation is needed to restore
the whole spreadsheet to the state before "Replace All".

Steps to Reproduce:

1. Open the attached sample ODS file.  There are some Chinese text in them but
they are not involved in testing, so not displaying them correctly (encoding or
font issues) are not critical.  Make sure menu Data > Calculate > AutoCalculate
is enabled;

2. Click on the column header "A", the whole column is selected;

3. Open "Find and Replace" dialog by either menu Edit > Find and Replace... or
shortcut Ctrl+H.  Type "A004" in Find field, "ABCD" in Replace field, check
"Current selection only" if it's not already enabled, leave all other options
(the ones under Find field, as well as all others under "Other options")
unchecked;

4. Press "Replace All" button, if search results dialog is enabled, it should
pop up and tell you 270 cells are replaced.  Close this search result dialog,
then also close search and replace dialog;

5. Now all the cells in column A should show "ABCD", either directly replaced
by step above or as a result of a formula calculation.  You can also see that
data in column B and column O also changed;

6. Undo the "Replace All" operation, either by menu Edit > Undo: Replace or
shortcut Ctrl+Z;

7. Observe that while cell A2 is correctly redone back to "A004", cells A3, B2,
O2 and many others still contain "ABCD";

8. Force re-calculation of the whole sheet by either menu Data > Calculate >
Recalculate Hard or shortcut Ctrl+Shift+F9, now all cells show "A004" like the
original state.

Expected Result:
Undo operation reverts all changes caused by Replace All, no forced
re-calculation needed.

Additional Information:

I reproduced this bug in (slightly old) 7.2 daily build, 7.1.1, and various
versions back to 5.2.7 (the oldest I have installed):

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 722ec600e85cca2e94e82e69f8d13773061172b9
CPU threads: 2; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: zh-CN (zh_CN); UI: zh-CN
Calc: threaded
---
Version: 7.1.1.2 (x64) / LibreOffice Community
Build ID: fe0b08f4af1bacafe4c7ecc87ce55bb426164676
CPU threads: 2; OS: Windows 10.0 Build 19041; UI render: default; VCL: win
Locale: zh-CN (zh_CN); UI: zh-CN
Calc: threaded
---
Version: 5.2.7.2 (x64)
Build ID: 2b7f1e640c46ceb28adf43ee075a6e8b8439ed10
CPU Threads: 2; OS Version: Windows 6.19; UI Render: default; 
Locale: zh-CN (zh_CN); Calc: group

The original reporter also claims to reproduce on Deepin Linux (exact version
information not yet available).

The exact cells that are not properly reverted by undo seems to change a little
each time I test, maybe due to version differences, or just variations between
different tests.  However cell A3 and B2, and all the other initially visible
affected cells (by "affected", I mean containing a formula that concerns cells
with the replaced "A004" string) are always wrong.  Other cells that are not
initially visible and need scrolling to see may be correctly reverted to
"A004".


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=105948
[Bug 105948] [META] Undo/Redo bugs and enhancements
-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210411/43f4a7ea/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list