Bug 102009 - cant undo find and replace of paragraph characters
Summary: cant undo find and replace of paragraph characters
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.2.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Find-Search
  Show dependency treegraph
 
Reported: 2016-09-09 06:49 UTC by Tim Chambers
Modified: 2016-10-17 03:18 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Chambers 2016-09-09 06:49:43 UTC
I often have a situation where I copy text from a PDF (generated by others out of my control) to a writer document. This results in multiple sentence fragments forming separate paragraphs instead of a single paragraph (each line in the PDF comes across as a paragraph rather than a carriage return).

It is convenient to use Find and Replace with regular expressions to search for the end of each line ($) in the copied text (except the last) in a highlighted series of these small paragraphs and replace it with a space (' ') to rejoin these paragraphs.

Should this go wrong and through user error be applied to the whole document due to a failure to select a section of text properly, the entire document becomes a single line of text (expected behaviour). However, it does not seem possible to undo and I have had to revert to saved versions in the past.
Comment 1 Buovjaga 2016-10-13 09:52:33 UTC
I think you might be running out of your undo stack. I tried it by copying your description and using it as a test content. I could undo just fine.

I'm in a hurry, so can't research how to raise the limit. I only found this with a web search, but the option isn't there anymore: Tools>Options>LibreOffice>Memory>Number of steps
Comment 2 Tim Chambers 2016-10-14 03:45:15 UTC
That is possible - the documents I have experienced this with have been large (50 pages of text or more).
Comment 3 Buovjaga 2016-10-14 10:54:33 UTC
I got advice that it is under Tools - Options - Advanced - Expert config. Then search for Undo and look for org.openoffice.Office.Common. It has a property "Steps". Edit it and raise it accordingly. Be sure to have enough memory..
Comment 4 Buovjaga 2016-10-14 10:57:27 UTC
I got comments from Cloph on IRC:
There's a combine-single-line-paragraphs autocorrect feature... 
should work better than search end-of-line and replace with a space, and will avoid messing up the whole document.
and of course you could enable track changes and undo with that as well. 

I will close this, if you don't mind.
Comment 5 Tim Chambers 2016-10-17 03:18:44 UTC
Thanks!


I had no idea about that autocorrect option. It is, indeed, a much better solution.