diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2015-02-02 21:02:42 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-01-06 21:32:00 +0000 |
commit | 585ab75a9344e140c876cb7565d3525a62fb8a73 (patch) | |
tree | b3be377727a5674818840535fbd57a1fff2dff69 | |
parent | 967c060b7d887b2181bae11adbad91105190d12f (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>
-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 912ae33ade6e..9dd713ded9f3 100644 --- a/sc/source/core/data/funcdesc.cxx +++ b/sc/source/core/data/funcdesc.cxx @@ -770,13 +770,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] ) ); } } } |