Bug 152340

Summary: Capitalize Every Word operation creates gazillion undo entries, when change tracking is enabled
Product: LibreOffice Reporter: Mike Kaganski <mikekaganski>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: dgp-mail, telesto
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=140731
https://bugs.documentfoundation.org/show_bug.cgi?id=153163
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 83946    

Description Mike Kaganski 2022-12-01 13:15:15 UTC
1. Create a new text document
2. Type lorem
3. Press F3
   => a "Lorem ipsum" 3-paragraph autotext is inserted
4. Edit->Track Changes->Record
5. Select all (Ctrl+A)
6. Format->Text->Capitalize Every Word
7. Undo (Ctrl+Z)
   => only the second word ot the last paragraph ("velit") gets restored.
8. Look at undo list (in the Undo button's drop-down)
   => tens of Delete "foo" entries there. Why "Delete", not "Replace", by the way?
9. Press and hold Ctrl+Z to undo one-by-one everything.
   => it only undoes the last paragraph and a small part of the second paragraph, because undo stack ends (org.openoffice.Office.Common/Undo/Steps is 100 by default).

Compare to what UPPERCASE does: when executed in step 6 instead of Capitalize Every Word, it creates three undo operations, one for each paragraph. Well, also not ideal, but per-paragraph is way better than per-word.

Ideally, it would be best to have the same single undo operation that appears when change tracking is not used. But at least, make it no worse than UPPERCASE.
Comment 1 Dieter 2022-12-16 07:46:39 UTC
I confirm it with

Version: 7.5.0.0.beta1 (X86_64) / LibreOffice Community
Build ID: 3aca23eec42e9d6fbe57071d7633ae1fc4bc5fcc
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (de_DE); UI: en-GB
Calc: CL threaded

Works as expected without recording changes.
Comment 2 Telesto 2023-01-23 15:11:23 UTC
No tracking of Capitalize Every Word in
Versie: 6.3.0.4 (x86)
Build ID: 057fc023c990d676a43019934386b85b21a9ee99
CPU-threads: 4; Besturingssysteem: Windows 6.3; UI-render: GL; VCL: win; 
Locale: nl-NL (nl_NL); UI-taal: nl-NL
Calc: CL