Bug 99930 - Autocorrect replace first ' in calc-cell..
Summary: Autocorrect replace first ' in calc-cell..
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.2.2 release
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:5.2.0 target:5.1.6
Keywords:
: 73377 103135 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-05-18 11:43 UTC by Thomas Krumbein
Modified: 2016-10-19 15:30 UTC (History)
4 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 Thomas Krumbein 2016-05-18 11:43:56 UTC
In version 5.2.x it is not longer possible to edit an number as text in a calc -cell.

in all previous versions (including version 5.1.3) it was possible - and it should be possible!! - to insert a value as text in a cell. This was doing by enter first ' - then direct the value - i.e:  '01234 -> will shown as 01234 in cell as text (string), not as a number.

in 5.2.0.0.alpha0 the ' will immediatly replaced by , so that the following string will stay inside the cell: ,01234

This is not, what a user exspect!

By turning off the autocorrection option in writer for replacing single quotation marks it works like ever before. This option was standard switched off in former versions - in 5.2.0.0 it is turned on. Why?
Comment 1 Eike Rathke 2016-05-18 12:02:22 UTC
Investigating.
Comment 2 V Stuart Foote 2016-05-18 12:30:25 UTC
Don't see it on Windows 10 Pro 64-bit en-US with
Version: 5.2.0.0.alpha1+
Build ID: efc05c0a1ecac549c8340a8f9ec4e47556569adc
CPU Threads: 8; OS Version: Windows 6.2; UI Render: default; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-05-13_23:01:28
Locale: en-US (en_US)

Single quotes replacement is checked active, but not affected for this OS build locale.

Perhaps some localized autocorrect value/setting is applied?  

Need to know what locale and OS.
Comment 3 V Stuart Foote 2016-05-18 12:49:21 UTC
Oops, I was wrong--in en-US the single quote is being autocorrect replaced (same char in en-US) with the autocorrect single quotes option now enabled by default. Rather than deleted for string entry.

looks like we are bumping into bug 38395

https://cgit.freedesktop.org/libreoffice/core/commit/?id=e6fade1ce133039d28369751b77ac8faff6e40cb

so something may need to be done to reserve behavior for use in Calc.
Comment 4 Thomas Krumbein 2016-05-18 12:50:41 UTC
Windows 10  64-bit de-DE

Version: 5.2.0.0.alpha1+
Build-ID: f688acfdae00ebdd891737e533d54368810185e1
CPU-Threads: 4; BS-Version: Windows 6.2; UI-Render: Standard; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-05-18_00:11:31
Gebietsschema: de-DE (de_DE)
Comment 5 V Stuart Foote 2016-05-18 12:54:34 UTC
(In reply to Thomas Krumbein from comment #0)

> in all previous versions (including version 5.1.3) it was possible - and it
> should be possible!! - to insert a value as text in a cell. This was doing
> by enter first ' - then direct the value - i.e:  '01234 -> will shown as
> 01234 in cell as text (string), not as a number.

Suspect you migrated your user profile when upgrading to 5.1.0 release, so single quote autocorrect substitution was not enabled.  If installed with a clean user profile, issue would have appeared then.
Comment 6 Commit Notification 2016-05-18 14:00:46 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=48d0affa114d6838c0e99f3f3588dd611a4a2b72

Resolves: tdf#99930 SetReplaceLeadingSingleQuotationMark(false) for Calc

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 V Stuart Foote 2016-07-20 07:38:50 UTC
*** Bug 73377 has been marked as a duplicate of this bug. ***
Comment 8 Aron Budea 2016-07-31 12:18:33 UTC
How is this supposed to work with the single quote replacement autocorrect setting? Is there a way to make both work somehow? (because now I'm getting this in 5.2, eg. only the 2nd quote is replaced: " 'test’ ")

Since the autocorrect knows when it's supposed to be the start/end quote, couldn't it do the replacement for both quotes when the end quote is placed?
Comment 9 V Stuart Foote 2016-07-31 14:28:35 UTC
(In reply to Aron Budea from comment #8)
> How is this supposed to work with the single quote replacement autocorrect
> setting? Is there a way to make both work somehow? (because now I'm getting
> this in 5.2, eg. only the 2nd quote is replaced: " 'test’ ")
> 
> Since the autocorrect knows when it's supposed to be the start/end quote,
> couldn't it do the replacement for both quotes when the end quote is placed?

The requirement in Calc is to allow input of numbers as text. Styling the opening and closing quotes kind of a corner case. But the replacement of the closing quote does happen for text or numeric strings.

So guess the test Eike put in for Calc at http://opengrok.libreoffice.org/xref/core/editeng/source/editeng/impedit2.cxx#2470 could be extended to test if the character following the "\'" is a number [0-9] -- otherwise to perform the replacments--but would still allow a smaller corner case of a closing quote change on a numeric string.

@Eike?
Comment 10 Eike Rathke 2016-08-01 12:03:01 UTC
(In reply to V Stuart Foote from comment #9)
> So guess the test Eike put in for Calc at
> http://opengrok.libreoffice.org/xref/core/editeng/source/editeng/impedit2.
> cxx#2470 could be extended to test if the character following the "\'" is a
> number [0-9] -- otherwise to perform the replacments--
That would not be sufficient, any string that might form an internal numeric value may have to be prefixed, including dates and in fact everything the number formatter recognizes as numeric string input. However, at the moment the EditEngine performs the replacement it is unknown what string will follow in entirety.
Comment 11 Eike Rathke 2016-08-01 12:49:31 UTC
(In reply to Aron Budea from comment #8)
> How is this supposed to work with the single quote replacement autocorrect
> setting? Is there a way to make both work somehow? (because now I'm getting
> this in 5.2, eg. only the 2nd quote is replaced: " 'test’ ")

The ' is only not replaced if it is the very first character, so already prefixing it with a blank like in your example will apply the replacement.
Comment 12 Aron Budea 2016-10-13 02:36:49 UTC
*** Bug 103135 has been marked as a duplicate of this bug. ***
Comment 13 Aron Budea 2016-10-13 02:39:17 UTC
As it turns out, the bug is in 5.1 as well.
Eike, can you please backport this to 5.1 and 5.1.6?
Comment 14 Eike Rathke 2016-10-13 10:45:19 UTC
Pending review:
https://gerrit.libreoffice.org/29759 for 5-1
https://gerrit.libreoffice.org/29760 for 5-1-6
Comment 15 Commit Notification 2016-10-18 06:31:13 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-1-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=651a111cf810185990680191a38daec39519f2aa&h=libreoffice-5-1-6

Resolves: tdf#99930 SetReplaceLeadingSingleQuotationMark(false) for Calc

It will be available in 5.1.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2016-10-18 10:08:39 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3a96b9da2a99faa695eb8579a543aeb618d859d8&h=libreoffice-5-1

Resolves: tdf#99930 SetReplaceLeadingSingleQuotationMark(false) for Calc

It will be available in 5.1.7.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 V Stuart Foote 2016-10-19 15:30:27 UTC
Auto-correct misbehavior has been reverted on 5.1.6 builds, and can again enter numbers as text while the AutCorrect options or Single quotes is by default checked active.

On Windows 10 Pro 64-bit (1607) en-US with
Version: 5.1.6.2 (x64)
Build ID: 07ac168c60a517dba0f0d7bc7540f5afa45f0909
CPU Threads: 8; OS Version: Windows 6.19; UI Render: GL; 
Locale: en-US (en_US); Calc: CL