Description: When doing a search and replace (of italics in my case) in a cell, if one undoes the changes, reapplies them and undoes them again, the whole formatting of the cell disappears. Steps to Reproduce: 1.Apply search and replace (3 times for ex.) in a cell where italics (for ex.) are present (file provided below) 2. Undo the replacements 3. Redo the replacements 4. Undo them Actual Results: At this point the formatting of the cell disappears. Expected Results: Everything should remain the same except what is concerned by the search and replace undo and redo. Reproducible: Always User Profile Reset: No Additional Info: Version: 24.2.4.2 (AARCH64) / LibreOffice Community Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2 CPU threads: 8; OS: macOS 14.5; UI render: Skia/Metal; VCL: osx Locale: en-US (en.UTF-8); UI: en-US Calc: threaded
Created attachment 194779 [details] File on which to perform the test to reproduce
Created attachment 194780 [details] Video showing the bug (formatting disappears)
Created attachment 195093 [details] minimal sample ODT Thanks for the report. I can reproduce but I have attempted to create a minimal test file with more precise steps to pinpoint the issue. With the sample file attached here: 1. Open attachment 2. Open Find & Replace dialog (Ctrl + H) 3. In Find field: input a full stop (".") 4. Nothing in Replace field 5. Other fields not changed from defaults (no regular expressions, no use of Format...) 6. Click "Replace" twice (effectively only replacing one full stop) 7. Undo once 8. Redo once 9. Undo once Result: Paragraph in table cell now uses Palatino Linotype (fallback) font instead of the original Times-Roman (fallback) font; italic is lost. Note that Palatino Linotype is used outside the table, and is the default font for the paragraph style in use. Looks like the sequence simply removes all direct formatting from the table cell. Version: 24.2.4.2 (X86_64) / LibreOffice Community Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2 CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3 Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 70b3e128aef631e18e6451362c2e6315c28b857e CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Reproduced in OOo 3.3 -> inherited.
Reproduced on a document with no cells, formatting is removed from all paragraph: Steps: 0. Apply Find (regex on): (\s+)([\-|—|–]|\-{1,})([\x20]*)(.*?)([\x20]*)([\-|—|–]|\-{1,}) Replace: –$4– 1. Undo (cmd Z) 2. Redo (cmd shift Z) 3. Undo (cmd Z) 4. Formatting is gone
Created attachment 195427 [details] File with no cells
Created attachment 195428 [details] Video showing the bug