diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2015-02-02 21:02:42 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-07 10:09:11 +0000 |
commit | 3cc529ccfb91444c13c771d0f8b2c1292452002f (patch) | |
tree | b15a6e58c89846678703aa2a28934f3a09e1d281 | |
parent | 2414f02ff0d087d144b472b5b4b1f93d6e3e2960 (diff) |
Better fix for fdo#87558: Duplication in Last Used Functions sidebar list
Advantage compared to previous fix: in sidebar, last used function is put at the top
Still function from menu is sorted, the pb is we use InsertEntry, see
0 ImplEntryList::InsertEntry (this=0x32d0910, nPos=2147483647, pNewEntry=0x326f620, bSort=true)
at /home/julien/compile-libreoffice/libreoffice/vcl/source/control/ilstbox.cxx:144
1 0x00002aaab1b2444e in ImplListBoxWindow::InsertEntry (this=0x3287358, nPos=2147483647, pNewEntry=0x326f620)
at /home/julien/compile-libreoffice/libreoffice/vcl/source/control/ilstbox.cxx:750
2 0x00002aaab1b2a138 in ImplListBox::InsertEntry (this=0x3287100, nPos=2147483647, rStr="ACOT")
at /home/julien/compile-libreoffice/libreoffice/vcl/source/control/ilstbox.cxx:2182
3 0x00002aaab1b47d51 in ListBox::InsertEntry (this=0x32e9ca0, rStr="ACOT", nPos=2147483647)
at /home/julien/compile-libreoffice/libreoffice/vcl/source/control/lstbox.cxx:1001
4 0x00002aaad0c05d84 in formula::FuncPage::UpdateFunctionList (this=0x3217110) at /home/julien/compile-libreoffice/libreoffice/formula/source/ui/dlg/funcpage.cxx:153
should we create a new InsertEntry to force bSort=false?
Change-Id: Iba1b020aeea09951dead30f6781b24993aac98e0
Reviewed-on: https://gerrit.libreoffice.org/13725
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 585ab75a9344e140c876cb7565d3525a62fb8a73)
Reviewed-on: https://gerrit.libreoffice.org/13781
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
(cherry picked from commit 689afb19dc399ff3fcea07a6d264b61d10313a1e)
Reviewed-on: https://gerrit.libreoffice.org/13782
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sc/source/core/data/funcdesc.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx index cdc6171cdabc..24c80fe15199 100644 --- a/sc/source/core/data/funcdesc.cxx +++ b/sc/source/core/data/funcdesc.cxx @@ -779,13 +779,13 @@ void ScFunctionMgr::fillLastRecentlyUsedFunctions(::std::vector< const formula:: const ScAppOptions& rAppOpt = SC_MOD()->GetAppOptions(); sal_uInt16 nLRUFuncCount = std::min( rAppOpt.GetLRUFuncListCount(), (sal_uInt16)LRU_MAX ); sal_uInt16* pLRUListIds = rAppOpt.GetLRUFuncList(); + _rLastRUFunctions.clear(); if ( pLRUListIds ) { for (sal_uInt16 i = 0; i < nLRUFuncCount; ++i) { - if (std::find(_rLastRUFunctions.begin(), _rLastRUFunctions.end(), Get(pLRUListIds[i])) == _rLastRUFunctions.end()) - _rLastRUFunctions.push_back( Get( pLRUListIds[i] ) ); + _rLastRUFunctions.push_back( Get( pLRUListIds[i] ) ); } } } |