path: root/cppu
AgeCommit message (Collapse)AuthorFilesLines
2017-07-19loplugin:constparams in cppuNoel Grandin5-8/+8
Change-Id: I0e772b8cf4ee281b5f3e26131df985607a569c48 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2017-07-17cppu: remove unnecessary LOG_LIFECYCLE_* macrosChris Sherlock6-96/+14
Change-Id: I0f19cf7045e6ff2906404a73ce710e42800c0a72 Reviewed-on: Reviewed-by: Chris Sherlock <> Tested-by: Chris Sherlock <>
2017-07-13use more OUString::operator== comphelper..cuiNoel Grandin4-10/+10
Change-Id: Ib5f3037249152be2b66acf347d1a0c236dc7adfa Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2017-07-10teach unnecessaryparen loplugin about identifiersNoel Grandin1-1/+1
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b Reviewed-on: Reviewed-by: Noel Grandin <> Tested-by: Noel Grandin <>
2017-07-07loplugin:unnecessaryparen handle parens inside call exprNoel Grandin1-2/+2
stick to single-arg function calls, sometimes parens in multi-arg calls might be there for clarity Change-Id: Ib80190c571ce65b5d219a88056687042de749e74 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2017-07-04fix m68k build (again)Rene Engelhard1-6/+20
This reverts commit d5d6ee3b3e7cf3d93f892a452244051e4294fe6d and applies the patch cleanly again. somehow it got mis-applied. Change-Id: Id199d9086fb8e2e52bb810c8ddcbdd7fa7060676 Reviewed-on: Reviewed-by: Rene Engelhard <> Tested-by: Rene Engelhard <>
2017-07-03C++11 remove std::unary_function bases from functorsJochen Nitschke2-3/+2
std::unary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::unary_function base class was used in 3 places: * chart2/source/tools/DataSeriesHelper.cxx: lcl_MatchesRole is used in a std::not1 function helper who uses the members return_type and argument_type. - replace deprecated std::not1 with a lambda * chart2/source/tools/ModifyListenerHelper.cxx: lcl_weakReferenceToSame used the argument_type member in the operator() parameter. - inline the parameter type. * xmloff/source/chart/SchXMLExport.cxx: lcl_SequenceToMapElement used result_type and argument_type in operator(). - inline the types Also fix compile error with gcc about finding std::for_each. Change-Id: I073673beb01410c3108e7d0346d9e7d6b9ad2e2f Reviewed-on: Reviewed-by: Stephan Bergmann <> Tested-by: Stephan Bergmann <>
2017-07-02loplugin:casttovoid: cppuStephan Bergmann1-4/+4
Change-Id: I5f2880701f42000e15c148f3c14a211fbbcf2ef1
2017-06-18remove unused osl/mutex.hxx includesJochen Nitschke1-1/+0
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Jochen Nitschke <>
2017-05-28remove unnecessary use of OString::getStrNoel Grandin2-19/+7
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2017-05-18Revert "Fix typos"Stephan Bergmann1-1/+1
This reverts commit 26a67002fcb9381b54de6cae1aaa37120d49066a. "Iff" is not a typo, see 2a65bf32ec270484dcea4d22d3c93552dc0c24dd "Revert 'Typo: iff->if'".
2017-05-18Fix typosAndrea Gelmini1-1/+1
Only replaced "iff" with "if" Change-Id: Ib9dfa5c12b05500043147fe3b65f923b1b12a581 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Eike Rathke <>
2017-05-09cleanup osl/diagnose.h includesJochen Nitschke1-1/+0
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: Tested-by: Jochen Nitschke <> Reviewed-by: Michael Stahl <>
2017-05-07revert OSL_ASSERT changesChris Sherlock19-97/+97
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07tdf#43157: convert rest of cppu from OSL_ASSERT to assertChris Sherlock12-66/+66
Change-Id: I32684aaf33a798484d68bb8c3689cae542a8d608
2017-05-07tdf#43157: convert cppu's LogBridge from OSL_ASSERT to assertChris Sherlock1-4/+4
Change-Id: I8c377e716df65ca272ed4d4c1038260c68b6c30e
2017-05-07tdf#43157: convert cppu's AffineBridge from OSL_ASSERT to assertChris Sherlock1-7/+7
Change-Id: Ia55de2424b6e42a4377e7f5c06387aec79a59ec4
2017-05-07tdf#43157: convert cppu's threadpool from OSL_ASSERT to assertChris Sherlock5-20/+20
Change-Id: Id9cb46db0dd6f635014982ce958804dd0f02dd83
2017-04-28loplugin:salunicodeliteral: cppuStephan Bergmann1-1/+1
Change-Id: I0bb182f258439e6ce7bc7c54d68da4db1581ff19
2017-04-28loplugin:cppunitassertequals: cppuStephan Bergmann1-41/+89
Change-Id: I0497e726ca8c75b84acf3a8d177cfe4883ee2517
2017-04-28Remove now-duplicate css::uno::Type operator <<Stephan Bergmann1-11/+0
...was missing from 06c1dc4c09ba816affb8b65e8215bcd56a81df91 "LIBO_INTERNAL_ONLY: printing of css::uno::Reference/Type" Change-Id: Ifb3f8f72bfeb1038f01797aab9afb5f5059f9d5b
2017-04-21gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky11-11/+0
Uwinapi is discontinued. Change-Id: I063b4d0d8fab2d60de168e960a63b8181158ac01 Reviewed-on: Reviewed-by: David Ostrovsky <> Tested-by: David Ostrovsky <>
2017-04-21remove unnecessary explicit linefeeds from end of SAL and OSL log callsNoel Grandin1-2/+2
Change-Id: I3fa363c8e76e6cfb297f4ec346e3f031c09d6fbf Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2017-04-14update cppunit to 1.14.0Markus Mohrhard1-6/+0
Change-Id: I95fa42f4ef0580734b605df859c1660b29adb8b2 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Markus Mohrhard <>
2017-04-12clang-tidy: readability-else-after-returnNoel Grandin6-83/+66
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: Reviewed-by: Noel Grandin <> Tested-by: Noel Grandin <>
2017-04-04make UNO enums scoped for internal LO codeNoel Grandin2-35/+39
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: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2017-03-03Remove redundant 'inline' keywordStephan Bergmann2-5/+5
...from function definitions occurring within class definitions. Done with a rewriting Clang plugin (to be pushed later). Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Stephan Bergmann <>
2017-02-23Assert IdContainer's bInit in uno_releaseIdFromCurrentThreadStephan Bergmann2-1/+2
...implying that pLocalThreadId, nRefCountOfCurrentId, pCurrentId are initialized, implying that zero-initializing them during construction isn't necessary. Change-Id: I98399203694edde14abc664a82861ba50dfb357c
2017-02-21loplugin:subtlezeroinit: cppuStephan Bergmann2-2/+2
Change-Id: Ie2bbca4c1d7c4730d4ac655a3711f2b9917face0
2017-02-15Drop :: prefix from std in c*/Tor Lillqvist3-6/+6
Change-Id: If078cda95fa6ccd37270a5e9d81cfa0b84e71155 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Tor Lillqvist <>
2017-01-31teach lolugin:stringconstant about calling constructorsNoel Grandin1-2/+2
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: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2017-01-26Remove dynamic exception specificationsStephan Bergmann2-8/+4
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <> "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: Tested-by: Jenkins <> Reviewed-by: Stephan Bergmann <>
2017-01-07coverity#704593 Dereference after null checkCaolán McNamara1-1/+1
Change-Id: I5426cb2e8ca1e8fd2e9f38419ffe6d6e148a7cba
2016-12-15teach sallogareas plugin to catch inconsistenciesNoel Grandin2-2/+2
Change-Id: I8bcea5ffc74d48148bea78da8c17744e288c069a Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2016-12-13OSL_TRACE->SAL in chart2..ooxNoel Grandin2-2/+2
Change-Id: I133a6441824bfbefcfcda130119b5c5d706f86b2 Reviewed-on: Reviewed-by: Noel Grandin <> Tested-by: Noel Grandin <>
2016-12-12uno: Add support for targets with 16-bit alignmentJohn Paul Adrian Glaubitz1-5/+31
Despite being a 32-bit architecture, m68k has a basic alignment of 16-bit for historic reasons. On m68k, SAL_TYPES_ALIGNMENT8 is therefore equal to 2 and we need to cover this case in the static asserts as well. Change-Id: I4c756af25d57e5d49209697f6e678ef71a5845aa Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <>
2016-12-07Prevent self-join in ThreadAdmin::joinStephan Bergmann1-1/+5
Depending on timing, it can apparently happen at least during JunitTest_unordf_complex that a cppu_threadpool::ORequestThread having executed a binaryurp::IncomingRequest holds the last binaryurp::Bridge reference: > #2 0x00007fac4ad6bf97 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x7fac4b4e8c22 "false", file=file@entry=0x7fac4b4eaec7 "sal/osl/unx/thread.cxx", line=line@entry=443, function=function@entry=0x7fac4b4eaefd "void osl_joinWithThread(oslThread)") at assert.c:92 > #3 0x00007fac4ad6c042 in __GI___assert_fail (assertion=0x7fac4b4e8c22 "false", file=0x7fac4b4eaec7 "sal/osl/unx/thread.cxx", line=443, function=0x7fac4b4eaefd "void osl_joinWithThread(oslThread)") at assert.c:101 > #4 0x00007fac4b4d5258 in osl_joinWithThread(oslThread) (Thread=0x7fabfc0011d0) at sal/osl/unx/thread.cxx:443 > #5 0x00007fac47fbdde5 in cppu_threadpool::ThreadAdmin::join() (this=0x7fac1c0069e0) at cppu/source/threadpool/thread.cxx:89 > #6 0x00007fac47fc23af in cppu_threadpool::ThreadPool::joinWorkers() (this=<optimized out>) at cppu/source/threadpool/threadpool.cxx:179 > #7 0x00007fac47fc35b7 in uno_threadpool_destroy(uno_ThreadPool) (hPool=<optimized out>) at cppu/source/threadpool/threadpool.cxx:499 > #8 0x00007fac25b03b5c in binaryurp::Bridge::terminate(bool) (this=0x7fac24117078, final=true) at binaryurp/source/bridge.cxx:277 > #9 0x00007fac25b0794e in binaryurp::Bridge::dispose() (this=0x7fac24117078) at binaryurp/source/bridge.cxx:904 > #10 0x00007fac25b07215 in binaryurp::Bridge::~Bridge() (this=0x7fac24117078) at binaryurp/source/bridge.cxx:847 > #11 0x00007fac25b07409 in binaryurp::Bridge::~Bridge() (this=0x7fac24117078) at binaryurp/source/bridge.cxx:838 > #12 0x00007fac25b39ee1 in std::default_delete<binaryurp::IncomingRequest>::operator()(binaryurp::IncomingRequest*) const (this=<optimized out>, __ptr=0x7fabfc00ba50) at /usr/lib/gcc/x86_64-redhat-linux/6.2.1/../../../../include/c++/6.2.1/bits/unique_ptr.h:76 > #13 0x00007fac25b38fa8 in std::unique_ptr<binaryurp::IncomingRequest, std::default_delete<binaryurp::IncomingRequest> >::~unique_ptr() (this=0x7fac0bb74ac0) at /usr/lib/gcc/x86_64-redhat-linux/6.2.1/../../../../include/c++/6.2.1/bits/unique_ptr.h:236 > #14 0x00007fac25b36d71 in request(void*) (pThreadSpecificData=<optimized out>) at binaryurp/source/reader.cxx:83 > #15 0x00007fac47fbaa95 in cppu_threadpool::JobQueue::enter(long, bool) (this=<optimized out>, nDisposeId=<optimized out>, bReturnWhenNoJob=<optimized out>) at cppu/source/threadpool/jobqueue.cxx:107 > #16 0x00007fac47fbe1f9 in cppu_threadpool::ORequestThread::run() (this=0x7fabfc001160) at cppu/source/threadpool/thread.cxx:165 > #17 0x00007fac47fbf9ca in threadFunc(void*) (param=0x7fabfc001170) at include/osl/thread.hxx:185 > #18 0x00007fac4b4d5a3c in osl_thread_start_Impl(void*) (pData=0x7fabfc0011d0) at sal/osl/unx/thread.cxx:240 > #19 0x00007fac4ab2a5ca in start_thread (arg=0x7fac0bb75700) at pthread_create.c:333 > #20 0x00007fac4ae420ed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 while the main thread is already shutting down: > #19 0x00007fac4b14100f in desktop::Desktop::doShutdown() (this=0x7fff8a6149d0) at desktop/source/app/app.cxx:1783 > #20 0x00007fac4b13f505 in desktop::Desktop::Main() (this=0x7fff8a6149d0) at desktop/source/app/app.cxx:1716 > #21 0x00007fac419a0f79 in ImplSVMain() () at vcl/source/app/svmain.cxx:185 > #22 0x00007fac419a1c14 in SVMain() () at vcl/source/app/svmain.cxx:223 > #23 0x00007fac4b17c773 in soffice_main() () at desktop/source/app/sofficemain.cxx:166 > #24 0x0000000000400916 in sal_main () at desktop/source/app/main.c:48 > #25 0x00000000004008fb in main (argc=<optimized out>, argv=<optimized out>) at desktop/source/app/main.c:47 Change-Id: I34beac40e89f6d522af49f9dcdb3ed2fc1259c4b
2016-11-21Delete the "Any-to-Any" template specializations for LIBO_INTERNAL_ONLYStephan Bergmann4-80/+90
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: Reviewed-by: Stephan Bergmann <> Tested-by: Stephan Bergmann <>
2016-10-28Use OUString ctor instead of rtl_uString_newFromAsciiStephan Bergmann1-32/+15
Change-Id: I84ea23c4de5c631fe7d0104944b0b8f0f13abb26
2016-10-28cppu/source/uno/EnvDcp.c -> cppu/source/uno/EnvDcp.cxxStephan Bergmann2-4/+1
Change-Id: Ic02d217efef970a365a584f2558c41561e4c6e3d
2016-09-20cid#1371314: Add move semanticsStephan Bergmann1-0/+10
Change-Id: I995cbdb2b6adc707abe5f1a179e94251641120bc
2016-09-15replace sal_Size with std::size_t (or sal_uInt64 for SvStream pos)Michael Stahl2-3/+3
... except in include/rtl, include/sal, include/uno, where sal_Size is retained for compatibility, and where callers of rtl functions pass in pointers that are incompatible on MSVC. Change-Id: I8344453780689f5120ba0870e44965b6d292450c
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann7-9/+9
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-09-01std::list<sal_Int64> -> std::dequeNoel Grandin2-4/+3
Change-Id: Ib34d6bf97fc97ea1c30c184a7de4ace7f533065f
2016-09-01::std::list < sal_Int64 > -> std::vectorNoel Grandin2-14/+11
Change-Id: Ia3c3b8dd1fc3c5865ad0642cfa93430b95fae9d2
2016-08-23icopyConstructFromElements's nAlloc is never negativeStephan Bergmann1-39/+19
follow-up to 7fa183cb1a04120b37069c63166182065c3d975c "loplugin:countusersofdefaultparams in chart2..desktop" Change-Id: I099229ac4a3670e26570b083e3b0a4a92984f663
2016-08-19cppu: fix loplugin:cppunitassertequals warningsMiklos Vajna2-27/+27
Change-Id: I1a459954c84290d340a887212fd1f839f4ebe715 Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Jenkins <>
2016-08-05loplugin:countusersofdefaultparams in chart2..desktopNoel Grandin1-2/+2
Change-Id: Iaca94acd6ef91f07ed0c0085390500c418099dee Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2016-08-01tdf#100726: Improve readability of OUString concatenationnadith1-3/+1
this bug fixed in the modules between canvas - cppu Change-Id: I2022b022897dafde20251352376e3facdb9b8d75 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2016-07-11int -> boolStephan Bergmann1-4/+4
Change-Id: I8e8bedcc510a895cda90c9979bf75afca0ea9071