Bug 139986 - Some problems with "Delete spaces and tabs at beginning and end of paragraph" option in AutoCorrect
Summary: Some problems with "Delete spaces and tabs at beginning and end of paragraph"...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.2.0.0.alpha0+ Master
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: QA:needsComment
Keywords:
Depends on:
Blocks: AutoCorrect-Complete
  Show dependency treegraph
 
Reported: 2021-01-28 23:28 UTC by sdc.blanco
Modified: 2021-02-12 04:16 UTC (History)
1 user (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 sdc.blanco 2021-01-28 23:28:03 UTC
0. Tools > AutoCorrect > AutoCorrect Options - Options tab
   uncheck all [T] fields.  uncheck all [M] fields, except for 
   "Delete spaces and tabs at end and start of paragraph" 

1. Be sure to use "Default Paragraph Style" for all tests (because does not work with other PS)

2.  Make some paragraphs with spaces and tabs at beginning and end (dt F3 is handy)

3.  Tools > AutoCorrect > Apply  (can be handy to make a keyboard shortcut for testing)

Problems with Help

According to:  https://help.libreoffice.org/7.2/en-US/text/shared/01/06040100.html

Delete spaces and tabs at beginning and end of paragraph

Removes spaces and tabs at the beginning of a paragraph. To use this option, the Apply Styles option must also be selected. 

Two Problems.
H1.  For [M], do not need to use "Apply Styles"
H2.  Spaces and tabs at end are deleted (as the option says), but help page does not mention "end".


Problems with Implementation
I1. If a paragraph starts with a digit followed by a period (and with spaces/tabs), then spaces/tabs are removed, but the paragraph is assigned "Numbering 1" PS.  

I2.  If a paragraph starts with spaces or tab or both, it is converted to "First Line Indent" PS (with the spaces/tabs) removed.

In both these two cases -- given that the option is to remove spaces/tabs -- then it should not be changing to these PS.
    - the first is closer to "Bulleted and numbered lists" option, which is supposed to be for [T] only; 
    - I2 is particularly bad -- more or less undercutting the utility of the option. It has presupposed that a space or tab means an intention for First Line Indent, when a main reason to want to use this option is to remove spaces and tabs, not to convert to an indent!
    - no need to mention that otherwise this option converts to Text Body PS (bug 90507)

I3.  Paragraphs that consist only of spaces and tabs (in different combinations) do not have spaces and tabs removed (i.e., nothing seems to happen) 

     Expected (and desired) that the spaces and tabs are removed, because then AC could be used to "clean up" a document (or selection) that has empty paragraphs with spaces and tabs.


Have not tried to "exhaust" possible problems.  There may be others (e.g., some of the other options have trouble depending on the context (e.g., a blank before or not before), but this selection should be enough to motivate the need for a critical review of the operations of this option.  

It seems like a good thing to have an option (that can be applied manually, on a whole document or a selection) to remove tabs and spaces at the start and end of the paragraph -- and even better if it did what its label suggests.