Bug 94911 - Autocorrect: em dash doesn't form after closing parenthesis
Summary: Autocorrect: em dash doesn't form after closing parenthesis
Status: RESOLVED DUPLICATE of bug 155407
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-09 14:02 UTC by Bruno Beltran
Modified: 2023-06-27 05:47 UTC (History)
5 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 Bruno Beltran 2015-10-09 14:02:33 UTC
Normally, the insertion of two regular dashes "--", (HTML --) when the previous character is part of a regular word will result in the two regular dashes automatically being converted to an "em" dash--the long dash used in English to set off long tangential components of the sentence, such as this one--after another word and a space is inserted. If, however, the previous character is a closing parenthesis, the em-dash is not formed. 

In other words, typing
asdf--asdf<space>
will cause the two dashes to become an em dash, but typing
some stuff (I guess)--asdf<space>
will not trigger the conversion.

This is a bug and Microsoft Word has correctly converted the dash in the latter situation for some time now.

Thank you for your attention, please let me know if more detail is required.
Comment 1 Buovjaga 2015-10-09 16:30:13 UTC
Not reproduced. Linux-only, perhaps. Will have to test later.

Win 7 Pro 64-bit, Version: 5.0.2.2 (x64)
Build ID: 37b43f919e4de5eeaca9b9755ed688758a8251fe
Locale: fi-FI (fi_FI)
Comment 2 Bruno Beltran 2015-10-09 17:30:07 UTC
Just found an additional condition. There has to already be an em dash present in the document, or something along those lines. 

To reproduce, type:
asdf--as df)--asdf<space>

The first one should become an em dash but not the second.

Sorry for the misleading first report.
Comment 3 Buovjaga 2015-10-09 19:06:04 UTC
Thanks, could repro.

Win 7 Pro 64-bit, Version: 5.0.2.2 (x64)
Build ID: 37b43f919e4de5eeaca9b9755ed688758a8251fe
Locale: fi-FI (fi_FI)

4.3.0.1
Comment 4 tommy27 2016-10-11 20:13:16 UTC
issue reproducible under Win8.1 x64 too, using LibO 5.3.0.0.alpha0+
Build ID: e2f6c7f0d0cc14f851d7028ff846c5dc658a81c6
CPU Threads: 4; OS Version: Windows 6.29; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-10-10_23:08:02
Locale: it-IT (it_IT); Calc: group

you need to have "Autocorrect\Autocorrect Options...\Options\Replasce dashes" setting on to see the bug.

a workaround is to use wildcard autocorrection and set this entry:

Replace 
.*)--.*

with:
em dash

that should overcome the issue with closing parenthesis.

another workaround is to disable "Replace dashes" at all and use an even simpler autocorrect rule such as:

Replace 
.*--.*

with:
em dash


some people however would prefer to use:
.*--.* for en dash
and
.*---.* for em dash
Comment 5 QA Administrators 2017-10-23 14:09:22 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2021-01-18 04:08:32 UTC Comment hidden (obsolete)
Comment 7 Bruno Beltran 2021-01-18 22:01:59 UTC
Just commenting in response to the auto-QA bot, this bug is still present in the latest libreoffice for arch

Version: 7.0.4.2
Build ID: 00(Build:2)
CPU threads: 16; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
7.0.4-3
Calc: threaded

Cheers,

Bruno
Comment 8 Coburn Ingram 2021-05-13 17:58:27 UTC Comment hidden (off-topic)
Comment 9 spikeof65 2023-02-03 19:00:44 UTC Comment hidden (off-topic)
Comment 10 Stéphane Guillou (stragu) 2023-06-27 05:47:54 UTC
That was already the case in OOo 3.3, so it is inherited:

(a)--a<enter> would work
(a a)--a<enter> wouldn't

However, it is now fixed in:

Version: 7.6.0.0.beta1 (X86_64) / LibreOffice Community
Build ID: be55b15d98c5f059483845a183fcb5ea8023d27c
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Tested with the string:
(a a)--a<enter>

Fix bibisected with linux-64-7.6 repo to commit 075ecc1c31199d0fd0f930cf1b803b04a3b17ce8, so marking as duplicate of bug 155407.
Thanks everyone!

(Coburn and spikeof65: I marked your comments as "off-topic", as the issue described here is quite specific and should remain focused. If you have other issues with the "Replace dashes" autocorrect option, please see if it was already reported in https://bugs.documentfoundation.org/showdependencytree.cgi?id=103341&hide_resolved=1 and if not, create a new report. Thank you!)

*** This bug has been marked as a duplicate of bug 155407 ***