diff options
author | Justin Luth <justin_luth@sil.org> | 2021-12-13 11:21:21 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2021-12-13 22:18:42 +0100 |
commit | b2fb1631ab5b3c1d9d09aefa0d3a81307e7ffa35 (patch) | |
tree | c17d63b9a2a2fc55a50fef9a75382f0e2fc9fc8c /sc | |
parent | b93a6964e0466c1b67d2c233040357a8f6c75214 (diff) |
related tdf#92010 sc autoformula: ensure proper sorting order
When typing "=a", autoformula was suggesting
ACCRINT,ACCRINTM,ACOS instead of starting with ABS.
[This has been true since these 3 suggestions started in LO 5.2.]
Prior to this patch, the very first item in the sorted list
(ABS) was placed at the end of the suggestion vector.
That is because the loop immediately increments.
Since the given initialization value is end(),
it set begin() as the starting loop value and then
immediately incremented to item 2.
Item 1 was finally evaluated last, putting ABS after ZTEST.
The backwards loop handled this properly,
so do the same thing for the forward loop.
Change-Id: I539c749ea43140a1480d74471787bc886dda671e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126723
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index f05f52fa90bd..1abff527b363 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -255,7 +255,7 @@ ScTypedCaseStrSet::const_iterator findTextAll( ScTypedCaseStrSet::const_iterator it, itEnd; it = itPos; if ( it == rDataSet.end() ) - it = rDataSet.begin(); + it = --rDataSet.end(); itEnd = it; bool bFirstTime = true; |