On 2010/04/08 5:49 AM  Daniel Lewis wrote:
Dotan Cohen wrote:
I think the issue is that there are both true paragraphs and paragraphs
chopped apart by line wrapping into multiple pseudo-paragraphs when the text was copied from the web. The object is to remove the odd breakage points so
that the text can flow normally, obeying widow and orphan settings. The
extra paragraph breaks (but not the true ones), then, should be replaced with blanks. I can see how to do this, except it involves an Edit-Replace on
a selection of the text that excludes replacement of the true paragraph
breaks, which would be a real pain. But if I'm reading this right, there
would be no way to distinguish the two kinds of breaks automatically.
Hi Barbara. All of the<br>  were converted into paragraph breaks in
OOo. In my opinion, that is a bug. HTML specifies<p></p>  as paragraph
breaks and<br>  as line breaks, so pasted text should follow this
convention. I will file an issue.

There might be something more to this than meets the eye. Did you look at the original HTML of the text that you copied into Writer? I used SeaMonkey's Compose to create an HTML document with a paragraph containing line breaks:

<body>
<p>
The sly red fox jumped over the lazy brown dog.
</p><br>
<p>Mary had a little lamb<br>
Whose fleece was white as snow<br>
And everywhere that Mary went<br>
The lamb was sure to go.</p>
</body>

I then copied it into Writer (3.2), saved it, and extracted Content XML. The corresponding paragraph is:

<text:p text:style-name="Text_20_body">The sly red fox jumped over the lazy brown dog. </text:p><text:p text:style-name="Text_20_body"/><text:p text:style-name="Text_20_body"> Mary had a little lamb<text:line-break/>Whose fleece was white as snow<text:line-break/> And everywhere that Mary went<text:line-break/>The lamb was sure to go.</text:p>

In this case, every <br> was converted to <text:line-break/> which is what I think is suppose to happen. The paragraph breaks also were converted properly as well. This does not show the bug you seemed to have found. This is why I'm wondering about the HTML of the web page. In creating it, did someone use </p> for each line instead of <br> perhaps? I don't have the URL of the web page you copied, so I can not say for sure.

Dan

The results of pasting from a web page varies depending on the browser used.

If I past song lyrics from Safari or Opera, I get a blank line between each line. Raw source indicates <br> after each line.

If I use Firefox or Google Chrome, there is no blank line between each line.

I also tested pasting into iWork Pages. Copy from all browsers pasted without blank lines. Same result pasting into text editor (Text Wrangler).

OO.o gives different results when copying/pasting from different browsers on a Mac.

--

Larry I. Gusaas
Moose Jaw, Saskatchewan Canada
Website: http://larry-gusaas.com
"An artist is never ahead of his time but most people are far behind theirs." - 
Edgard Varese



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@openoffice.org
For additional commands, e-mail: users-h...@openoffice.org

Reply via email to