summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/userlist.cxx
AgeCommit message (Collapse)AuthorFilesLines
2023-06-04Move uppercase to SubStr ctorMike Kaganski1-7/+5
Change-Id: Ifeeaead20e3ad37705fea04a6c3b9efa4339ddc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152543 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-04ScUserListData::InitTokens can't produce different splitsMike Kaganski1-15/+2
... for the same input, because ScGlobal::cListDelimiter is a constant. This means, that the copy ctor and assignment operator can be default, and ScUserListData comparison can be simplified. Change-Id: I500892ab592fd0dd24550c5189151f670efed4d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152541 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-04Simplify a bitMike Kaganski1-55/+12
Change-Id: Iaea9a425fc93adc716bdb4944244a14175cf7538 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152540 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-04Optimize ScAppCfg::ReadSortListCfgMike Kaganski1-12/+9
Do not initialize defaults when using custom user list. Change-Id: I8428a20b65182011a25325f0b7298ea51998346b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152587 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-04Simplify ScUserList, don't use unique_ptr.Mike Kaganski1-66/+14
Change-Id: Idd0ce7bfff115a3b762e963dd6cea7927c78e295 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152586 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-07clang-tidy modernize-pass-by-value in scNoel Grandin1-4/+5
Change-Id: Ia7ff651d1cbc119b36a9f8052594d03650988f59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137848 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-17rather return ref from GetTransliterationNoel Grandin1-2/+2
since we never return a nullptr. Also add a new utility method to simplify the call sites that need to pick the right collator Change-Id: I0ecf3ad32a0bf22d9e760620524f41bc18b54fff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122238 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-17rather return ref from getLocaleDataPtrNoel Grandin1-1/+1
since we never return a nullptr, and rename to reflect that Change-Id: I694b5198f663842d1362504d60e7191e450a08ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122224 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-17rather return ref from getCharClassPtrNoel Grandin1-3/+3
since we never return a nullptr, and rename to reflect that Change-Id: I5b8f0aba6ce387bb0fe1ce6088ba2685d2ade7f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122209 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-27tdf#42949 Fix new IWYU warnings in directory sc/Gabor Kelemen1-1/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I217817e2e4a42b096f5a7fb6344568c10d69aab2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106078 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel1-1/+1
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-12Revert "loplugin:constfields in sc"Noel Grandin1-1/+1
This reverts commit fb1d3b580763a333bbbfe115d09e1b5cd8849675. Now that we know that making fields has negative side effects like disabling assignment operator generation. Change-Id: Ib48334ffbeb2c768896dd8ced6818aa0b9910b0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90333 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-22ScGlobal - change direct access to a static ptr for a getterTomaž Vajngerl1-4/+4
pLocalData and pCharClass static veriables on ScGlobal are always set from SvtSysLocale on init, probably for "faster" access. This can just be made simpler with access through a getter, so this introduces a getter for ScGlobal::getCharClassPtr and ScGlobal::getLocaleDataPtr, where the access is made directly to SvtSysLocale instance. In addition all the usages needed to be fixed, which is all over the calc module. Change-Id: Ie047b158094e25bbaa2aba15074d7998d9541787 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89249 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-11-03size some stringbuffer to prevent re-allocNoel Grandin1-2/+2
I started with 32 and kept doubling the size until the site did not need re-alloc, but clamped it at 512. Change-Id: I55fe36b31cd3d40f86e5729337a927cf920f2af6 Reviewed-on: https://gerrit.libreoffice.org/81960 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-08loplugin:redundantpointerops simplify *p.get()Noel Grandin1-2/+2
Change-Id: I12517651fb3f777fd08e384992bb3e84b340ad85 Reviewed-on: https://gerrit.libreoffice.org/80382 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-12Mark Sequence const in scArkadiy Illarionov1-1/+1
It ensures that const begin()/end() methods will be called, removing any overhead. fca94779872b8ba0b0583d0b7068f1a46beb88c5 follow-up. Change-Id: Id680744abb1b3887f25c9bfa033106de18a9c2d0 Reviewed-on: https://gerrit.libreoffice.org/77250 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-08-09Simplify Sequence iterations in scArkadiy Illarionov1-4/+4
Use range-based loops, STL and comphelper functions Change-Id: I047fb2e6ec9591166339b9748c5013a32185f14b Reviewed-on: https://gerrit.libreoffice.org/76912 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-05-12Use hasElements to check Sequence emptiness in sax..sdextArkadiy Illarionov1-2/+2
Similar to clang-tidy readability-container-size-empty Change-Id: If6a567708d3c59355d54933fad23c85195846624 Reviewed-on: https://gerrit.libreoffice.org/71763 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-31Simplify containers iterations in sc/source/core/[o-t]*Arkadiy Illarionov1-17/+8
Use range-based loop or replace with STL functions Change-Id: I3ecd9e92b9690e416b4a6c8f3830346ea23c5882 Reviewed-on: https://gerrit.libreoffice.org/67182 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-29o3tl::make_unique -> std::make_unique in scGabor Kelemen1-7/+6
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: Ib69a4a2a08b1edbc0f40beac00f7f68075b479a1 Reviewed-on: https://gerrit.libreoffice.org/66967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17clang-tidy readability-redundant-smartptr-getNoel Grandin1-4/+4
redundant get() call on smart pointer Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd Reviewed-on: https://gerrit.libreoffice.org/61837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-15loplugin:constfields in scNoel Grandin1-1/+1
Change-Id: If326175d571d15752efd1b63df45b2bc785f7541 Reviewed-on: https://gerrit.libreoffice.org/61653 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: scStephan Bergmann1-2/+2
Change-Id: I2ed763e0584a188032c80fde60890de3c6985cbd
2017-09-12clang-tidy modernize-use-emplace in scNoel Grandin1-2/+2
Change-Id: Ifc38e1fc188fe957a0c717aec19cdd6637e4c658 Reviewed-on: https://gerrit.libreoffice.org/42183 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-14use more OUString::operator== in scNoel Grandin1-1/+1
Change-Id: I1a7691fe59e5e93c15bd812f03366da814f9f3db Reviewed-on: https://gerrit.libreoffice.org/39900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-03C++11 remove std::unary_function bases from functorsJochen Nitschke1-1/+1
std::unary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::unary_function base class was used in 3 places: * chart2/source/tools/DataSeriesHelper.cxx: lcl_MatchesRole is used in a std::not1 function helper who uses the members return_type and argument_type. - replace deprecated std::not1 with a lambda * chart2/source/tools/ModifyListenerHelper.cxx: lcl_weakReferenceToSame used the argument_type member in the operator() parameter. - inline the parameter type. * xmloff/source/chart/SchXMLExport.cxx: lcl_SequenceToMapElement used result_type and argument_type in operator(). - inline the types Also fix compile error with gcc about finding std::for_each. Change-Id: I073673beb01410c3108e7d0346d9e7d6b9ad2e2f Reviewed-on: https://gerrit.libreoffice.org/39358 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock1-0/+1
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-04-18clang-tidy performance-unnecessary-copy-initializationNoel Grandin1-2/+1
probably not much performance benefit, but it sure is good at identifying leftover intermediate variables from previous refactorings. Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657 Reviewed-on: https://gerrit.libreoffice.org/24026 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-12clang-tidy performance-unnecessary-value-param in scNoel Grandin1-1/+1
Change-Id: Ia2255e1e3f7a8834a4b5d2a6bbab2c6dd498d356
2016-02-03sc: replace boost::bind with C++11 lambdaMichael Stahl1-2/+3
Change-Id: I516ffb7510f52cceff0cae6970c6ab699a7889be
2015-12-12tdf#96339 fix bug in sort listNoel Grandin1-15/+30
this bug was caused by commit 2aacf6c2cd82322b953988ff30d3bc997ae76d7b "sc: boost::ptr_vector->std::vector" Since the code in question likes passing around a pointer to the element of the vector, convert to using std::vector<std::unique_ptr> Change-Id: I9e9676fe7c2dc32e23ba6708aaea1f16c1bf2ff8
2015-11-13sc: boost::ptr_vector->std::vectorNoel Grandin1-13/+4
Change-Id: Ic4af0579f31c2076fcbc4ac76266e0ae49cb2be8
2015-11-13sc: boost::ptr_vector->std::vectorNoel Grandin1-2/+2
Change-Id: I78fb3a7c735621565ad523ec49b04b20053ae681
2015-11-05a vector is unnecessary here, tdf#79983 follow-upEike Rathke1-7/+4
Only the first case-insensitive match needs to be remembered. Change-Id: Ifac666760878f769bc04d567db9284eedaa40a65
2015-11-05tdf#79983 - Fix to make calc sort lists case sensitiveSahas1-9/+26
Change-Id: I9d4aec8ccb395f8bf59f08d0f5ed461e99c9ea64 Reviewed-on: https://gerrit.libreoffice.org/19433 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-07-22loplugin:unusedmethods scNoel Grandin1-5/+0
Change-Id: I7bdb1889a942d63370731764a58f4ab524dedd8a Reviewed-on: https://gerrit.libreoffice.org/17287 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-06improve the returnbyref lopluginNoel Grandin1-4/+4
Change-Id: I1b510a6194282dfa4a9001d473127c5ebc8b44eb Reviewed-on: https://gerrit.libreoffice.org/16731 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-19sc: simplify code by replacing std::find_if with std::any_ofTakeshi Abe1-3/+2
... or std::none_of. Change-Id: I84808bedbaf098f7c4c987ea62d0ccc4a2b7c2f5 Reviewed-on: https://gerrit.libreoffice.org/15780 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2014-06-25remove whitespaceMarkus Mohrhard1-2/+0
Change-Id: Ib15413e73409cc33de01fa92a47b9d1237cfc4b2
2013-10-21remove uses of COMPARE_*Caolán McNamara1-14/+14
Change-Id: Icdc36b4b24d2f399f481065df3200feb98025135
2013-10-08convert sc/source/core/tool/*.cxx from String to OUStringNoel Grandin1-3/+3
Change-Id: Iaefd1108c4bbb953b711b3e87ab24c733035274c
2013-04-07mass removal of rtl:: prefixes for O(U)String*Luboš Luňák1-2/+0
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk have kept them, in order not to break external API (the automatic using declaration is LO-internal). Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2012-12-04re-base on ALv2 code. Includes:Michael Meeks1-23/+14
Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
2012-06-09Remove superfluous include commentsThomas Arnhold1-5/+0
Change-Id: Icd57ca7fd89e30c190c1b06dbe67c30bea8d1b59
2012-02-23Remove unused code in ScUserListSantiago Martinez1-10/+0
2012-01-09simplify CharClassCaolán McNamara1-6/+3
multiple variants of toUpper (etc) some that take a non-const OUString or String and modify it some that take a const OUString or String and return a new one some that take part of a const OUString or String and return a new one
2011-11-27remove include of pch header from scNorbert Thiebaud1-2/+0
2011-11-19add narrow (one letter) month namesEike Rathke1-1/+1
While introducing Calendar2 and the XCalendar3 interface anyway, as well the "one letter" narrow month names sometimes needed in calendaring can be added. These are not always the first capitalized letters of the months in all locales, and might even not necessarily be just one character. Introduces a new struct css::i18n::Calendar2 that is not derived from css::i18n::Calendar because it uses a new struct css::i18n::CalendarItem2 to hold the NarrowName elements. In locale data the elements DaysOfMonth, MonthsOfYear and GenitiveMonths now have an optional element DefaultNarrowName. If not specified, the first character of DefaultFullName is taken. LocaleDataWrapper and CalendarWrapper use and return the new Calendar2 and sequences of CalendarItem2 structs. Application code adapted. The number formatter now displays narrow month names (genitive if applicable) for the MMMMM code, previously it displayed the first 16 bit code point of the full name (not even utf-16 aware). Narrow day names currently are not used, except in svtools' Calendar control.
2011-11-19use new possessive genitive case month names locale data APIEike Rathke1-1/+1
2011-06-01String to OUString.Kohei Yoshida1-24/+30