Importing text from external sources with copy/paste is usually tricky because either you copy from screen rendition (e.g. from a browser in “raw mode”) or from some text processing format for which there may exist only an imperfect import filter (e.g. from M$ Word).
To alleviate most of the formatting problems, it is recommended to paste “unformatted text”. However, this creates the kind of problem you experience: lien ends are considered as end of paragraphs. Unfortunately there is no general solution because Writer cannot guess which line ends are due to distributing long paragraphs on several lines and which are really author-approved end of paragraphs.
There is no way to fully automate restoration of original paragraphs.
Edit
>Find & Replace
gives you some support but must of the job must be under user control so that the rest of the document is not damaged by the restoration attempt.
Edit
>Find & Replace
is used in Regular expressions mode (tick this check box).
In Find, enter $
($
is the code for “end-of-paragraph” while \n
is the code for line break which is entered as Shift
+Enter
– note that copying from external sources usually never pastes line breaks).
In Replace, enter a space.
To enumerate the various codes for regular expressions, push Help
and, in the page which opens, click on the link named “List of Regular Expressions”.
When the parameters are set, push Find Next
to scroll to the next occurrence and, if valid to replace, push Replace
. This will scroll to the next occurrence.
To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!
In case you need clarification, edit your question (not an answer) or comment the relevant answer.