Created attachment 85179 [details]
An .odt file just containing this paragraph.
Words split & lines end too soon after deleting unwanted paragraph breaks at the end of every line.
Steps to reproduce:
I have created a document by scanning pages from various printed documents. As a result, there are paragraph breaks where I do not want them (i.e. at the end of every line). When I delete them, words split & lines end too soon.
PS I noticed that the style for the scanned text was Pre-formatted. So I changed it to Default using Edit>Replace. However, it made no difference to the word splitting. I've also tried using AutoText to correct it.
In a paragraph, words split & lines end too soon. In the example below, the word 'hand' is split over 2 lines & 'of' is at the end of a line when there is room for 'AKQJ10' (the first 2 lines displayed below is actually 1 line in Writer):
With a 5-card major suit in a 5-3-3-2 hand, open one of the major suit. Exceptionally, an otherwise suitable h
and with a weak 5-card major (not rebiddable: max 2 out of
AKQJ10) may be opened 1NT. All other balanced hands in the 12-14 HCP range are opened 1NT.
With a 5-card major suit in a 5-3-3-2 hand, open one of the major suit. Exceptionally, an otherwise suitable hand with a weak 5-card major (not rebiddable: max 2 out of AKQJ10) may be opened 1NT. All other balanced hands in the 12-14 HCP range are opened 1NT.
Operating System: Ubuntu
Version: 22.214.171.124 rc
I found this bug when using LibreOffice 3.5 (under Ubuntu Precise 64 bit). I've since upgraded to version 126.96.36.199 (using Ubuntu's Launchpad LibreOffice ppa) & the bug is still present. I was not able to specify 3.5 when submitting the bug. So I specified version 188.8.131.52 for both first encountered and current version of LibreOffice.
thanks for the report & the example file.
The problem that you see is due to 'hard spaces' (Insert > Formatting mark ...) that are in place between many words. E.g. in between 'AKQJ10)' and 'may' and 'be' etc.
They are grey for my settings.
So I think the problem comes from the scanning software that does this?
Hope this helps & regards,
NB When reporting a bug, it's the habbit that you enter the oldest known version with the bug in the version field. Just for future reference of course.
You state that the problem is due to 'hard spaces'. I have put hard spaces (i.e. non-breaking space) using Insert > Formatting mark into the document that I previously attached. When I do so a dot (centralised vertically i.e. not the same as a period) is NOT shown (by View > Nonprinting characters set ticked) at that position. Please try this yourself.
I therefore suggest that this is a bug, admittedly caused by having a paragraph break at the end of every line & then removing them by Edit > Replace etc.
Sorry, I forgot to mention that there are no 'hard coded' spaces (i.e. nonprinting spaces) in the previously attached document.
Created attachment 85193 [details]
screen print showing the spaces
the attachment you made is full with hard spaces. See the screen print pls.
Created attachment 85195 [details]
Example Screenshot of Displayed Document
Part of Writer Window
(In reply to comment #6)
there is an setting in Tools > Options > Writer > Formatting aid ...
I have set that for non-breaking spaces now, though it is partially equivalent to 'Nonprinting Characters' & 'Field Shadings' in View etc. It makes no difference to the display except to display shading i.e. there are no spaces at the end of lines as per your previous attachment.
Do you have Arial font installed?
I do have Arial font installed. I use it as my default font i.e. as the font in my default template. This document uses it throughout.
(In reply to comment #8)
> I have set that for non-breaking spaces now, though it is partially
> equivalent to 'Nonprinting Characters' & 'Field Shadings' in View etc. It
> makes no difference to the display except to display shading i.e. there are
> no spaces at the end of lines as per your previous attachment.
It helps when you add a normal space after e.g. " AKQJ10) "
In the offending paragraph, I've replaced the non-breaking spaces by standard spaces. The paragraph then did wrapping correctly. I need to do this throughout a document. But I didn't see a way, especially as I didn't see a way to identify a non-breaking space by means of a regular expression. I tried using a regular space in the Find & Replace, but that only found regular spaces. Is there a way od doing this replacement through a document, without laboriously doing it space character by character?
PS I still think there is a bug in the way that non-breaking space characters cause arbitrary line feeds. If they worked correctly, then offending paragraphs would only be on one line rather than multiple lines.
(In reply to comment #12)
> In the offending paragraph, I've replaced the non-breaking spaces by
> standard spaces. The paragraph then did wrapping correctly.
Sorry that I did not wrote that immediately. I thought that would be obvious.
> Is there a way od doing this replacement through a document,
> without laboriously doing it space character by character?
No idea by head. Pls try the regular support listed here ;)
I've just had to key in this comment again as my previous attempt seemed to collide with yours!
It was too obvious how to find (& replace) non-breaking spaces globally in a document. I simply copied a non-breaking space & pasted it into the 'Search for' text box (in the Find & replace popup). Another solution (of using \x00a0) did not work in 184.108.40.206, though it works in 220.127.116.11 (see http://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=23474).
I think that there should be an enhancement (or correction of an omission, depending on your point of view) in Writer to allow searching for non-breaking space (in the'Search for' text box in the 'Find & Replace' popup) using a Regular Expression: use of \s seems obvious. This expression could also be used to do replacement of something else by a non-breaking space (in the 'Replace with' text box in the 'Find & Replace' popup).
As I previously said, I still think there is a bug in the way that non-breaking space characters cause arbitrary line feeds. If they worked correctly, then offending paragraphs would only be on one line rather than multiple lines.