Apache OpenOffice (AOO) Bugzilla – Issue 102333
Search and replace Empty paragraphs ends in a loop
Last modified: 2017-05-20 10:30:32 UTC
- New writer document - number of paragraphs, some with a word, some without - start Search and Replace - Find ^$ replace with \n, regular expression on - Replace All > freeze or loop with in between message: "You first have to disable the function Undo, to be able to do this action. Di you wnat to disable the function Undo? Yes | No | Cancel" Either of those options does not work
Created attachment 62621 [details] writer doc for my test
Created attachment 62622 [details] screenprint of message and search and replace dialog
Confirmed on Vista. @OS: didn't loop in 2.4. The step by step manual Find/Replace works find but the Replace All seems to do followings: - Found empty paragraph (^$) - *Doesn't replace but adds* an empty paragraph (\n) - Found empty paragraph (just added \n) an so on... At least this is what I can imagine when I stop the routing answering Cancel to the "Turn undo off" warning. The document then shows the word "first" at 1st paragraph followed with tons of empty paragraphs (I got 1112 pages after canceling!) @cornouws: for what I guess you want to achieve, don't write "\n" in Replace but leave the field empty :)
hi es, Thanks for your suggestion. Indeed it works.
Target changed to OOO Later.
@ es: Looking at this again, the current behaviour is logic. But the old one is a trick I learned some/long time ago from whatever documentation. Maybe the behaviour was changed by intention? I cheched the OLH and the linked wiki-pages, and that is not the source of my info. So no need to wory from that POV as well...
Why is the \n still adding a paragraph mark, while in the "search for" box, the symbol stands for a line break?
*** Issue 110026 has been marked as a duplicate of this issue. ***
*** Issue 114342 has been marked as a duplicate of this issue. ***
IMO a P2-loop is not worth targeting to "later"...
FWIW, one of the MS guys at OOoCon2010 was rather poking fun at writer for this, i.e. its an example trotted out to demonstrate OOo failings
See also issue 115528 "Freeze on simple Find/Replace involving formatting". Looks somewhat similar.
.
Setting target 3.4 as per http://www.openoffice.org/servlets/ReadMsg?list=releases&msgNo=16393
mine setting "regression" flag due to comment #3 by es
caused by a spurious cursor move in SwDoc::ReplaceRangeImpl. the following bug has the same root cause: 1. enter (new paragraph) 2. type "bar" 3. search&replace "^$" => "\nfoo" + regex, ReplaceAll 4. second para is now "foobar" 5. undo 6. second para is now "obar", not "bar"! 7. every redo+undo adds another "o"...
fixed in CWS sw34bf04 http://hg.services.openoffice.org/hg/cws/sw34bf04/rev/d98dd8128eb7
Verified in CWS sw34bf04.