summaryrefslogtreecommitdiff
path: root/configmgr/source
AgeCommit message (Collapse)Author
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-07-21elide some makeStringAndClear() callsNoel Grandin
Change-Id: Id81a0c0046d0d84e6c327eef4447b21fecae6ddc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137283 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-23clang-tidy modernize-pass-by-value in configmgrNoel Grandin
Change-Id: If2e69c04e4d72ec6911fb435092275dbfffbf991 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134752 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-17Revert "use boost::flat_map in config_map"Tor Lillqvist
Fixes build breakage on macOS at least. Noel said it was OK to revert. This reverts commit cc4325f84a0ba35d8bbb564512bce0c6b8aab408. Change-Id: Ib78d29fc21d4d030b4032955b18271de1761f396 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134458 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-15use boost::flat_map in config_mapNoel Grandin
reduces time spent allocating Change-Id: Idd571db62d28be7e48672f76d741174a7ab40959 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134346 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-12elide temporary std::vector in Access::getElementNamesNoel Grandin
Change-Id: I9a875d5615930700e20f67c40b4b7a24458fd447 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134198 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-11avoid some ref-counting traffic in configmgr::Access:getNameInternalNoel Grandin
Change-Id: I3062855ab8f9ec9f1e7cdffe163f1c78865d5b9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134154 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-26Adapt function's interface to change from OUString to std::u16string_viewStephan Bergmann
...in 6fc3dfd3f1b5cb13101299df42444f2ff0493846 "use more string_view" Change-Id: Ibd1b8748e7a261cdb457a14ba87b1ec68d2a83de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133438 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-13use more string_view in configmgrNoel Grandin
Change-Id: Ia8aab5ea1a03d1512a1da806d505ce06f6977828 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132971 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13loplugin:stringviewparam whitelist some more functionsNoel Grandin
for which we have o3tl:: equivalents Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-11use more string_viewNoel Grandin
found by tweaking the loplugin:stringview and making it whitelist getLength Change-Id: Ic41cd4e3026d93b70a76fe1279c6de3abbe6b4a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132820 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-02loplugin:stringviewparam convert methods using indexOfNoel Grandin
.. and lastIndexOf, which convert to find and rfind Change-Id: I6c4156cf904774c0d867f85a4c2785dba7593f62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132445 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-08Extend loplugin:stringview to O[U]StringBuffer::toStringStephan Bergmann
Change-Id: I7ad212dfff8b34d05e3b45107a1ef033a4efc454 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129651 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-01-13Recheck modules [a-c]* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I74a3c3a67c3639376e2251c3eb917fa4139dfbd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127808 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-12-21loplugin:flatten in canvas..cuiNoel Grandin
Change-Id: I208767eaa60d913fe2882403f1f9351eb08256f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127224 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-14tdf#81146: try to make saving registrymodifications.xcu more robustMike Kaganski
... by use of osl::File::replace, which is "atomic" on Windows, instead of osl::File::move. Change-Id: Ia49212f0d1cc75292f72ce219aee513e2d250ec4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126801 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-23fix configmgr --enable-dconf buildCaolán McNamara
error: no viable conversion from 'const char [1]' to 'std::u16string_view' (aka 'basic_string_view<char16_t>') and warning: instead of an 'rtl::OUString' constructed from a 'char16_t', pass a 'std::u16string_view' (or an 'rtl::OUStringChar') [loplugin:stringview] Change-Id: I0e611606190f063227c5467dc5a082277cebaaa0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125706 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-21osl::Mutex->std::mutex in configuration_registryNoel Grandin
Change-Id: If5561d6532716bfe3151f555a691aa5188264a1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125603 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-29Prepare for removal of non-const operator[] from Sequence in configmgrMike Kaganski
Change-Id: Ia349292783b81f0b4eebe64ae672ea5cb6d6cd59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124352 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-15loplugin:stringview (clang-cl)Stephan Bergmann
Change-Id: I367bc431bfd12041b2ccb6145c11f80b545aae19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123647 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-15Remove non-const Sequence::begin()/end() in internal codeMike Kaganski
... to avoid hidden cost of multiple COW checks, because they call getArray() internally. This obsoletes [loplugin:sequenceloop]. Also rename toNonConstRange to asNonConstRange, to reflect that the result is a view of the sequence, not an independent object. TODO: also drop non-const operator[], but introduce operator[] in SequenceRange. Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-17Some more uses of rtl_math_(u)StringToDoubleStephan Bergmann
...to avoid construction of temporary O(U)Strings, in anticipation of using C++17 std::from_chars once that is available in all our baselines, similar to 99a1290b3f2c8584db0a33fe48adf93dccce3a92 "Use existing rtl_math_stringToDouble" Change-Id: Ib92504341c3ae9dd599f91725b0af5b7219a201d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122219 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-15Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 5Mike Kaganski
- Revise uses of getSomething to use getFromUnoTunnel Where that is impossible, use getSomething_cast to unify casting, and minimize number of places doing low-level transformations. The change keeps the existing tunnel references that last for the duration of the pointers' life, because sometimes destroying such reference may destroy the pointed object, and result in use after free. Change-Id: I291c33223582c34cd2c763aa8aacf0ae899ca4c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122101 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-15Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 4Mike Kaganski
- Change implementations of getSomething to use getSomethingImpl Or where that's impossible, use getSomething_cast to unify this and reduce number of places where we reinterpret_cast. All static methods getting tunnel ids were renamed to getUnoTunnelId, to comply with the convention used in <comphelper/servicehelper.hxx>. TODO (in separate commits): - Revise uses of getSomething to use getFromUnoTunnel Change-Id: Ifde9e214b52e5df678de71fcc32d2199c82e85cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122100 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-15Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 1Mike Kaganski
The header got some changes: 1. Move UnoTunnelIdInit and isUnoTunnelId into 'comphelper' namespace 2. Rename UnoTunnelIdInit to UnoIdInit, as a precondition to replace of uses of OImplementationId with it, including in XTypeProvider 3. Introduce convenience functions 'getSomething_cast' to cast between sal_Int64 and object pointers uniformly. 4. Rename getUnoTunnelImplementation to getFromUnoTunnel, both to make it a bit shorter, and to reflect its function better. Templatize it to take also css::uno::Any for convenience. 5. Introduce getSomethingImpl, inspired by sw::UnoTunnelImpl; allow it handle cases both with and without fallback to parent. 6. Adjust UNO3_GETIMPLEMENTATION_* macros TODO (in separate commits): - Drop sw::UnoTunnelImpl and sw::UnoTunnelGetImplementation - Replace all uses of OImplementationId in core with UnoIdInit - Deprecate OImplementationId in <cppuhelper/typeprovider.hxx> - Change implementations of getSomething to use getSomethingImpl - Revise uses of getSomething to use getFromUnoTunnel Change-Id: If4a3cb024130f1f552f988f0479589da1cd066e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122022 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-15Avoid computing LanguageTag fallbacks several hundred timesEike Rathke
... over and over again even for known and present locales for each and every localizable config item. Change-Id: I19974c56169f45a7c53ed6b0eede47365e1365dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120496 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-08-11no need to allocate changedValue_ separatelyNoel Grandin
Change-Id: Ibda7c7a055790f6eb87ac6bd62554e745181cea7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120292 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-22Revert "simplify locking in configmgr"Noel Grandin
This reverts commit 7f7dad7018c874542e0ab6a0fb0f05f21d112b53. And add some comments to the definition of the lock, to make it purpose obvious. Change-Id: Ib1a0b6345efab0febe9191341ce264c8d6070932 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119366 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-22simplify locking in configmgrNoel Grandin
if we are going to have a shared lock, just use the instance of the shared lock instead of taking a shared_ptr to it. Change-Id: I00f74815426fcf971ff8e12734fc4566aa6ad5f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119343 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-14Directly partly initialize vector in access.cxxJulien Nabet
Change-Id: Iac19920caf0a9bdfa07b025c19c7659b96374c7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115590 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-07rtl::Static -> function local staticNoel Grandin
Change-Id: I2071c27bdf074403ec24e67f9278ac27f9491303 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113698 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-10Drop 'static_cast<cppu::OWeakObject*>' syntactic noiseMike Kaganski
... where the object is created in-place, and its type is known Change-Id: Ifabfcf2f3ad0d60152f14e8d970c1faa42115288 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112256 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-09Mark workaround as fixed upstreamStephan Bergmann
Change-Id: I808f0b26916eece2d4fae3c7d1e73c847905adf8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112208 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-17loplugin:referencecasting in configmgrNoel
Change-Id: Ib74468d3a6a40b32896c58b0d30e3121ee834e1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111027 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-29loplugin:stringviewparam extend to new..Noel
O[U]StringBuffer methods Change-Id: I0ffbc33d54ae7c98b5652434f3370ee4f819f6f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110090 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-10fix coverity parse errorsCaolán McNamara
Change-Id: I4884bfb67a061b865e8cf38b2fea6de0cb1bc3d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109057 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-26New loplugin:stringliteralvarStephan Bergmann
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for details. (Turned some affected variables in included files into inline variables, to avoid GCC warnings about unused variables.) Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-30loplugin:stringviewparam include comparisons with string literalsNoel
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-25loplugin:stringview (clang-cl)Stephan Bergmann
Change-Id: I47b44c80b2a5e3c9d84f5d7257efe17f138a1067 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106563 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-22Make it clear again what the comment appertains toStephan Bergmann
...after 315f270d2db7541e9400852b070afb30f371f644 "tdf#123936 Formatting files in module configmgr with clang-format" Change-Id: I75f30acc3db166404e5de58ef65d3de34f5e7061 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106356 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-22tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorgozeloglu
Change-Id: I39c4cd2474814e6033795e0dc3fcc7c18812d854 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106342 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-11-22tdf#123936 Formatting files in module configmgr with clang-formatPhilipp Hofer
Change-Id: I51bd9777e51e4d8b745791bdde41e142db217d32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105655 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Jenkins
2020-11-12New loplugin:stringviewparamStephan Bergmann
...to "Find functions that take rtl::O[U]String parameters that can be generalized to take std::[u16]string_view instead." (Which in turn can avoid costly O[U]String constructions, see e.g. loplugin:stringview and subView.) Some of those functions' call sites, passing plain char string literals, needed to be adapted when converting them. Change-Id: I644ab546d7a0ce9e470ab9b3196e3e60d1e812bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105622 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-06tdf#42949 Fix new IWYU warnings in directories c*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Iac1e7802dbe1efa01c2befdd10406231788d4fc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105315 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-10-02Use the new single-instance="true" attribute in configmgrStephan Bergmann
Change-Id: Ib5873aedd5c49dd2f8c099190e78de9b85fcd53a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103787 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-09-24Fix typo in codeAndrea Gelmini
It passed "make check" on Linux Change-Id: I810841b0bf0d59a13893d9b88f19673a8191741e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103255 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-09-04tdf#124176 Use #pragma once in configmgrGeorge Bateman
This commit was carried out by a Python script, source of which is at https://bugs.documentfoundation.org/show_bug.cgi?id=124176#c97. Change-Id: Ide38653f1828752b90d7e312471c9facb99646a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100252 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-08-17inline some use-once typedefsNoel Grandin
Change-Id: I683175c1e788a2a4cfec9504dc8dc3ebfee7c5de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100858 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>