Bug 149763 - Lots of Spaces get suppressed, when a Paragraph mark is added after this Sample
Summary: Lots of Spaces get suppressed, when a Paragraph mark is added after this Sample
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.0.0 alpha0+
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-28 21:32 UTC by Adalbert Hanßen
Modified: 2024-02-10 17:54 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
bug report and sample to reproduce it (134.13 KB, application/vnd.oasis.opendocument.text)
2022-06-28 21:32 UTC, Adalbert Hanßen
Details
Example of the bug with screenshot. Can be reproduced in 6.4.4.2 (88.15 KB, application/vnd.oasis.opendocument.text)
2023-01-07 12:25 UTC, Adalbert Hanßen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adalbert Hanßen 2022-06-28 21:32:22 UTC
Created attachment 181008 [details]
bug report and sample to reproduce it

This bug happens in LibreOfficeWriter
Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 086055b0d7e44d1d07b3f23af55503e6a3924d87
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded

Consider the Preformattet Text sample in the attachment.
    1. Put the cursor after the last characters in the next paragraph (i.e. between // CellPrint and the paragraph mark after it.
    2. Keep an eye on the two, four or six blancs in front of many lines which make the indentation on page 2,
    3. Arrange the window such that you see upper parts of the Preformatted Text paragraph which is split by the page break between pages 2 and 3. If necessary, reduce the magnification to accommodate seeing the lower part of page 2 too.
    4. Then press Enter at the insertion point described in step 1. This should merely add a new paragraph of type Text body. But in addition, some of the spaces deliberately added for this special indentation get lost in the part on page 2. They happen to be the blue marked ones exactly on page 2, depending on where the page break actually is.
Comment 1 Adalbert Hanßen 2022-06-28 21:35:59 UTC
The same bug is also present in LibreOfficeWriter
Version: 6.4.4.2
Build-ID: 3d775be2011f3886db32dfd395a6a6d1ca2630ff
CPU-Threads: 4; BS: Linux 5.4; UI-Render: Standard; VCL: gtk3; 
Gebietsschema: de-DE (de_DE.UTF-8); UI-Sprache: de-DE
Calc: threaded

but after Ctl-z the suppressed spaces at the beginning of the affected lines are not shown in blue. But the bug is present there too!
Comment 2 Telesto 2022-06-29 08:06:54 UTC
Tools -> AutoCorrect -> Autocorrect Options -> Options -> Uncheck Delete spaces and tabs at end or start of line

The Autocorrect delivers sometimes undesired results, and worse the correction happens somewhere else compared area where you're editing

The feedback should be improved, IMHO. Autocorrect is sometimes really intrusive But how...?

Note:
I often run into the with the automatic markdown feature: typing /italic/ + space = italic + italic formatting.. Typing *bold* + space becomes bold with bold formatting
Comment 3 Adalbert Hanßen 2022-06-29 13:42:28 UTC
Telesto, thank you.

In fact, I had to uncheck four checkmarks (two for each case, [M] and [T]):

* Delete spaces and tabs at the beginning and end of paragraph
* Delete spaces and tabs at the end and start of line.

(Why the different order and different terms: *start and end of line* would be shortest and most logical for most of the world: from left to right.
Comment 4 Adalbert Hanßen 2022-06-29 13:51:10 UTC
I had marked this bug as resolved because it circumvents my problem. But that was probably a bit early:

Deleting spaces and tabs at the start or end of a line/paragraph seems to work only under special circumstances and under other circumstances it does not work: Especially it seems to quit its work when a paragraph spans a paragraph in which it would otherwise start working, as my attachment shows. 

Therefore I set this bug report back to unconfirmed, although my problem got solved by Telesto's comment.
Comment 5 Adalbert Hanßen 2022-06-29 13:53:09 UTC Comment hidden (obsolete)
Comment 6 Telesto 2022-06-29 15:13:20 UTC
@UX
Some feedback on comment 3 and comment 4 would be nice
Comment 7 Heiko Tietze 2022-06-30 08:18:57 UTC
(In reply to Adalbert Hanßen from comment #3)
> (Why the different order and different terms: *start and end of line* would
> be shortest and most logical for most of the world: from left to right.

Probably you start at the end of the line and continue at the beginning of the next. Don't know why but the offline help shows [M][T] and some information about the options but not the online version. Anyway, the help could be more informative here.

(In reply to Adalbert Hanßen from comment #4)
> ...seems to work only under special circumstances...

Cannot follow. Keep an eye on the "Apply Style" option.
Comment 8 Adalbert Hanßen 2022-07-01 10:49:53 UTC
Im my example, the lines with the paragraph style Preformatted Text were copied from a Mathematica session (Copy as>Plain text) and then they were inserted by Paste Special>Paste unformatted text into LO Writer.

Then I had marked all these lines and exchanged the paragraph marks (\p) at the ends of the lines by forced linefeeds (\n) with the extension AltSearch1.4.2 and I assigned the paragraph style "Preformatted Text" to it.

The benefit of doing so is that 

1. Ctl-↓ takes you to the beginning of the next paragraph, Ctl-↑ to the beginning of the current paragraph, which is quite convenient to handle in documents with text and code paragraphs,

2. rules breaking pages for orphans and widows are applied.

When LibreOfficeWriter applies any rule during page breaking only up to a page break happens and not for the rest of the same paragraph, this is definitely a glitch. It is not a major issue, rather a small one and here we have an example by which it can be reproduced.

I suspect that the history of how the line breaks inside the paragraph were created, i.e. whether I really pressed Shift-Enter at the end of the lines, doesn't really matter. As I know exactly how I came across the error, however, I'll add it here.
Comment 9 Heiko Tietze 2022-07-07 06:50:47 UTC
The topic was on the agenda of the design meeting.

There is no urgent need to change the order of items and/or the labels. And "special circumstances" and involvement of extensions makes it hard to follow and issue, so the generic answer is "autocorrection works". Please submit clear steps to reproduce reduced to the actual problem.
Comment 10 QA Administrators 2023-01-04 03:19:27 UTC Comment hidden (obsolete)
Comment 11 Adalbert Hanßen 2023-01-07 12:25:10 UTC
Created attachment 184514 [details]
Example of the bug with screenshot. Can be reproduced in 6.4.4.2

Fortunately this bug did not show up any longer with my example in the current development version:

Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: da3dd48eaf9086f8ab28d6a6655f9a638e51433a
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded

Unfortunately in the example given originally, the bug could not be observed because it already had happened when I stored the example. Unfortunately I don’t have the development version at hand, with which I first observed the bug. But I was able to reproduce it in the older 

Version: 6.4.4.2
Build-ID: 3d775be2011f3886db32dfd395a6a6d1ca2630ff
CPU-Threads: 4; BS: Linux 5.4; UI-Render: Standard; VCL: gtk3; 
Gebietsschema: de-DE (de_DE.UTF-8); UI-Sprache: de-DE
Calc: threaded

If somebody wants to reproduce it, attached is an example in which the bug shows up with 6.4.4.2. It also contains a screenshot of the situation before and after the bug has happened.
Comment 12 QA Administrators 2023-01-08 03:23:51 UTC Comment hidden (obsolete)
Comment 13 Dieter 2024-02-08 09:03:15 UTC
(In reply to Adalbert Hanßen from comment #11)
> Created attachment 184514 [details]
> Example of the bug with screenshot. Can be reproduced in 6.4.4.2
> 
> Fortunately this bug did not show up any longer with my example in the
> current development version:

So let's close this bug. Feel free to change it back to UNCONFIRMED, if you disagree. Please also test in LO 24.2
=> RESOLVED WORKSFORME
Comment 14 Adalbert Hanßen 2024-02-10 17:54:30 UTC
I tested my example from the bug report with 

Version: 24.2.0.3 (X86_64) / LibreOffice Community
Build ID: da48488a73ddd66ea24cf16bbc4f7b9c08e9bea1
CPU threads: 4; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded

and the bug did not show up again. During my test, both options dealing with spaces and tabs had checkmarks set for both columns were set, i.e. a total of four checkmarks. But the indentation of the lines before the page break did not change despite of this and Telesto's Comment 2.

I repeated the same test with the four checkmarks being removed: same result.