summaryrefslogtreecommitdiff
path: root/extensions/source/config
AgeCommit message (Collapse)Author
2023-03-23rtl::Static to thread-safe-staticNoel Grandin
Change-Id: Ife02e6d2be3ebfbb08522ab0183ef4aa31a99e19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-05-04Just use Any ctor instead of makeAny in extensionsStephan Bergmann
Change-Id: I0441d30044168563b0d5b8406fcc99b51a9cbc1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133817 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-04Just use Any ctor instead of makeAny (macOS)Stephan Bergmann
Change-Id: I6c185eecf943205f78567393f0ef588580ee4dab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133821 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-22Move BSTR wrapper to systools, and fix some wrong BSTR usesMike Kaganski
BSTR is documented [1] to be prefixed by a 32-bit integer specifying its length *in bytes* (not characters), so passing wchar_t* as BSTR is wrong, and the length member of rtl_uString can't substitute the proper BSTR length, since rtl_uString::length specifies length in characters. Any code taking BSTR and using SysStringLen to get its length would only get half of the passed OUString data. In dbaccess/source/ui/dlg/adodatalinks.cxx, the abovementioned error was implemented. OTOH, OLEVariant::getByteSequence() in connectivity/source/drivers/ado/Aolevariant.cxx passed BSTR from tagVARIANT to ctor of OLEString, which resulted in the BSTR being freed in both dtors of OLEString and OLEVariant (the latter calls VariantClear, which itself clears string when vtfield is VT_BSTR). [1] https://docs.microsoft.com/en-us/previous-versions/windows/desktop/automat/bstr Change-Id: Iedbd62b20133644258af3660616add7b63cac258 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131950 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-22Simplify CoCreateInstance / CoGetClassObject with COMReferenceMike Kaganski
Change-Id: Ieb1035410c3c6c4b40ea779e829a940460d19b5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131922 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-07do not pass XComponentContext to officecfg::...::get() callsLuboš Luňák
It's used only for the ConfigurationWrapper singleton, so it's used only the first time and then ignored. It also causes calls to comphelper::getProcessComponentContext() for every single invocation despite the value not being needed, and the calls may not be cheap (it's ~5% CPU during ODS save because relatively frequent calls to officecfg::Office::Common::Save::ODF::DefaultVersion::get()). Change-Id: I02c17a1a9cb498aeef220ddd5a0bde5523cb0ffb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131056 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-01-24tdf#46037 remove configurationhelper from WinUserInfoBeDhiraj Holden
Change-Id: I7d23fe4f32c3b67304103ca88a757529ba4faa09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128508 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-21Use sal::systools::CoInitializeGuard and sal::systools::ThrowIfFailedMike Kaganski
Change-Id: Ifb40e7672671df03b5ffc89905ad1e7b68451b68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127232 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-19use more cppu::BaseMutexNoel Grandin
Change-Id: Iddd7438161ead93b27cf8e8058ca5b1eae3d8001 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-18Simplify BSTR RAIIMike Kaganski
Change-Id: I0eaff245a4f5dec9c86ab2c04a329e0d2a7edca5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126984 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-18Drop CoIfPtr and use sal::systools::COMReferenceMike Kaganski
Change-Id: Ie6433bb65b4c0a799c98a44c67a708356a5eedef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126983 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-30Prepare for removal of non-const operator[] from Sequence in extensionsMike Kaganski
Change-Id: Id57b187aaa669d4b9a35ab726a6df1a9b4823f1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124364 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-23tdf#124176 Use pragma once in extensionsVincent LE GARREC
Change-Id: I1a5ed69da20cef4428f5f61db5fb9411cff61dc7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112048 Tested-by: Jenkins Reviewed-by: John Turpish <jbt@gmx.us> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-01-13loplugin:stringliteralvar (clang-cl)Stephan Bergmann
Change-Id: I79949789634242eb95cc722bab83e0348775f274 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109174 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-21tdf#123936 Formatting files in module extensions with clang-formatPhilipp Hofer
Change-Id: I6e86641bc93bf4b3941b01fbef69c1e7984aad3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105667 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Jenkins
2020-10-14More fixes of uses of now-explicit OUString ctor taking raw sal_Unicode pointerStephan Bergmann
...in Windows-only code, after c927aab29ebfff1ce3ac0b2f27ae343025a9890c "Make the OUString ctors taking raw sal_Unicode pointer/non-const array explicit". Interestingly, these occurrences were accepted by MSVC and only cause errors with clang-cl, so happened to go unnoticed until now. Change-Id: I33e7653e28a21541ef793b4b0750abb6037752db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104314 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-07-27extensions/WinUserInfo: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation. Change-Id: I16e7da267af4d6e45522b502515cebe52352b2f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99460 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-23extensions/ldap: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation. Change-Id: I159eb26fd69151065080d3f70a6fc9df0104068f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99273 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-01Upcoming improved loplugin:staticanonymous -> redundantstatic: extensionsStephan Bergmann
Change-Id: Ifce7b61cc5bd0901c7ee43712dc236f5aec47edc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97560 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-03Upcoming loplugin:elidestringvar: extensionsStephan Bergmann
Change-Id: I318eebbdc79c503b10570061a298eb76d6555540 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95402 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-22Prefer CoInitializeEx instead of CoInitializeJulien Nabet
As https://docs.microsoft.com/fr-fr/windows/win32/api/objbase/nf-objbase-coinitialize?redirectedfrom=MSDN advised. Moreover, it'll make concurrency model explicit Change-Id: I247a49248bf45beb64a7985a7c0d078ee48efe2d Change-Id: I6e755fd516d9fb2dd2a9df0c66d9afd6070447ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94669 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-08compact namespace in editeng..extensionsNoel Grandin
Change-Id: Ie93ac69592c3625b8e2e5db3619ce24597a07a7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93722 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-22Typo kServerDefiniton->kServerDefinition (extensions/ldap)Julien Nabet
Change-Id: I7d6ad76de91243e5f5d278bab5df171a5924d3d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92672 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-04-14loplugin:flatten in extensionsNoel Grandin
Change-Id: I58b5a2c12e464e568c4f66d398bbf0b1d8afc154 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92195 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-11tdf#42949 Fix IWYU warnings in extensions/*/*cxxGabor Kelemen
Except for Windows-specific parts Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I36c81bced6c8b1567e52ba3a4a688a963f294bb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90179 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-03-06tdf#42949 Fix IWYU warnings in extensions/source/*/*hxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ice2becc34174bdb5507180df6aa1a3c55a55f394 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89859 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-31clang-tidy modernize-concat-nested-namespaceNoel Grandin
Change-Id: Iab35a8b85b3ba1df791c774f40b037f9420a071a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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>
2019-12-19sal_Char->char in extensionsNoel Grandin
Change-Id: I123a5091c5c07de49beba8f4e1d3e4704644ec68 Reviewed-on: https://gerrit.libreoffice.org/85473 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-01loplugin:logexceptionnicely (clang-cl)Stephan Bergmann
Change-Id: I2da126a38db61d2a0f36f8f2d38b0dddeb26c9d4 Reviewed-on: https://gerrit.libreoffice.org/79929 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-01loplugin:stringconstant (clang-cl)Stephan Bergmann
Change-Id: Id1a82cea4444255fdb693e126b7571a406094624 Reviewed-on: https://gerrit.libreoffice.org/79916 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-09-17No need for the string buffer hereMike Kaganski
Change-Id: I196dc9c50169108ca72f7b5e06d0bf2c2bb446d9 Reviewed-on: https://gerrit.libreoffice.org/79044 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-08-20Fix typosAndrea Gelmini
Change-Id: Iac38284daf0196d6a7f29aaa6e2103c1d76d7cc4 Reviewed-on: https://gerrit.libreoffice.org/77755 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-16use more TOOLS_WARN_EXCEPTIONNoel Grandin
Change-Id: Ic21ea11ff106e0732bb8fa600ef39a549d7bda86 Reviewed-on: https://gerrit.libreoffice.org/77569 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): extensionsStephan Bergmann
Change-Id: Ic99c822e8461ab46056be05846314bb772ef2957 Reviewed-on: https://gerrit.libreoffice.org/76678 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-19missing LDAPCaolán McNamara
since... Make LDAP support optional commit 6776c53b7ce2e431d8636f4e5a755f50f787ec8f Date: Tue Jan 8 04:53:51 2019 -0500 Change-Id: I4268169809b0dc68b347b28523500453394937de Reviewed-on: https://gerrit.libreoffice.org/75865 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-01-21o3tl::make_unique -> std::make_unique in dbaccess...frameworkGabor Kelemen
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: Iad5a422bc5a7da43d905edc91d1c46793332ec5e Reviewed-on: https://gerrit.libreoffice.org/66545 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-04tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski
Change-Id: I3432afca1ee9bf9e8adce1d55d58d57bf1a09cb4 Reviewed-on: https://gerrit.libreoffice.org/62847 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-09-11loplugin:stringbuffer (clang-cl)Stephan Bergmann
Change-Id: Ie49cd58e7363c834c02769dda7c5aa83cca4f587 Reviewed-on: https://gerrit.libreoffice.org/60324 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-01Add missing sal/log.hxx headersGabor Kelemen
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from dbaccess to extensions Change-Id: I4d15aa35e11664ef78c836ffc2937c7e0bb6ea59 Reviewed-on: https://gerrit.libreoffice.org/58165 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-15loplugin:unnecessaryoverride, loplugin:cstylecast (clang-cl)Stephan Bergmann
Change-Id: I316965219f70a87b59b731e4d5e6b67d2010c2b9 Reviewed-on: https://gerrit.libreoffice.org/54350 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-05-09Don't throw in LdapUserProfileBe ctor on LDAP misconfigurationMike Kaganski
Otherwise LO crashes e.g. at opening Expert Configuration dialog. Instead, log the event, create an empty backend, and return empty values. Change-Id: I433fc89c003e7886dfc5242a4ef8defa46d643d3 Reviewed-on: https://gerrit.libreoffice.org/53958 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-05-02WinUserInfoBe: a new config backend for user data provided by WindowsMike Kaganski
This backend provides Active Directory details for current user. If the system is not part of Active Directory domain, GetUserNameEx is used instead, so at least user (given) name is configured. Unlike ldap backend, this one doesn't need connection configuration, as the used API works with current user security context. Change-Id: I74bcc79591a658dc5121df1f09caa15d272fbe12 Reviewed-on: https://gerrit.libreoffice.org/53590 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-12-14No need to keep these whitelisted functions decorated with SAL_CALLStephan Bergmann
The only effect SAL_CALL effectively has on LO-internal code is to change non- static member functions from __thiscall to __cdecl in MSVC (where all other functions are __cdecl by default, anyway). (For 3rd-party code, it could be argued that SAL_CALL is useful on function declarations in the URE stable interface other than non-static member functions, too, in case 3rd-party code uses a compiler switch to change the default calling convention to something other than __cdecl. But loplugin:salcall exempts the URE stable interface, anyway.) One could argue that SAL_CALL, even if today it effectively only affects non- static member functions in MSVC, could be extended in the future to affect more functions on more platforms. However, the current code would already not support that. For example, 3af500580b1c82eabd60335c9ebc458a3f68850c "loplugin:salcall fix functions" changed FrameControl_createInstance in UnoControls/source/base/registercontrols.cxx to no longer be SAL_CALL, even though its address (in ctl_component_getFacrory, in the same file) is passed to cppuhelper::createSingleFactory as an argument of type cppu::ComponentInstantiation, which is a pointer to SAL_CALL function. Change-Id: I3acbf7314a3d7868ed70e35bb5c47bc11a0b7ff6 Reviewed-on: https://gerrit.libreoffice.org/46436 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-11loplugin:salcall fix functionsNoel Grandin
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-22tdf#112689 Replace chained O(U)StringBuffer::append with operator+qzheng
Change OUStringBuffer::append() to operator+. Change-Id: I13232cb69b1d62acfcf15d5ba5a2d72e5ab5d253 Reviewed-on: https://gerrit.libreoffice.org/44703 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-10-23loplugin:includeform: extensionsStephan Bergmann
Change-Id: I2f9001ddae6cbcef51ba2c0415baa727f211261d
2017-10-05Rename and move SAL_U/W to o3tl::toU/WMike Kaganski
Previosly (since commit 9ac98e6e3488e434bf4864ecfb13a121784f640b) it was expected to gradually remove SAL_U/W usage in Windows code by replacing with reinterpret_cast or changing to some bettertypes. But as it's useful to make use of fact that LibreOffice and Windows use compatible representation of strings, this commit puts these functions to a better-suited o3tl, and recommends that the functions be consistently used throughout Windows-specific code to reflect the compatibility and keep the casts safe. Change-Id: I2f7c65606d0e2d0c01a00f08812bb4ab7659c5f6 Reviewed-on: https://gerrit.libreoffice.org/43150 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>