Bug 103308 - Indented line, dash, enter
Summary: Indented line, dash, enter
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-18 09:30 UTC by Butch
Modified: 2017-04-04 16:43 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Butch 2016-10-18 09:30:55 UTC
This can easyly be reproduced:
Tab, -- to produce a dash, tab, some text, enter.

The result should look like this:
   – Some text.

However, enter removes the first tab, so the result is:
– Some text.
Comment 1 Butch 2016-10-19 06:27:43 UTC
Correction: The bug is not connected only to dash!

The same happens with:
tab, a number, dot, space, some text, enter
with the desired result:
   3. Some text.

Enter changes this to
3. Some tex.
Comment 2 tommy27 2016-10-19 16:30:08 UTC
reproducible under Win7x64 using LibO 5.1.5.2
Comment 3 V Stuart Foote 2017-02-16 14:41:25 UTC
Not a bug, just the Autocorrect defaults.

When you uncheck defaults from Tools -> Autocorrect -> Autocorrect Options: Options tab

"Delete spaces and tabs at beginning and end of paragraph"
"Delete spaces and tabs at end and start of line"

you get the formatting behavior you want of not removing leading white space.
Comment 4 Butch 2017-02-16 16:18:39 UTC
Very interesting, thank you very much, VSF!!!

However, there is still a question regarding the behavior of this autocorrect option:

With activated options:
"Delete spaces and tabs at beginning and end of paragraph"
"Delete spaces and tabs at end and start of line"

the tab at the beginning of a paragraph is removed in these cases:

tab, -- to produce a dash, tab, some text, enter
tab, a number, dot, space, some text, enter

BUT NOT in this simple case:

tab, some text, enter

???
Comment 5 V Stuart Foote 2017-02-16 21:23:48 UTC
(In reply to Butch from comment #4)
> ...
> However, there is still a question regarding the behavior of this
> autocorrect option:
> ...
> NOT in this simple case:
> 
> tab, some text, enter
> 
> ???

Yes I see the same. Suspect it lives down in the editengine, while in sw the handling for the Autocorrect options are:

action to remove leading or trailing blanks are defined here
http://opengrok.libreoffice.org/xref/core/sw/source/core/edit/autofmt.cxx#1078

Spaces are defined to include \t and " "
http://opengrok.libreoffice.org/xref/core/sw/source/core/edit/autofmt.cxx#151

called from
http://opengrok.libreoffice.org/xref/core/sw/source/core/edit/autofmt.cxx#698

They look like they should handle the "tab, some text, enter" case. Unfortunately I am unable to trace and find the exception affecting that formatting. Significant? Not really, seems kind of a corner case that actually does what most would expect to retain the leading \t or " " indent before simple text.

The main issue in OP was that removal is set on by default--disabling its autocorrect option still functions as intended (mostly).