summaryrefslogtreecommitdiff
path: root/cppu
AgeCommit message (Collapse)Author
2023-11-18c++20: use std::erase instead of std::removed followed by erase (part 2)Julien Nabet
Change-Id: I0222f0f53f387dd57bd674b1e137b53487f4e1d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159611 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-09-28cid#1546008 silence Using invalid iteratorCaolán McNamara
Change-Id: I76043da245d47d10993361235425f48b7f6d4034 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157359 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-03-24loplugin:stringadd in c*Noel Grandin
after my patch to merge the bufferadd loplugin into stringadd Change-Id: I66f4ce2fd87c1e12eefb14406e0e17212f68ceff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149497 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-22Introduce css.reflection.Dump singletonStephan Bergmann
...and revert e1c6f36d8bcc0799281e3a7e244175f682d97cb2 "Add a to_string() function to the code generated for UNO IDL constant groups". (But keep the constants groups the latter had added to cppu/qa/cppumaker/types.idl, and use them in the newly added CppunitTest_stoc_dump, for better or worse.) Change-Id: I56e9eaeb1e45b83a72a25eceef13e719dc6f3a1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149281 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Jenkins
2023-03-17Add a to_string() function to the code generated for UNO IDL constant groupsTor Lillqvist
If the inpt matches one of the constants exactly, the result is the name of that constant. If the input matches some combination of constant values that are single bits, the result is the sequence of the names of those constants joined with plus signs. For instance, if the IDL has: constants Constants { const byte BIT0 = 1; const byte BIT1 = 2; const byte BIT2 = 4; const byte BIT3 = 8; } The result of Constants::to_string(5) is "BIT0+BIT2", and the result of Constants::to_string(17) is "17". I am sure there are corner cases that aren't handled as would be intuitive, especially with types that include unsigned values. Correspondingly, the semantics of the generated to_string() functions is not formally defined. Also add a unit test for the new functionality. Change-Id: I14aa826d0989ac6dfe97dd5c09119b1601c65643 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148995 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-02-15Drop 'using namespace ::std' in dirs b* c*Gabor Kelemen
Change-Id: I59392ee7aa71c219e475a09da67a868cfdd14b41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147074 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2023-01-27Remove support for AIXStephan Bergmann
As discussed in the mailing list thread starting at <https://lists.freedesktop.org/archives/libreoffice/2023-January/089808.html> "Plan to remove dead C++ UNO bridge implementations (bridges/source/cpp_uno/*)", the bridge implementation at bridges/source/cpp_uno/gcc3_aix_powerpc is apparently dead and should thus be removed. However, that was the only bridge implementation for AIX, which implies that support for the AIX platform as a whole is dead and should thus be removed. Change-Id: I96de3f7f97d4fd770ff78256f0ea435383688be9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146057 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-10-11Deduplicate O(U)StringConcatenationMike Kaganski
And use an overloaded helper function with a better (?) unified name to show that the result is not an O(U)String. Change-Id: I8956338b05d02bf46a6185828130ea8ef145d46b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141203 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-10Better cast to sal_[u]IntPtr when passing pointer to O[U]String::numberStephan Bergmann
Change-Id: I5b7a0fa060c1e0ae4aa194e0c1862f303dd8a2d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138062 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-07-21elide some makeStringAndClear() callsNoel Grandin
Change-Id: Ifd8de0042b843de0766a370fb19b9f7791974612 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137284 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-13Drop obsolete preprocessor directives from UNOIDL filesStephan Bergmann
...which were used by ildc, which is gone since a8485d558fab53291e2530fd9a1be581c1628deb "[API CHANGE] Remove deprecated idlc and regmerge from the SDK", and have always been ignored as legacy by its unoidl-write replacement. This change has been carried out (making use of GNU sed extensions) with > for i in $(git ls-files \*.idl); do sed -i -z -E -e 's/\n\n((#[^\n]*\n)+\n)*(#[^\n]*\n)+\n?/\n\n/g' -e 's/\n(#[^\n]*\n)+/\n/g' "$i"; done && git checkout extensions/source/activex/so_activex.idl odk/examples/OLE/activex/so_activex.idl which apparently happened to do the work. (The final two files are not UNOIDL source files.) Change-Id: Ic9369e05d46e8f7e8a304ab01740b171b92335cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135683 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-01No need to call resume() on all already running threadStephan Bergmann
(This was there ever since the beginning in 85c2477a9479b08e49e651a8f6bede5b8b51613c "INTEGRATION: CWS bunoexttm", while for the similar OuterThread it was always absent.) Change-Id: I3c43f0e35435b6035f6a1f2a1ca9f104bd639689 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135240 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-29New o3tl::intcmp.hxxStephan Bergmann
...introducing o3tl::cmp_equal etc. implementing C++23 std::cmp_equal etc., plus an o3tl::IntCmp wrapper around it for convenient operator syntax Change-Id: I1d2e0d1aef99c531039fb83de31ed8e6036fde03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135095 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-29[API CHANGE] Deprecate unused typelib_setCacheSize and make it a no-opStephan Bergmann
...and simplify the remaining code using the (now const) nCacheSize Change-Id: I4468cf223c158a318ba56ba63f5f60121c94f42d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134879 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-23Extend '-Werror=attributes' workaround to GCC versions < 12.1Michael Weghorn
Adapt the GCC version check from the workaround introduced in commit 2c6cea672a852b85cfb6d2e313d806f257481417 Date: Wed May 18 10:46:55 2022 +0200 Work around bogus -Werror=attributes with old GCC ...after 9c3c6a6b661ea8f84c1285b07a502de5c98a1495 "Replace OFFSET_OF macro with a function template", as seen at <https://ci.libreoffice.org//job/lo_tb_master_linux_dbg/38076/>, > /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppu/source/uno/check.cxx:263:28: error: ‘maybe_unused’ attribute ignored [-Werror=attributes] > [[maybe_unused]] Char3 chars; > ^~~~~ (Not sure which versions of GCC are affected exactly; lets restrict this to to all versions before 12.1. My GCC 11.3.0 build on Debian testing failed just the same way otherwise. A `git log --grep=maybe_unused` in the GCC git repo suggests that this is no longer necessary from the following GCC 12.1 commit [1] on: commit c0f769fa3114ea852a26d93f0ee3f9595463de0b Author: Jason Merrill <jason@redhat.com> Date: Fri Jun 11 16:10:50 2021 -0400 c-family: don't warn for [[maybe_unused]] on data member The C++17 standard (and C2x) says that [[maybe_unused]] may be applied to a non-static data member, so we shouldn't warn about it. And I don't see a reason not to handle a FIELD_DECL the same as any other decl, by setting TREE_USED on it. It doesn't look like anything yet cares about that flag on a FIELD_DECL, but setting it shouldn't hurt. gcc/c-family/ChangeLog: * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL. gcc/testsuite/ChangeLog: * g++.dg/ext/attrib62.C: No longer warn. * g++.dg/diagnostic/maybe_unused1.C: New test. gcc/ChangeLog: * doc/extend.texi (unused variable attribute): Applies to structure fields as well. [1] https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=c0f769fa3114ea852a26d93f0ee3f9595463de0b Change-Id: I815e4a24da13e0ae66b1dff2941e636c7ebdfd9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134653 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2022-05-18Work around bogus -Werror=attributes with old GCCStephan Bergmann
...after 9c3c6a6b661ea8f84c1285b07a502de5c98a1495 "Replace OFFSET_OF macro with a function template", as seen at <https://ci.libreoffice.org//job/lo_tb_master_linux_dbg/38076/>, > /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppu/source/uno/check.cxx:263:28: error: ‘maybe_unused’ attribute ignored [-Werror=attributes] > [[maybe_unused]] Char3 chars; > ^~~~~ (Not sure which versions of GCC are affected exactly; lets restrict this to GCC 7 for now.) Change-Id: I28ec8914b60c98dce769ad40ef4141aec4960aa3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134509 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-18Replace OFFSET_OF macro with a function templateStephan Bergmann
(in preparation of extending loplugin:redundantcast to more reinterpret_cast scenarios, which would have caused a false positive here). Required a tweak to loplugin:fakebool (as the relevant reinterpret_cast to silence some occurrences is no longer seen "inline" now), and the heuristics of loplugin:unused no longer worked (also because of the now-hidden reinterpret_cast'ing), but adding a maybe_unused attribute looks better than tweaking that plugin's heuristics even further. Change-Id: Iead1a9b31983918cf8f3b0e6c727c0081437c6d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134504 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-17clang-tidy modernize-pass-by-value in cppuNoel Grandin
Change-Id: I7f6432b9609d175ff7e21ff2e73991275eea60b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134473 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-09osl::Mutex->std::mutex in cppu::MappingsDataNoel Grandin
Change-Id: I34292537e9724d7667ba099285c87a32ae13ffad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134028 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-04Just use Any ctor instead of makeAny in cppuStephan Bergmann
Change-Id: Ie178e13251b7cb1b69facbbc12e530f6dc4632ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133836 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-29Use the false warning suppression mechanism for loplugin:fakeboolStephan Bergmann
Change-Id: I6572e500edc1be845c28389b0a4d3ca258dbbecb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133593 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-21use more string_view in cppuNoel Grandin
Change-Id: Id6b33eb39917ce7b805ea4a5d713d5d78aaa93ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133257 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-14Simplify equality comparison among the various UNOIDL integer typesStephan Bergmann
Change-Id: I67b11049938de470a2a5096cac376fdb0529ab5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132992 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-13use more string_view in cppuNoel Grandin
Change-Id: Ifd2ee4827e0083ffaff9120fee239fb16553380e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132957 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-09use more subView when converting to Int32Noel Grandin
Change-Id: Ia1be48050cca386a6e765aa2229de1bc9e64ffff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132749 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-19WASM UNO: add a minimal dummy bridgeThorsten Behrens
... and use the same fake exception rethrowing code then the mobile platforms. Change-Id: Ic90de1cfd1e0092d6064d041a613d60d9f5f76b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128596 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-13Fix buildStephan Bergmann
...after 840b4eb2f3443ff883016e6a8a8ae49e9cbd9e4e "Recheck modules [a-c]* with IWYU" causing > In file included from workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:8, > from workdir/UnpackedTarball/cppunit/include/cppunit/TestCase.h:6, > from workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:5, > from workdir/UnpackedTarball/cppunit/include/cppunit/extensions/HelperMacros.h:9, > from cppu/qa/test_any.cxx:26: > workdir/UnpackedTarball/cppunit/include/cppunit/tools/StringHelper.h: In instantiation of ‘typename std::enable_if<(! std::is_enum<_Tp>::value), std::__cxx11::basic_string<char> >::type CppUnit::StringHelper::toString(const T&) [with T = char16_t; typename std::enable_if<(! std::is_enum<_Tp>::value), std::__cxx11::basic_string<char> >::type = std::__cxx11::basic_string<char>]’: > workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:74:50: required from ‘static std::string CppUnit::assertion_traits<T>::toString(const T&) [with T = char16_t; std::string = std::__cxx11::basic_string<char>]’ > workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:168:58: required from ‘void CppUnit::assertEquals(const T&, const T&, SourceLine, const std::string&) [with T = char16_t; std::string = std::__cxx11::basic_string<char>]’ > cppu/qa/test_any.cxx:282:9: required from here > workdir/UnpackedTarball/cppunit/include/cppunit/tools/StringHelper.h:25:9: error: use of deleted function ‘std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char16_t) [with _Traits = char_traits<char>]’ > 25 | ost << x; > | ~~~~^~~~ > In file included from ~/gcc/trunk/inst/include/c++/12.0.0/istream:39, > from ~/gcc/trunk/inst/include/c++/12.0.0/sstream:38, > from workdir/UnpackedTarball/cppunit/include/cppunit/portability/Stream.h:283, > from workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:7, > from workdir/UnpackedTarball/cppunit/include/cppunit/TestCase.h:6, > from workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:5, > from workdir/UnpackedTarball/cppunit/include/cppunit/extensions/HelperMacros.h:9, > from cppu/qa/test_any.cxx:26: > ~/gcc/trunk/inst/include/c++/12.0.0/ostream:558:5: note: declared here > 558 | operator<<(basic_ostream<char, _Traits>&, char16_t) = delete; > | ^~~~~~~~ etc. Change-Id: I2e6d3591dec9eeb6647738d37296c7d2bfa6a186 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128369 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-02Fix clang-cl -Zc:dllexportInlines- buildStephan Bergmann
That flag is only supported by clang-cl, not by MSVC, and c7c9f3f57a2feae5d3bc3c47104786883ed09e44 "use clang-cl's -Zc:dllexportInlines- for clang-cl builds" apparently naively assumed that it would work to build LO with clang-cl and that flag without actually trying it out, and 1040228c356d75c5228cde4d6103f9b446848e4b "My clang-cl build does not work with -Zc:dllexportInlines-" effectively disabled it completely. The way to avoid unresolved external symbols during linking of URE libraries (see the 1040228c356d75c5228cde4d6103f9b446848e4b commit message) is apparently to also build libraries that the URE libraries depend on with the flag, hence the change from gb_Library_set_is_ure_library to gb_Library_set_is_ure_library_or_dependency. For now, I only marked those additional libraries (unoil and xmlreader) that actually caused issues when linking the URE libraries. Change-Id: I3a85c73246250981cd86b7ee41f87b41f393a4b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126012 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
2021-11-09BaseList doesn't need set member after the constructor is doneNoel Grandin
Change-Id: Idc174a0cd53c45beba3100b1f8258e6839291be8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124885 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-09rtl::Static to thread-safe staticNoel Grandin
Change-Id: I35e2a252708228bdbeaee557ef35763c64608653 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124884 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-26d46f659c7524625474f0bb907805e285ee27d5ec follow-up: simplify checksMike Kaganski
Change-Id: Ib95e7c562741f76a742cd31aa033956a0f0a3c45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124169 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-26d46f659c7524625474f0bb907805e285ee27d5ec follow-up: add unit testMike Kaganski
Change-Id: I34be2bc813bf0d62cac935a84c6371cd64ee68f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124168 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-26Make sure that self-assign test checks typesMike Kaganski
This may be important with static empty sequence cppu::g_emptySeq, that is common for sequences of different types. The changes in sd/qa/unit/data/xml/*.xml fix places where anys with empty Sequence<OUString> used to wrongly take 'if(aAny >>= aPropSeq)' branch in dumpPropertyValueAsElement (drawinglayer/source/dumper/XShapeDumper.cxx). Change-Id: I5b0544ca94b30437c01dd46f376408f91510bcb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124167 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-11In O[U]StringBuffer, make string_view params replacements for OUString onesStephan Bergmann
...for LIBO_INTERNAL_ONLY, instead of having them as additional overloads. That way, loplugin:bufferadd and loplugin:stringviewparam found many further opportunities for simplification (all addressed here). Some notes: * There is no longer an implicit conversion from O[U]String to O[U]StringBuffer (as that goes via user-defined conversions through string_view now), which was most noticeable in copy initializations like OStringBuffer buf = someStr; that had to be changed to direct initialization, OStringBuffer buf(someStr); But then again, it wasn't too many places that were affected and I think we can live with that. * I made the O[U]StringBuffer ctors taking string_view non-explicit, mainly to get them in line with their counterparts taking O[U]String. * I added an OUStringBuffer::lastIndexOf string_view overload that was missing (relative to OUStringBuffer::indexOf). * loplugin:stringconstant needed some addition to keep the compilerplugins/clang/test/stringconstant.cxx checks related to OStringBuffer::append and OStringBuffer::insert working. * loplugin:stringviewparam no longer needs the special O[U]StringBuffer-related code that had been introduced in 1250aecd71fabde4dba990bfceb61bbe8e06b8ea "loplugin:stringviewparam extend to new.." Change-Id: Ib1bb8c4632d99b744e742605a9fef6eae959fd72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122904 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-03A more lightweight O[U]StringConcatenationStephan Bergmann
...compared to a full-blown O[U]String, for temporary objects holding an O[U]StringConcat result that can then be used as a std::[u16]string_view. It's instructive to see how some invocations of operator ==, operator !=, and O[U]StringBuffer::insert with an O[U]StringConcat argument required implicit materialization of an O[U]String temporary, and how that expensive operation has now been made explicit with the explicit O[U]StringConcatenation ctor. (The additional operator == and operator != overloads are necessary because the overloads taking two std::[u16]string_view parameters wouldn't even be found here with ADL. And the OUString-related ones would cause ambiguities in at least sal/qa/rtl/strings/test_oustring_stringliterals.cxx built with RTL_STRING_UNITTEST, so have simply been disabled for that special test-code case.) Change-Id: Id29799fa8da21a09ff9794cbc7cc9b366e6803b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122890 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-03drop 'using namespace std' in cppuJulien Nabet
Change-Id: I1c9e6d27e47e25bc5c96ceac8d72c7c112c73d61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123019 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-09-20use clang-cl's -Zc:dllexportInlines- for clang-cl buildsLuboš Luňák
This is clang-cl's equivalent of -fvisibility-inlines-hidden, and it seems to be also sort of the equivalent of MSVC's -Zc:inline. So it saves build time and disk space. Clang docs say that this is binary compatible in only one direction, so our public C++ code shouldn't be using this, as external C++ code could try to use exported inlines that are no longer there. Change-Id: Ie6217808f8ee4a15344183abfc65038e1558d1b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122352 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-09-10clang:optin.performance.Padding in cppuNoel Grandin
Excessive padding in 'struct cppu::IdContainer' (11 padding bytes, where 3 is optimal). Excessive padding in 'struct (anonymous namespace)::ObjectEntry' (11 padding bytes, where 3 is optimal). Change-Id: I39216b9927abeb8ec61ab590dc25bc203a112028 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121921 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-31Elide class makeOIdPartStephan Bergmann
...which is no longer needed since 00f257a7ef4f1ec52887bc379c14757e057e94c8 "rtl::Static -> thread-safe static local" Change-Id: Ie78154c5d8b6ad8278405d1ce56c76997e0478d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121347 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-15rtl::Static -> thread-safe static localNoel Grandin
Change-Id: Iac0501e6aa35cc3d8e62f6b6e68b76cf70233aae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120459 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-06return a reference instead of a pointerCaolán McNamara
and remove redundant nullptr OSL_ENSURE check Change-Id: I19e202c3786386ed6f094504a0e1eb6928aa423a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120105 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-06cid#1489779 Uninitialized pointer fieldCaolán McNamara
Change-Id: I3a9405ff1ed161a02b590d2ac996d88b5fb1978d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120099 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-04osl_createThreadKey->thread_local in IdContainerNoel Grandin
Change-Id: I5989610bd49597259d387b81dd7e8c63738255a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120000 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-03Consolidate on C++17 std::scoped_lock instead of std::lock_guardNoel Grandin
as in commit 9376f65a26240441bf9dd6ae1f69886dc9fa60fa Change-Id: I3ad9afd4d113582a214a4a4bc7eea55e38cd6ff9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119927 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-19osl::Mutex->std::mutex in MappingsDataNoel Grandin
Change-Id: I12f46a5468e7d7dde9bfde977adf4ea13eb89ae3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119138 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-19remove unnecessary rtl::StaticNoel Grandin
no need to delay-init something we always need, and laying out a std::unordered_map is something we can normally do at link time anyway. Change-Id: Ide791d20394580bca615aa3ad564c154037e0816 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119137 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-18osl::Mutex->std::mutex in EnvStackNoel Grandin
Change-Id: I1339a362046c96d9056f70cd687d023a055b4cf8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119136 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>