Download it now!
Bug 82241 - Other: Wrong function with underscore or point variant when choose with enter
Summary: Other: Wrong function with underscore or point variant when choose with enter
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: medium normal
Assignee: Winfried Donkers (retired)
URL:
Whiteboard: BSA target:4.4.0 target:4.3.2
Keywords:
: 82419 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-08-06 09:40 UTC by f.rr
Modified: 2019-11-29 16:31 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 f.rr 2014-08-06 09:40:30 UTC
Problem description: when you key a function whith _ or . variant and press enter return a wrong function, does not sostitute the initial characters.

Steps to reproduce:
1. key in a cell '=convert_' (in preview shown on yellow CONVERT_ADD() )
2. press enter

Current behavior: =convertCONVERT_ADD()

Expected behavior: =CONVERT_ADD()

Same with =erf.
              
Operating System: All
Version: 4.3.0.4 release
Comment 1 Eike Rathke 2014-08-06 10:16:01 UTC
@Winfried:
You already worked in that area, would you like to take a look at this?
Comment 2 Winfried Donkers (retired) 2014-08-06 11:13:59 UTC
(In reply to comment #1)
> @Winfried:
> You already worked in that area, would you like to take a look at this?

It looks as if this is a sort of duplicate of bug 80058, which Markus Mohrhard fixed in master.

Only the fix is limited to dots in function names.
Also, my work tried to work for all locales, without knowing what special characters may be used in function names. Markus's fix may miss more characters than '_'.

I don't know if my concern is justified and I don't know if Markus would like to expand his fix himself:
-should the method I used for bug 75264 be used to fix this bug as well, or can the fix for bug 80058 simply be expanded?
-I can try both options, but may not be able to do so within a day.
-I probably leave cherry-picking for 4.3 to others.
Comment 3 Markus Mohrhard 2014-08-06 15:39:09 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > @Winfried:
> > You already worked in that area, would you like to take a look at this?
> 
> It looks as if this is a sort of duplicate of bug 80058, which Markus
> Mohrhard fixed in master.
> 
> Only the fix is limited to dots in function names.
> Also, my work tried to work for all locales, without knowing what special
> characters may be used in function names. Markus's fix may miss more
> characters than '_'.
> 
> I don't know if my concern is justified and I don't know if Markus would
> like to expand his fix himself:
> -should the method I used for bug 75264 be used to fix this bug as well, or
> can the fix for bug 80058 simply be expanded?
> -I can try both options, but may not be able to do so within a day.
> -I probably leave cherry-picking for 4.3 to others.

You can't use the fix for bug 75264 as the problem is about the editeng selection not being correct and that one needs either a fix down in the break iterator code or my hack needs just addition for the few additional characters.

My fix just checks if the currently selected part of the word already starts with the replacement text or not and otherwise goes to the beginning of the next word and extends the selection.

Adding the support for _ is not a problem.
Comment 4 Winfried Donkers (retired) 2014-08-06 16:24:48 UTC
I'll extend the fix for bug 75264 to include underscores as word separators.
Comment 5 Winfried Donkers (retired) 2014-08-06 17:43:58 UTC
It'll take a bit longer: the fix for bug #75264 works fine for F.DIST, but does not seem to work for longer text before the dot, e.g. binom.[Enter] produces binoBINOM.DIST()...

If will try to fix it.
As this bug report covers both dot and underscore situation, I won't reopen bug #75264.

@Markus: if you happen to have a definite view on this problem, you're welcome to enlighten me ;-) It might save me a lot of time.
Comment 6 Winfried Donkers (retired) 2014-08-07 09:44:30 UTC
Submitted a fix for master:
https://gerrit.libreoffice.org/#/c/10801
Comment 7 Commit Notification 2014-08-07 15:48:26 UTC
Winfried Donkers committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9fc83ae4e479f7e6784dfdce87de35c283fbadd2

fdo#82241 fix autocompletion for calc functions with



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 8 Winfried Donkers (retired) 2014-08-08 05:48:05 UTC
(In reply to comment #7)
> It has been pushed to "master":
> 

@Eike, Markus : would it be possible for one of you to cherry-pick the fix to version 4.3?
Comment 9 Eike Rathke 2014-08-08 12:00:00 UTC
I'll check that, it needs also 5e2b4da10caaa15ee7e846c42ada2a20218d9591 and best 2ee3b6deff5d1e65ca0ba1479a1125fbea73a9ab as well for less merge conflicts.
Comment 10 Commit Notification 2014-08-08 12:19:12 UTC
Winfried Donkers committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e5dd20508ca49fb6e6aee4a12cbf0dab568d7c16&h=libreoffice-4-3

fdo#82241 fix autocompletion for calc functions with


It will be available in LibreOffice 4.3.2.

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 11 Jorendc 2014-08-10 17:13:34 UTC
*** Bug 82419 has been marked as a duplicate of this bug. ***