summaryrefslogtreecommitdiff
path: root/configmgr
AgeCommit message (Collapse)Author
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-02-08update pchesCaolán McNamara
Change-Id: Icf55ddda055d11b649e7607c2cdd8b6d6ddfefbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110483 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
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-12-04update pchesCaolán McNamara
Change-Id: I3e22c2000da03f6f3345353846213203993aa865 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107192 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@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>
2020-08-03loplugin:flatten in configmgr..i18nutilNoel Grandin
Change-Id: Idaeed33df4f1dd1b2acbdaf8a895c5d56c3ca14c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99980 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-23configmgr: Use a proper LanguageTag-based locale fallback mechanism.Jan Holesovsky
Without this, zh-Hant-TW locale used via the LibreOfficeKit was reduced to zh-Hant and further to zh, which was interpreted as zh-CN, causing incorrect strings particularly in the sidebar. Change-Id: I58e53f71d13824e422a7b3634f3822d55090f8ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99203 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-07-18compact namespace: connectivityNoel Grandin
Change-Id: I4f7999672ba15d9f453ded9accb3991b8150c32d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98905 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-10replace usage of blacklist with excludelist for IWYUThorsten Behrens
Background and motivation: https://tools.ietf.org/html/draft-knodel-terminology-02 Change-Id: I2f22d455d2a936a85750eaab1fda215ebb6d9d48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98182 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-06configmgr: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation Change-Id: I8d1419a9f2c0eb4d488b3f60b357f12e8177d7b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98134 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-30Upcoming improved loplugin:staticanonymous -> redundantstatic: configmgrStephan Bergmann
Change-Id: I85650691056c24d8c2e37ddce2c50a27193b4c6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97543 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-15Use getBcp47() instead of getLanguage()Andras Timar
getLanguage() only returns the language code which can be ambiguous in case of UI localization, when there are more than one language variants. Fallback to the first variant caused mixed language UI, e.g. en-US vs. en-GB, pt vs. pt-BR, zh-CN vs. zh-TW. Change-Id: I888423cd4b3c65dbdb900ff3b6bc308fa119be4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96285 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-05-24inline some use-once typedefsNoel Grandin
Change-Id: Idddba2f3fd05265b08dbc88edb6152d34a166052 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-18use for-range on Sequence in cli_ure..connectivityNoel Grandin
Change-Id: Ic5254e402d153a13c29928b59738cbe1603d0139 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94399 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-08compact namespace in canvas..cuiNoel Grandin
Change-Id: I7bd0c2a55b936896fcfe7e1a374871008a18618f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93706 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-06"resolved" is a better name than "isResolved" hereStephan Bergmann
...as the variable is true if any of the unresolved depedencies got resolved now, rather than anything specific that "is resolved" now. This partially reverts be729e772196f33543e21cb9bac21add87726b20 "tdf#94269: Replace 'n' prefix for bool variables with 'b'". Change-Id: I14c0b3872aaf320baedb349b1cfdd1ed29417dfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93569 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-06Remove support for "module" layersStephan Bergmann
f4d8090a484f99970f00bab2aa9b9f8d6cbe4fdc "Drop support for long-gone share/registry/modules layer" stated: "Support for 'module' layers in configmgr/source/components.cxx is still needed for gb_CppunitTest_use_filter_configuration in solenv/gbuild/CppunitTest.mk." But that need is meanwhile gone since e1b51e7beb7f9cfa7b574b9c2a69799e62963a09 "gbuild: use .xcd configuration files from instdir" removed gb_CppunitTest_use_filter_configuration. Change-Id: Ide8d69e79272df7c450edfb1e763e3dcc8f257e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93546 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-06GenericCommands: fix Fontwork tooltipsJustin Luth
These were terribly confusing. .uno:Fontwork does NOT insert fontwork text, despite the tooltip name. It opens up the old fontwork dialog that modifies contour properties so that the text can flow along the contour. The UIname is Fontwork, so lets have an automatic tooltip for that. .uno:FontworkGalleryFloater has a UIname of "Fontwork Style", but the auto-generated tooltip was "Fontwork". (Notice that this conflicts with the UIname of the other one. So when you add "Fontwork" to your toolbar, and chose the icon with the tooltip "Fontwork" you get a different item.) Since this one actually inserts text, and doesn't actually modify any existing style (that's the function of Fontwork Shape), lets give this one the tooltip "Insert Fontwork Text". Therefore, this patch effectively switches the two tooltip names around, which much better matches their function, and their UIname. I expect that this was the original 2016 intention anyway... At the end, I decided to also change the UIname to "Insert Fontwork", since the gallery is normally added to insert menus... The unit test I had to modify just looked like a functionality test and had nothing to do specifically with the label's string. (It was last changed for tdf#91781 which made no specific reference to fontwork.) This might help documentation bug tdf#118336 a bit too. Change-Id: I152596781def2d8dba47f53e345976543e3131bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88101 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
2020-02-04std::set<T*> -> o3tl::sorted_vectorNoel Grandin
Change-Id: I562f8a8dc27f4aeebec6f6643b95460315edc9c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87949 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-01make update_pch also consider files in <module>/src/**/incLuboš Luňák
With --enable-pch=full there's not much difference between a "public" header in <module>/inc and a private one in <module>/src/somewhere/inc . And since the script searches recursively, this apparently helps to find even more headers for lower pch levels. Change-Id: I8483d0aa5b4fea5a59107c20a8aa5f1ef694af0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87799 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-01-29tdf#88205: Adapt uses of css::uno::Sequence to use initializer_list ctorCanberk TURAN
Changed to one-line return Change-Id: I2ce55ff3c7f218823418ed623b03e6a4fcbc0d2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87515 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-01-28New loplugin:unsignedcompareStephan Bergmann
"Find explicit casts from signed to unsigned integer in comparison against unsigned integer, where the cast is presumably used to avoid warnings about signed vs. unsigned comparisons, and could thus be replaced with o3tl::make_unsigned for clairty." (compilerplugins/clang/unsignedcompare.cxx) o3tl::make_unsigned requires its argument to be non-negative, and there is a chance that some original code like static_cast<sal_uInt32>(n) >= c used the explicit cast to actually force a (potentially negative) value of sal_Int32 to be interpreted as an unsigned sal_uInt32, rather than using the cast to avoid a false "signed vs. unsigned comparison" warning in a case where n is known to be non-negative. It appears that restricting this plugin to non- equality comparisons (<, >, <=, >=) and excluding equality comparisons (==, !=) is a useful heuristic to avoid such false positives. The only remainging false positive I found was 0288c8ffecff4956a52b9147d441979941e8b87f "Rephrase cast from sal_Int32 to sal_uInt32". But which of course does not mean that there were no further false positivies that I missed. So this commit may accidentally introduce some false hits of the assert in o3tl::make_unsigned. At least, it passed a full (Linux ASan+UBSan --enable-dbgutil) `make check && make screenshot`. It is by design that o3tl::make_unsigned only accepts signed integer parameter types (and is not defined as a nop for unsigned ones), to avoid unnecessary uses which would in general be suspicious. But the STATIC_ARRAY_SELECT macro in include/oox/helper/helper.hxx is used with both signed and unsigned types, so needs a little oox::detail::make_unsigned helper function for now. (The ultimate fix being to get rid of the macro in the first place.) Change-Id: Ia4adc9f44c70ad1dfd608784cac39ee922c32175 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87556 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-25tdf#130137 Replace remaining uses of WNT define checks with _WIN32A_GAN
Change-Id: If95f1ea5a81de62eb4f725e5fcb30ccb8530062a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87372 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-01-25tdf#124176: Use pragma once instead of include guardEfdal İncesu
Change-Id: Ifec221d1dbffa3adcc9e3cc7ed13dcf82f1182d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87384 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-01-15clang-tidy modernize-concat-nested-namespace in codemaker..configmgrNoel Grandin
Change-Id: I48452480fae169e11d60b125bbd0226b6a35a25c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86800 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-10use more std::make_sharedNoel Grandin
found using 'git grep', I tried using clang-tidy, but it only successfully found a tiny fraction of these Change-Id: I61c7d85105ff7a911722750e759d6641d578da33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-02Revert "no need to use shared_ptr here"Noel Grandin
This reverts commit 122598af564082786f01b4eafdb9f09f0cffdf5f. Reason for revert: shared_ptr was introduced for fdo#31494, to avoid issues during shutdown Change-Id: I1c3ef4a966b9244da1e504806e917d1918b83803 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86095 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-30Clean up newly unused includesStephan Bergmann
...after 122598af564082786f01b4eafdb9f09f0cffdf5f "no need to use shared_ptr here" Change-Id: I5b7525388eed96005c9163a58c9b260d0b100cbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86012 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-24no need to use shared_ptr hereNoel Grandin
when we are really just sharing a single global lock object Change-Id: I30d6f4cbd30cb7ee849f20a6c15615a94f67d7d8 Reviewed-on: https://gerrit.libreoffice.org/85768 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-12use std::move when popping stuff off stacksNoel Grandin
Change-Id: I6ba0ee8afee1a9579045643cd0118cf19599d5b9 Reviewed-on: https://gerrit.libreoffice.org/82497 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-23loplugin:stringadd (clang-cl)Stephan Bergmann
Change-Id: I324496ff7c61d87a83b6b378810aa5c78cd7dba3 Reviewed-on: https://gerrit.libreoffice.org/81405 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-21size some stringbuffer to prevent re-allocNoel Grandin
found by the simple expidient of putting asserts in the resize routine. Where an explicit const size is used, I started with 32 and kept doubling until that site did not need resizing anymore. Change-Id: I998787edc940d0a3ba23b5ac37131ab9ecd300f4 Reviewed-on: https://gerrit.libreoffice.org/81138 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-18make bin/update_pch.s always include code in trivial #if'sLuboš Luňák
E.g. #ifdef LIBO_INTERNAL_ONLY is always true for code that builds with our PCHs. Change-Id: I3cf311ea3621b909105754cfea2cb0116b8b67f5 Reviewed-on: https://gerrit.libreoffice.org/80961 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-10-15new loplugin:bufferaddNoel Grandin
look for OUStringBuffer append sequences that can be turned into creating an OUString with + operations Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6 Reviewed-on: https://gerrit.libreoffice.org/80809 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-06convert equals() to operator== in xmlreader::SpanNoel Grandin
Change-Id: Ic6a8eae344c06be87e2bc4bf7f242a2d18ebc8ad Reviewed-on: https://gerrit.libreoffice.org/80312 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-27Add conversion from rtl::OStringNumber to std::string_viewStephan Bergmann
...and revert the relevant part of 2f5f45921b05904a4be1ff633be09c62cb44ff08 "support O(U)String::number() for fast string concatenation", as discussed in the comments of that Gerrit change, now that 89bb0b0dcd8dc4656d0047cd10702d1c471c0fa1 "Deduplicate O(U)StringNumber definitions; add toAsciiUpperCase" paved the way. For consistency, also add conversion from rtl::OUStringNumber to std::u16string_view, even if that remains unused as of now. Change-Id: Ieb64bff0b59c22f3dec05c99fca5676b27a46e9a Reviewed-on: https://gerrit.libreoffice.org/79750 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-09-24support O(U)String::number() for fast string concatenationLuboš Luňák
When I did the fast string concatenation, I didn't add any support for number(), which simply returned a O(U)String, and so it did the extra allocation/deallocation, although that could be avoided. In order to support this, number() now returns a special temporary return type, similarly to O(U)StringConcat, which allows delaying the concatenation the same way. Also similarly, the change of the return type in some cases requires explicit cast to the actual string type. Usage of OString::getStr() is so extensive in the codebase that I actually added it to the helper class, after that it's only relatively few cases. Change-Id: Iba6e158010e1e458089698c426803052b6f46031 Reviewed-on: https://gerrit.libreoffice.org/78873 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>