Bug 139967 - "Ignore double spaces" option in AutoCorrect might be better labeled "prevent double spaces" - and behaves differently than Help page
Summary: "Ignore double spaces" option in AutoCorrect might be better labeled "prevent...
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 11:48 UTC by sdc.blanco
Modified: 2021-02-20 04:06 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 sdc.blanco 2021-01-28 11:48:39 UTC
According to: https://help.libreoffice.org/7.2/en-US/text/shared/01/06040100.html

   Ignore double spaces

   Replaces two or more consecutive spaces with a single space.


0. Tools > AutoCorrect > AutoCorrect Options - Options tab
   uncheck all [T] and [M] options, except for [T] options
   "Ignore double spaces"

1.  Make sure:  Tools > AutoCorrect > While Typing (is enabled)

2.  Used Default PS.

3.  Enter text, sometimes with double (or more) spaces.

Actual results:

1. Contra "help", no double spaces are replaced.  (also tried with Tools - AutoCorrect - Apply -- just in case....)

2. If there are "double" or "triple" spaces, they are flagged with blue ripple underlining -- no underlining with 4 or more spaces.

3. The "option" did not seem to have any effect on the grammar flagging.  That is, they appear (if only double or triple), regardless of the option setting. Does it have another function?

Not clear what the intended function is.  

Need to improve functionality (and align with help page).

(If the purpose is only to "ignore grammatical errors" then I wonder if it is worthwhile to "clutter" up the "options" with this trivial choice, given there are other "ignore" options).

Has been present since OOo 1.1.0
Comment 1 sdc.blanco 2021-02-02 01:49:27 UTC
Tried again with a new version installed.

"Ignore double spaces" might be better labelled  "Prevent double spaces".

If "Ignore double spaces" is enabled, and AutoCorrect > While Typing is Enabled.

then:

(a) if the cursor is on a space, then it is not possible to introduce additional spaces.

(b) if the cursor is in a text string, then it is possible to introduce one space, but not any more.

In short, with this option enabled, it is impossible to make more than one space.

Tested in Writer and Calc.

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 396c2ad2daad6fe6a11703d0ae1593929834afe2

Source code also comments it as "prevent double space"

https://opengrok.libreoffice.org/xref/core/editeng/source/misc/svxacorr.cxx?r=94306083#1312

Conclusions: 

1.  The documentation needs to be updated.  The current description was present in its initial check-in in 2004.

2.  The option was available in OOo 1.1.0

3.  Maybe ask UXEval on changing Option name to "Prevent double spaces"?
Comment 2 sdc.blanco 2021-02-02 14:21:48 UTC
From: https://opengrok.libreoffice.org/xref/core/officecfg/registry/schema/org/openoffice/Office/Common.xcs?r=35713de9#1374

<prop oor:name="RemoveDoubleSpaces" oor:type="xs:boolean" oor:nillable="false">
  <!-- OldPath: AutoCorrect/Options/All -->
  <!-- OldLocation: Soffice.cfg -->
  <!-- UIHints: Tools  AutoCorrect/AutoFormat  Options  Ignore Double
       Spaces -->
  <info>
    <desc>Specifies if multiple spaces should be combined into one.</desc>
    <label>Ignore double spaces</label>
  </info>
 <value>false</value>
</prop>

Was the intention to create a "removedoublespaces" function, and along the way, the vision changed to "prevent" double spaces, without a corresponding updating here in the registry  (which then got copied into Help?) 

If there is no intention for a "remove double spaces" function, then a friendly source code cleanup would be to rename "RemoveDoubleSpaces" to "PreventDoubleSpaces" and rename the "IgnoreDoubleSpace" flag ( include/editeng/svxacorr.hxx ), which is used in ( editeng/source/misc/acorrcfg.cxx  and cui/source/tabpages/autocdlg.cxx ) to something like "NoDoubleSpace"

cui/inc/strings.hrc  to change label of Option
Comment 3 sdc.blanco 2021-02-05 11:55:25 UTC
(In reply to sdc.blanco from comment #1)
> In short, with this option enabled, it is impossible to make more than one
> space.
Correction:  

   Cursor placed immediately after a character can always insert a space, even if
   there are multiple spaces after it.

(no opinion about whether "bug" or "feature" -- just an observation -- which some might consider a "workaround" for how to add spaces (albeit, one at a time).

Another observation:  

   Can use Tab key anywhere.