Bug 81301 - "apply border" won't work because of "hyphen" to "en-dash" autocorrect collision (nl-NL and nl-BE locales only)
Summary: "apply border" won't work because of "hyphen" to "en-dash" autocorrect collis...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Linguistic (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.3.0
Keywords:
: 80824 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-07-13 17:34 UTC by pieter kristensen
Modified: 2016-09-24 05:58 UTC (History)
6 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 pieter kristensen 2014-07-13 17:34:52 UTC
Problem description: 

Steps to reproduce:
1. With a default user profile type three or more hyphens (-) and then press enter

Current behavior:
The hyphens remain

Expected behavior:
LibreOffice draws a line because in a default setting the option "apply border" in "Tools - AutoCorrect Options - Options" is activated.

The reason this behaviour occurs is that the upper option in the "replacement table" (replace - by _) spoils it. It immediately replaces --- with _-- and then the "apply border" function won't go.
It takes a lot of time to figure this out and remove the upper issue from the "replacement table". 

           
Operating System: All
Last worked in: 4.2.5.2 release
Comment 1 Cor Nouws 2014-07-13 20:21:45 UTC
*** Bug 80824 has been marked as a duplicate of this bug. ***
Comment 2 Cor Nouws 2014-07-13 20:23:01 UTC
Hi Pieter,

Can confirm this.
Wasn't this discussed on the Dutch user list?
What would be your suggestion to solve this? Remove the autoreplacement option?
thanks,
Cor
Comment 3 pieter kristensen 2014-07-14 06:09:25 UTC
Exactly, it was discussed on the Dutch mailinglist. At least I brought it in on may fourth 2014 (vreemde samenloop). But it seemed more productive to create a bug of it.
I haven't tested if the bug occurs only in the Dutch version of LO.
Comment 4 pieter kristensen 2014-07-14 07:33:53 UTC
A possible solution could be to not make autoreplace work if three or more dashes ( --- ) stand behind each other. Who would want it to work in such circumstances?
It's only a suggestion.
Comment 5 Kevin Suo 2014-07-15 13:49:00 UTC
I see the version field is set 4.2.5.2, but the comment says it last works in 4.2.5.2. which version exactly does it not work?

I also see in Bug 80824 that the version which does not work should be 4.1.1.2. If that is true:
* Please upgrade to 4.1.6, which is the latest stable version. If it works in 4.1.6, the status should be WORKSFORME.
* If it doed not work in 4.1.6, the status should be WONTFIX, because 4.1.6 is EOL. You should either use a workaround or upgrade to 4.2.*.
Comment 6 tommy27 2014-08-15 14:09:19 UTC
hi there. the triple hyphen is again a possible source of autocorrect issues.

some people (including me) tried to use it as a replacement for "em-dash"  and have seen autocorrect conflicts with concurrent double-hyphen as a replacement of "en-dash" (see the long discussion at bug 55292)

anyway I wonder why a "replace - by _" has been introduced in the Dutch version... can anybody explain me? I'm curious...

In my italian keyboard layout the hyphen and underscore are in the same key and can easily switched using the shift. is the situation different in the Dutch layout?
Comment 7 pieter kristensen 2014-08-15 15:18:33 UTC
I totally agree. I may be not a real power user but I never had the need to replace "-" by "_". To do this automatically in my vision fills a non existing need or worse: it is confusing.
Comment 8 tommy27 2014-08-18 13:31:36 UTC
I totally agree with you... I wonder what's the rationale of a "-" by "_" replacement which I see is only present in the autocorrect list for Nederland languages like acor_nl-NL.dat and acor_nl-BE.dat  (edited summary notes)

