summaryrefslogtreecommitdiff
path: root/cppu/source
AgeCommit message (Collapse)Author
2014-01-21Fix bogus mass-conversion equalsAsciiL -> startsWithStephan Bergmann
3af99e4d59d89c343965a928681a30f36b1007d2 "convert equalsAsciiL calls to startsWith calls" should rather have converted to oprator ==. (cherry picked from commit a3f32769fc4bb23c64168b412dd10ec769a3854d) Conflicts: sc/source/ui/unoobj/nameuno.cxx sc/source/ui/unoobj/styleuno.cxx sfx2/source/appl/sfxhelp.cxx stoc/source/security/permissions.cxx sw/source/core/unocore/unocrsrhelper.cxx (None of those bogus startsWith calls seem problematic enough to warrant backporting also to libreoffice-4-2-0.) Change-Id: Id4a8836c5d6d570e54661c40be7214632e202b21 Reviewed-on: https://gerrit.libreoffice.org/7578 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-11-20remove unnecessary RTL_CONSTASCII_STRINGPARAM in appendAscii callsNoel Grandin
Convert code like: aStrBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ln(x)" )); to: aStrBuf.append( "ln(x)" ); which compiles down to the same code. Change-Id: I24c7cb45ceb32fd7cd6ec7ed203c2a5d746f1c5c
2013-11-20convert equalsAsciiL calls to startsWith callsNoel Grandin
Convert code like: aStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ActiveConnection" ) ) to aStr.startsWith( "ActiveConnection" ) which compiles down to the same machine code. Change-Id: Id4b0c5e0f9afe716a468d3afc70374699848dc33
2013-10-21fdo#68849 add some header guardsThomas Arnhold
Change-Id: I9d25a58f22095689eccc0ac444c163d1e9bee69f Reviewed-on: https://gerrit.libreoffice.org/6364 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-09-04UNO interface UIKs are unused for a very long timeStephan Bergmann
...so mark them as @deprecated more thoroughly and always force them to zero. Change-Id: I5db2dab924fc5a4145a0e5dd055b654985ce2ef9
2013-08-22Better assertionsStephan Bergmann
Change-Id: I4ba11570328e17abdf063049065b4fc6dcc65a9d
2013-08-21finish deprecation of O(U)String::valueOf()Luboš Luňák
Compiler plugin to replace with matching number(), boolean() or OUString ctor, ran it, few manual tweaks, mark as really deprecated. Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
2013-08-21osl_getThreadIdentifier(0) -> osl::Thread::getCurrentIdentifier()Stephan Bergmann
Change-Id: Ida9785c4b9fda0459769957734952e69d7a9de44
2013-08-19Rename SOLAR_JAVA to ENABLE_JAVA and HAVE_FEATURE_JAVATor Lillqvist
Change-Id: Ib451bdb3c1c2ca42347abfde44651d5cf5eef4f3
2013-08-12error: dereferencing type-punned pointer will break strict-aliasing rulesStephan Bergmann
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3) Change-Id: I0b5809ec1dd3fb616bb7698972205a2810ed1aa5
2013-08-02Mark as constTakeshi Abe
Change-Id: I7ad2a1bd29afbf4813b1ad984081935ca84ec98a
2013-07-03fdo#63690 - replace RTL_CONTEXT_ macros with SAL_INFORadu Ioan
- replaced RTL_CONTEXT_ with SAL_INFO - replace OSL_* with SAL_* Change-Id: I26761cf1d4c1cfe21dec7d8ede6df6f177bf2c3e Reviewed-on: https://gerrit.libreoffice.org/4620 Reviewed-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr> Tested-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr>
2013-05-09protect UNO EnvStack's s_setCurrent() against unknown threadidHerbert Dürr
untracked threadIds have been observed and can result in crashes. s_getCurrent() already checks them and s_setCurrent() does it now. (cherry picked from commit bf8e3135ac906ce0ab7d6d9ccbd434f1597f2ff4) Conflicts: cppu/source/uno/EnvStack.cxx Change-Id: If35237179c1ee3b854e6183294ed72a6d0b105a8
2013-05-06remove usage of RTL_CONSTASCII_USTRINGPARAMLuboš Luňák
Mechanical removal of usage together with OUString ctor, done by compiler plugin. Change-Id: I554227f76df0dac620b1b46fca32516f78b462c5
2013-04-16WaE: variable 'hMod' set but not usedTor Lillqvist
Change-Id: Iae64943671a576159be0fa311bc503aa96b2b5df
2013-04-16do not use deprecated rtl_registerModuleForUnloadingMatúš Kukan
Change-Id: I59014906c8409fc7ac0f155c9562613c309b8b06 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-04-15fdo#60724 correct spellingThomas Arnhold
Change-Id: I7318a9f4f3410edf4dbe67bf08f31682fcb4edc7
2013-03-19removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings declarationsThomas Arnhold
s/(OUString\s+[a-zA-Z_][A-Za-z0-9_]*\s*)\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/$1\($2\)/gms Change-Id: Iad20f242c80c4bdc69df17e2d7a69d58ea53654b Reviewed-on: https://gerrit.libreoffice.org/2835 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-03-19automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStringsThomas Arnhold
Done with a perl regex: s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec Reviewed-on: https://gerrit.libreoffice.org/2832 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-03-18coverity#705137 Missing break in switchJulien Nabet
Change-Id: Ie54c888e15e9564c7e1d0efb54f587a586a53631 Reviewed-on: https://gerrit.libreoffice.org/2780 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-03-05*ppRet cannot become non-null there out of thin airStephan Bergmann
Change-Id: Idd08a89dd0dcf05caeacc9e14a0a6ea10b433588
2013-03-04sal_Bool to boolTakeshi Abe
Change-Id: I8c554fb3faead41c974af9c2a89728bd0bdf5eb6
2013-03-04doubled includesThomas Arnhold
Change-Id: I70ec796188e2388e1e4d699126f7ae817f5ff86e
2013-03-03Related to fdo#60724: correct spellingThomas Arnhold
Using the autocorrect list of LibreOffice extras/source/autotext/lang/en-US/acor/DocumentList.xml Change-Id: I8b93969bc0742c2e95b8b7db3c4c37691e8d3657 Script: http://pastebin.ca/2327716
2013-02-21osl_atomic_increment/decrement are macrosStephan Bergmann
Change-Id: Ib2d61e436d625ac89defe718d4cc1d866d538397
2013-01-26Remove redundant braces around for loopsStephan Bergmann
...that had once been workarounds for compilers that did not yet support the C++98 scoping rules for declarations in for-init-statements. Change-Id: I51dc42982b30bf3adea6de1a10a91c0b4b4acfbe
2013-01-15Include <cassert>Stephan Bergmann
Also, move assert into uno_type_sequence_construct so that all its callers benefit. Also, change some OSL_ENSURE to assert. Change-Id: Idd0a03c4aa6eed1db453db84602c01ff16f0d72c
2012-12-27Some cppcheck cleaningJulien Nabet
Change-Id: Iac1c26d031e8196ef93cb403dc60f07e0eef6380
2012-11-30c++ API: use css alias in generated headers, adds global css declThorsten Behrens
This changes all generated API headers (.hpp and .hdl) to use a namespace alias 'css' instead of the pointlessly long com::sun::star Makes the change in cppumaker & associated tools, adds a global namespace alias definition in sal/types.h, and removes a kiloton of local, now pointless-to-harmful versions of that alias from all over the code. Change-Id: Ice5a644a6b971a981f01dc0589d48f5add31cc0f
2012-11-13Avoid global static dataStephan Bergmann
...that (indirectly) allocates memory via rtl/alloc.h, thereby causing the rtl_cache_wsupdate_init thread to be spawned before main, as on Mac OS X that would interfere with the code in sal_detail_initialize to close all file descriptors >= 3 -- on Mac OS X the pthreads implementation makes use of KQUEUE file descriptors. * This commit removes enough global static data to make ui-preview work again on Mac OS X (where it crashed at startup when the main thread closed the KQUEUE fd used by pthreads implementation threads). gengal uses further static data (at least from module sb), so needs further clean-up. * Avoiding global static instances derived from class Application required the introduction of vcl/vclmain.hxx. * That the vcl library was linked against the static vclmain library (which only provides an implementation of main) appears to me to be a historic relic (all executables should either include a SAL_IMPLEMENT_MAIN or link against vclmain), so I removed that. Change-Id: I048aa616208cb3a1b9bd8dcc3b729ba1665729bd
2012-10-07Handle lack of module loading/unloading API when DISABLE_DYNLOADINGTor Lillqvist
There are basicically two classes of cases: 1) Where the code is for obscure historical reasons or what I see as misguided "optimization" split into a more libraries than necessary, and these then are loaded at run-time. Instead, just use direct linking. 2) Where dynamic loading is part of the functionality offered to some upper (scripting etc) layer, or where some system-specific non-LO library is loaded dynamically, as it is not necessarily present on end-user machines. Can't have such in the DISABLE_DYNLOADING case. Change-Id: I9eceac5fb635245def2f4f3320821447bb7cd8c0
2012-10-01Replace usage of rtl_*Memory with equivalent from string.hArnaud Versini
Change-Id: I50ffc10f007f03c3252ef0196b59b881429cc159 Reviewed-on: https://gerrit.libreoffice.org/734 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-09-21Need also uno_ext_getMapping for Java when DISABLE_DYNLOADINGTor Lillqvist
Change-Id: I65f09e54c80df4e96e24548692eeb3a57e1de517
2012-09-21Adapt for DISABLE_DYNLOADING possibility also for AndroidTor Lillqvist
Change-Id: Ie1ff96b6f58bf694b8d08a3316144becaaefe6d9
2012-09-20DISABLE_DYNLOADING magic also for the jni_uno environmentTor Lillqvist
Change-Id: I5e966a5734308381ad305b891ecfc830dc1419f6
2012-09-17migrate some of the biggest consumer of osl_*InterlockedCount to osl_atomicNorbert Thiebaud
Change-Id: I0e6992afbeffaf3b993e6630fb396d93012890e0 Reviewed-on: https://gerrit.libreoffice.org/632 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-07-29Replace usage of rtl/memory.h in cppu with their equivalent from string.hArnaud Versini
Change-Id: Ia49c97ad58b21dc360a366260b62bcc6b4975dee
2012-07-24Use memset and memcmp insteadof rtl_zeroMemory and rtl_compareMemory in cppuArnaud Versini
Change-Id: I88976b215bc23ce5001916ccf123bc3561c2a33a
2012-07-23Assertion clean-upStephan Bergmann
Change-Id: I234c615d9d3386da2b244709add5c029b76d346c
2012-07-23WaE: unused variableTor Lillqvist
Change-Id: Ie355701716c7106ef2afd76ae8b6544a00ac474c
2012-07-03just use rtl::OUString::createFromAsciiCaolán McNamara
Change-Id: I425e7bcc8f81b2d67a98244ba4419ace1ba569ec
2012-07-03we don't need to check for complete length, any non 0 length will doCaolán McNamara
Change-Id: I6978524ef934ee97d151e0fd22f3a0dfc91fd26e
2012-06-15WaE: clear higher debugging levels warningsCaolán McNamara
Change-Id: I611dc412b5461f368f23aa8239e48d0e175f5168
2012-06-13re-base on ALv2 code.Michael Meeks
2012-06-13quiet potential size warnings.Michael Meeks
2012-06-13targetted sb140 revert.Michael Meeks
2012-05-23Better fix for ThreadPool/ORequestThread life cycleStephan Bergmann
This is a follow up to d015384e1d98fe77fd59339044f58efb1ab9fb25 "Fixed ThreadPool (and dependent ORequestThread) life cycle" that still had some problems: * First, if Bridge::terminate was first entered from the reader or writer thread, it would not join on that thread, so that thread could still be running during exit. That has been addressed by giving Bridge::dispose new semantics: It waits until both Bridge::terminate has completed (even if that was called from a different thread) and all spawned threads (reader, writer, ORequestThread workers) have been joined. (This implies that Bridge::dispose must not be called from such a thread, to avoid deadlock.) * Second, if Bridge::terminate was first entered from an ORequestThread, the call to uno_threadpool_dispose(0) to join on all such worker threads could deadlock. That has been addressed by making the last call to uno_threadpool_destroy wait to join on all worker threads, and by calling uno_threadpool_destroy only from the final Bridge::terminate (from Bridge::dispose), to avoid deadlock. (The special semantics of uno_threadpool_dispose(0) are no longer needed and have been removed, as they conflicted with the fix for the third problem below.) * Third, once uno_threadpool_destroy had called uno_threadpool_dispose(0), the ThreadAdmin singleton had been disposed, so no new remote bridges could successfully be created afterwards. That has been addressed by making ThreadAdmin a member of ThreadPool, and making (only) those uno_ThreadPool handles with overlapping life spans share one ThreadPool instance (which thus is no longer a singleton, either). Additionally, ORequestThread has been made more robust (in the style of salhelper::Thread) to avoid races. Change-Id: I2cbd1b3f9aecc1bf4649e482d2c22b33b471788f
2012-05-16Fixed ThreadPool (and dependent ORequestThread) life cycleStephan Bergmann
At least with sw_complex test under load, it happened that an ORequestThread could still process a remote release request while the main thread was already in exit(3). This was because (a) ThreadPool never joined with the spawned worker threads (which has been rectified by calling uno_threadpool_dispose(0) from the final uno_threadpool_destroy), and (b) binaryurp::Bridge called uno_threadpool_destroy only from its destructor (which could go as late as exit(3)) instead of from terminate. Additional clean up: * Access to Bridge's threadPool_ is now cleanly controlled by mutex_ (even though that might not be necessary in every case). * ThreadPool's stopDisposing got renamed to destroy, to make meaning clearer. Change-Id: I45fa76e80e790a11065e7bf8ac9d92af2e62f262
2012-04-26fix OSL_DEBUG_LEVEL > 1 buildCaolán McNamara
2012-04-26Reverted "Leak TypeDescriptor_Init_Impl to avoid problems at exit."Stephan Bergmann
(This reverts commit 0ba6bd3ddc025666a6d4bb0640bf443728b23bd3.) The problems worked-around there are no longer observed by me, so they were hopefully only a temporal problem (the real root cause had never been found back then). If problems start to pop up again, we'll need to have another look at this.