summaryrefslogtreecommitdiff
path: root/cppu/qa
AgeCommit message (Collapse)Author
2024-04-27loplugin:ostr in cppu,cppuhelperNoel Grandin
Change-Id: I15c00d7a87396d07be2d10a0311f308a93e8eec3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166751 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-01-19cppumaker: Work around problematic constant named "auto"Stephan Bergmann
...which had been added all the way back in 2002 with 6cd0bbd8ce6ae2774fc61dacc0f81725ba038d79 "adding new file to HEAD" to constants group css.drawing.CaptionEscapeDirection, which has meanwhile been published, so no chance of cleaning that up. But cppumaker already has a mechanism to work around problematic UNOIDL identifiers, but which was only used for "new-style" entities when they got introduced, mainly to avoid compatibility issues when retroactively changing the code generated for existing entities. But for C++ keywords, the generated code was always broken, so no harm in fixing it, so introduce an additional IdentifierTranslateMode::KeywordsOnly and use that at least for constants, to address the immediate issue. (And with that, a hack can be removed from gb_UnoApiEmbindTarget__add_embind.) Change-Id: I5cf62fd8b3b298dff2ec28452fb97b424a4ba473 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162305 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
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>
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-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-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-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-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-02-08sal_Unicode is always char16_t in LIBO_INTERNAL_ONLY code nowStephan Bergmann
...since 9ac98e6e3488e434bf4864ecfb13a121784f640b "Finally switch MSVC to sal_Unicode = char16_t, too" Change-Id: I0df169307618aba3f609400312737c6e1e1d3aaf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110581 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-08Improve loplugin:cppunitassertequal for CPPUNIT_ASSERT(a && b)Stephan Bergmann
...by re-enabling the code temporarily #if'ed-out in a528392e71bc70136021be4e3d83732fccbb885e "Fixed/improved loplugin:cppunitassertequals" (and which then triggers lots of other lopglugin:cppunitassertequal CPPUNIT_ASSERT -> CPPUNIT_ASSERT_EQUAL warnings). For two css::uno::Reference equality comparisons in cppu/qa/test_any.cxx, it was more straightforward to rewrite them with an explicit call to operator == (which silences loplugin:cppunitassertequal) than to adapt them to CPPUNIT_ASSERT_EQUAL's requirement for arguments of identical types. In sc/qa/unit/ucalc_pivottable.cxx, ScDPItemData needs toString, which has been implemented trivially for now, but might want to combine that with the DEBUG_PIVOT_TABLE-only ScDPItemData::Dump. Change-Id: Iae6d09cf69bd4e52fe4411bba9e50c48e696291c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110546 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-06Reinstate o3tl/cppunittraitshelper.hxx uses for C++20Stephan Bergmann
...introduced with 5d8f0fad50f90195a11873c70ddab4644f5839ea "Adapt CPPUNIT_ASSERT to C++20 deleted ostream << for sal_Unicode (aka char16_t)" (see there for details) but erroneously removed with 7bdbb50a507df4c419f68d2ae453dd482267f168 "tdf#42949 Fix new IWYU warnings in directories c*" Change-Id: I32880a719525915f397fc65979265b67189ec604 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105397 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-04-28tdf#115399: Don't kill pre-existing typelib_TypeDescription membersStephan Bergmann
...in typelib_typedescription_register, in case they are already being referenced from elsewhere. Instead, only move from *ppNewDescription to pTDR->pType those members that were not yet initialized in the latter. Change-Id: I7620219d137f8dd7f24a0f4a04eda30669b6c5a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93062 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-15clang-tidy modernize-concat-nested-namespace in cppcanvas..cppuhelperNoel Grandin
Change-Id: I0bb4ea91288a15fb590d077fb390c53be8b50400 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86801 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-07Replace a CPPUNIT_ASSERT_EQUAL with a static_assertStephan Bergmann
Change-Id: I8382aa13eb9c65ae61fc0dbfe440df6718133c18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86352 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-03Adapt CPPUNIT_ASSERT to C++20 deleted ostream << for sal_Unicode (aka char16_t)Stephan Bergmann
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1423r3.html> "char8_t backward compatibility remediation", as implemented now by <https://gcc.gnu.org/ git/?p=gcc.git;a=commit;h=0c5b35933e5b150df0ab487efb2f11ef5685f713> "libstdc++: P1423R3 char8_t remediation (2/4)" for -std=c++2a, deletes operator << overloads that would print an integer rather than a (presumably expected) character. But for simplicity (and to avoid issues with non-printing characters), keep printing an integer here. Change-Id: I751b99ee32d418eb488131ffa130d6f7d6d38dc7 Reviewed-on: https://gerrit.libreoffice.org/84348 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-04-15improve loplugin simplifyconstructNoel Grandin
to find stuff like OUString s = OUString("xxx") Change-Id: Ie7ed074c1ae012734c67a2a89c564c1900a4ab04 Reviewed-on: https://gerrit.libreoffice.org/70697 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-29tdf#42949 Fix IWYU warnings in cppu/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ia1b2f0a9c99acc7ac538f3b41c1b6757d414db35 Reviewed-on: https://gerrit.libreoffice.org/66970 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-06Remove obsolete GCC version checksStephan Bergmann
...after <https://gerrit.libreoffice.org/63951> "Bump (Linux) GCC baseline to 7.0.0". (In some cases, those checks now need to check for __clang__, which was implicitly covered in the past by Clang consistently reporting to be GCC 4.2.1.) Change-Id: I860fef8c4ca41c22a7541f0fb2d34b37d1d69bed Reviewed-on: https://gerrit.libreoffice.org/63952 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-24remove more rtl::OUString and OString prefixesNoel Grandin
which seem to have snuck back in since the great rounds of removals. Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1 Reviewed-on: https://gerrit.libreoffice.org/62229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-17New loplugin:externalStephan Bergmann
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-06-01loplugin: look for CPPUNIT_ASSERT_EQUALS with params swappedNoel Grandin
idea originally from either tml or moggi, can't remember which Change-Id: Id78d75035036d3aa1666e33469c6eeb38f9e624d Reviewed-on: https://gerrit.libreoffice.org/55126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-15More loplugin:cstylecast: cppuStephan Bergmann
Change-Id: I728a40ab6ef4aa44fbe328abdf244e6b5fac9d04
2017-12-07loplugin:salcall handle static methodsNoel Grandin
Change-Id: Id6820abec4b8ca8bee26d62b333fd30b42a14aec Reviewed-on: https://gerrit.libreoffice.org/46007 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: cppuStephan Bergmann
Change-Id: I438346398fd8430cf4357b8a3d8e9f423966f2ca
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>
2017-09-13Enable -Wunreachable-codeStephan Bergmann
...motivated by <https://gerrit.libreoffice.org/#/c/41565/2> adding dead code at the end of a switch statement, after the last case's "break". -Wunreachable-code appears to work well on Clang, while it appears to have no effect on GCC. Most of the affected places are apparently temporary/TODO/FIXME cases of disabling code via "if (false)", which can be written with an extra set of parentheses as "if ((false))" to silence -Wunreachable-code on Clang (which thus needed loplugin:unnecessaryparen to be adapted accordingly). In some cases, the controlling expression was more complex than just "false" and needed to be rewritten by taking it out of the if statement to silence Clang. One noteworthy case where the nature of the disabled code wasn't immediately apparent: Sep 12 16:59:58 <sberg> quikee, is that "if (false)" in ScExponentialSmoothingDialog::ApplyOutput (sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx) some work-in- progress or dead code? Sep 12 17:02:03 <quikee> sberg: WIP, but you can remove it Sep 12 17:04:47 <sberg> quikee, I'll wrap the false in an extra set of parentheses for now, to silence -Wunreachable-code (I wouldn't want to remove it, as I have no idea whether I should then also remove the "Initial value" comment preceding it) Sep 12 17:07:29 <quikee> sberg: both are different ways to calculate the "intital value"... so no Another case where the nature of the dead code, following while (true) loops without breaks, is unclear is sd/source/ui/remotecontrol/BluetoothServer.cxx, where I added TODO markers to the workarounds that silence the warnings for now. basic/source/sbx/sbxvalue.cxx had a variable of type double, of automatic storage duration, and without an initalizer at the top of a switch statement. Clang warning about it is arguably a false positive. Apart from that, this didn't find any cases of genuinely dead code in the existing code base. Change-Id: Ib00b822c8efec94278c048783d5997b8ba86a94c Reviewed-on: https://gerrit.libreoffice.org/42217 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-07-02loplugin:casttovoid: cppuStephan Bergmann
Change-Id: I5f2880701f42000e15c148f3c14a211fbbcf2ef1
2017-05-09cleanup osl/diagnose.h includesJochen Nitschke
with command > git grep -l osl/diagnose.h *.cxx | xargs grep -L -w 'OSL_\w*' | xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d' headers need more work Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab Reviewed-on: https://gerrit.libreoffice.org/37350 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-04-28loplugin:salunicodeliteral: cppuStephan Bergmann
Change-Id: I0bb182f258439e6ce7bc7c54d68da4db1581ff19
2017-04-28loplugin:cppunitassertequals: cppuStephan Bergmann
Change-Id: I0497e726ca8c75b84acf3a8d177cfe4883ee2517
2017-04-28Remove now-duplicate css::uno::Type operator <<Stephan Bergmann
...was missing from 06c1dc4c09ba816affb8b65e8215bcd56a81df91 "LIBO_INTERNAL_ONLY: printing of css::uno::Reference/Type" Change-Id: Ifb3f8f72bfeb1038f01797aab9afb5f5059f9d5b
2017-04-14update cppunit to 1.14.0Markus Mohrhard
Change-Id: I95fa42f4ef0580734b605df859c1660b29adb8b2 Reviewed-on: https://gerrit.libreoffice.org/36499 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-04-12clang-tidy: readability-else-after-returnNoel Grandin
run it against sal,cppu,cppuhelper I had to run this multiple times to catch all the cases in each module, and it requires some hand-tweaking of the resulting output - clang-tidy is not very good about cleaning up trailing spaces, and aligning things nicely. Change-Id: I00336345f5f036e12422b98d66526509380c497a Reviewed-on: https://gerrit.libreoffice.org/36194 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-04make UNO enums scoped for internal LO codeNoel Grandin
this modifies codemaker so that, for an UNO enum, we generate code that effectively looks like: #ifdef LIBO_INTERNAL_ONLY && HAVE_CX11_CONSTEXPR enum class XXX { ONE = 1 }; constexpr auto ONE = XXX_ONE; #else ...the old normal way.. #endif which means that for LO internal code, the enums are scoped. The "constexpr auto" trick acts like an alias so we don't have to use scoped naming everywhere. Change-Id: I3054ecb230e8666ce98b4a9cb87b384df5f64fb4 Reviewed-on: https://gerrit.libreoffice.org/34546 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-31teach lolugin:stringconstant about calling constructorsNoel Grandin
so we can remove unnecessary calls to the OUString(literal) constructor when calling constructors like this: Foo(OUString("xxx"), 1) Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36 Reviewed-on: https://gerrit.libreoffice.org/33698 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-26Remove dynamic exception specificationsStephan Bergmann
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-11-21Delete the "Any-to-Any" template specializations for LIBO_INTERNAL_ONLYStephan Bergmann
i.e., css::uno::Any function template specializations Any::has<Any>() const Any::get(Any const &) const operator >>=(Any const &, Any &) operator <<=(Any &, Any const &) that don't make much sense (the first is always true, the rest can be replaced with operator =, which additionally supports move semantics). For 3rd-party compatibility, do this only for LIBO_INTERNAL_ONLY, however. However, some generic template code did benefit from operator >>= working also for Any, so make up for that with a new (LIBO_INTERNAL_ONLY, given that operator >>= still covers if fine for !LIBO_INTERNAL_ONLY) fromAny, complementing the existing toAny. Change-Id: I8b1b5f803f0b909808159916366d53c948206a88 Reviewed-on: https://gerrit.libreoffice.org/30022 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-08-19cppu: fix loplugin:cppunitassertequals warningsMiklos Vajna
Change-Id: I1a459954c84290d340a887212fd1f839f4ebe715 Reviewed-on: https://gerrit.libreoffice.org/28229 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-05-31teach refcounting clang plugin about uno::ReferenceNoel Grandin
uno::Reference is only allowed to used with classes that have a ::static_type member. So convert all those places to rtl::Reference. Maybe we need some LIBO_INTERNAL_ONLY constructors on rtl::Reference and uno::Reference to make this a little smoother? Change-Id: Icdcb35d71ca40a87b1dc474096776412adbfc7e3 Reviewed-on: https://gerrit.libreoffice.org/25516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30Some clean up of uses of css::uno::Any::setValueStephan Bergmann
Change-Id: I04e8aef35a6083b61d775c8eb3f96757da2b31bd
2016-05-06cppu: replace boost::is_same with std::is_sameMichael Stahl
Change-Id: I7014737403da4b53b83488d17399b1c214b7a5db
2016-05-03Handle wchar_t as native C++11 type on windowsDavid Ostrovsky
The option /Zc:wchar_t- prevented to use wchar_t as a built-in type according to the C++ standard. In Visual C++ 6.0 and earlier, wchar_t was not implemented as a built-in type, but was declared in wchar.h as a typedef for unsigned short. Now, years later after the end of life this outdated toolchain, there is no reason not to use native type. The only issue could be the ABI compatibility. But on a quick look at least, it looks like none of the mangled C++ symbols in the stable URE interface actually depend on wchar_t. We forgot to get rid of /Zc:wchar_t- in 5.1. Do that for LibreOffice 5.2, though. Change-Id: I8d6b380660859efa44c83c830734978d31d756a0 Reviewed-on: https://gerrit.libreoffice.org/22589 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-25Cannot extract Any to sal_uInt32Stephan Bergmann
...which has the same underlying type as sal_Bool Change-Id: Ief5a9b9a4d286488efe6e67ee72e7cc23d6f4075
2016-04-08tdf#94306 replace boost::noncopyable in cppuhelperJochen Nitschke
and related modules. Replace with C++11 delete copy-constructur and copy-assignment. Change-Id: I18aa9fe4ff696f9b5472cbe4cd0097cb174618b7 Reviewed-on: https://gerrit.libreoffice.org/23904 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-01-18Avoid -Werror,-Wdelete-non-virtual-dtor with current Clang trunkStephan Bergmann
Change-Id: I5300cd6ff2c924a4acc01ba7f4478a0db50aa08c