I'd like to hear feedback from Cor Nouws.
I think that such an autocorrect replacement like that should be removed (and it would be a very easy hack) but I need to know the opinion of a Dutchman first.
Comment 9 Cor Nouws 2014-08-18 15:47:40 UTC
(In reply to comment #8)
> I'd like to hear feedback from Cor Nouws.
> I think that such an autocorrect replacement like that should be removed
> (and it would be a very easy hack) but I need to know the opinion of a
> Dutchman first.

Thanks Tommy. BTW: Pieter is Dutch too...

I don't have a problem to remove that autocorrect item at all. But do we know why it was added (always a good question before attempting to remove something :) )
Maybe Lázsló knows this ??
Comment 10 tommy27 2014-08-19 14:23:49 UTC
Hi Cor, 
I knew Pieter is Dutch and he already said he doesn't see the reason for that "-" to "_" replacements. I asked your advise to hear a second opinion from a well known member of the Dutch community.

anyway I have inspected the acor_nl-NL.dat file which contains the autocorrect replacements for your language and I see that the replacement is not exactly "-" to "_" (hyphen -> underscore) like Pieter wrote but rather "-" to "–" (hyphen -> en-dash)

I have no knowledge of Dutch grammar and which are the cases you need an hyphen rather than an en-dash in your language, anyway that kind of autocorrect replacement still looks to me as a source of potential conflicts.

as far as I know, there's no keyboard layout including the en-dash character "–" and the trend to obtain that is to set a double hyphen to en-dash autocorrect entry like "--" to "–"  (see also Bug 55292).

the current Dutch replacement seems unwise to me because it basically remaps the hyphen key to an en-dash and it makes basically impossible for a dutch to type a discreet hyphen " - " in a document... moreover has Peter noticed, it has conflicts with the triple hyphen pattern to draw an horizontal border.

this "hyphen to en-dash" Dutch autocorrect entry is not a new thing... I can trace it back to LibO 3.3.3 and OOo 3.3.0 as well so it's inherited from OOo and I think that Lazlo Nemeth has nothing to do with it (BTW is he Dutch? I thought he was Hungarian).

so my suggestion is to adopt the "double hyphen to en-dash" rule in Dutch locale as well to mimic what has already been done in other languages as well (I see that replacement already in French, Spanish, English and German autocorrect lists).

that would probably avoid conflict and make the Dutch autocorrect consistent with other languages as well.

my opinion and that we need to uniform the autocorrect entries for special characters like en-dash, em-dash etc. etc. in all languages as well.

please discuss this with other members of the Ducth and Belgian community, since that replacement is present in acor_nl-NL.dat and acor_nl-BE.dat files.
Comment 11 tommy27 2014-08-25 06:05:41 UTC
another Dutch autocorrect collision due to the "hyphen to en-dash" replacement is that when you type --> instead of the expected conversion to → you will get –->
Comment 12 QA Administrators 2015-04-01 14:47:02 UTC Comment hidden (obsolete)
Comment 13 pieter kristensen 2015-04-01 18:17:07 UTC
This issue is still present in version 4.4.2.2.
Comment 14 tommy27 2015-04-01 18:54:06 UTC
bug was confirmed a lot of time ago, hence status is NEW

I think the Dutch team should get rid of that autocorrect entry which is causing the problem
Comment 15 Cor Nouws 2015-04-01 19:13:42 UTC
Hi tommy,

(In reply to tommy27 from comment #10)
> so my suggestion is to adopt the "double hyphen to en-dash" rule in Dutch
> locale as well to mimic what has already been done in other languages as
> well (I see that replacement already in French, Spanish, English and German
> autocorrect lists).

They just removed it from the autocorrect list?
Comment 16 tommy27 2015-04-01 19:50:53 UTC
those other language never had such illogic "replace - by _" autocorrect entry
only dutch locales have it from OOo era, I don't know why.
Comment 17 Cor Nouws 2015-04-01 20:17:46 UTC
(In reply to tommy27 from comment #16)
> those other language never had such illogic "replace - by _" autocorrect
> entry
> only dutch locales have it from OOo era, I don't know why.

It's not about replacing a dash with a under score.
It is  about replacing a dash with a em-dash.
Comment 18 tommy27 2015-04-01 20:21:27 UTC
ok whatever... anyway as other language do, use 2 dash to obtain an em-dash
the single dash replacement causes conflicts
Comment 19 Cor Nouws 2015-04-01 20:34:49 UTC
We could add the option to the tab "Localized options" ??
Comment 20 pieter kristensen 2015-04-02 05:30:09 UTC
A tab for localized options could be good. But what this bug is about is not a localized option but an erratic option that serves no purpose and simply should be removed.
Comment 21 tommy27 2015-06-18 22:32:51 UTC
I agree with previous comment.

it would be easier to remove that "hyphen" to "en-dash" autocorrect entry from the dutch and belgian autocorrect lists rather than implementing a new localized options.
Comment 22 tommy27 2015-07-28 04:59:35 UTC
CC'ing Sophie Gautier

would you please tell us who's the localization maintainer of the nl-NL and nl-BE locales?

as said in previous comments this bug would be easily fixed by just removing the "hyphen" to "en-dash" autocorrect entry from the dutch and belgian default autocorrect lists which are still shipped into LibO (tested with LibO 5.1 alpha too)
Comment 23 QA Administrators 2016-09-20 10:17:57 UTC Comment hidden (obsolete)
Comment 24 tommy27 2016-09-24 05:58:06 UTC
fixed as side effect of the committ that solved Bug 83037

thanks again Caolan, your patch fixed 3 bugs at a time (Bug 55292 too).

backport to 5.2.x would be appreciated.