summaryrefslogtreecommitdiff
path: root/cppu
AgeCommit message (Collapse)AuthorFilesLines
2016-04-18clean-up: unused using declarations and includesJochen Nitschke1-2/+0
Searched source for using declarations. Checked if those symbols reappear in the source file, even in comments or dead code but not in #include statements. If they don't reappear, remove the declaration. Remove includes whose symbol got removed. Change-Id: Ibb77163f63c1120070e9518e3dc0a78c6c59fab0 Reviewed-on: https://gerrit.libreoffice.org/24148 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-08tdf#94306 replace boost::noncopyable in cppuhelperJochen Nitschke2-4/+8
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-04-04tdf#97499 Fixed containers parameters clearing #4tymyjan1-2/+1
Change-Id: I7c96181399f4d7e62d4aceca404b22d68f903513 Reviewed-on: https://gerrit.libreoffice.org/23754 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-01tdf#97966 Drop 'static' keywordsWastack1-3/+3
Including no keywords from extern "C" blocks Change-Id: I18ddafbf3d41f6779fb43e36ba1f1c48b37757a0 Reviewed-on: https://gerrit.libreoffice.org/23671 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-01loplugin:staticanonymousStephan Bergmann1-2/+2
Change-Id: I1a96ef6bff7a99ab46f7c88722426cba48b46c81
2016-03-29uno/check.cxx: use alignment calculated at runtime instead of hardcodeDouglas Mencken1-23/+20
Change-Id: I0f9a48ef01bee4153cd9231bdef4b5a763b6bda2 Reviewed-on: https://gerrit.libreoffice.org/23283 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-22android version can also be compiled for x86Christian Lohmaier1-1/+2
and x86 has smaller alignment than arm or a x86_64 host, so needs the MAX_ALIGNMENT_4 to not trigger the static_asserts Change-Id: I5643a33e4975e7bad20693f99fb8bbd5248c7c1c
2016-03-22tdf#84323: Make osl::Condition::wait more readableGurkaran1-2/+2
It is to improve the readability of calls to osl::Condition::wait. Change-Id: I5945343c5a7e4729ab599380414d18280bd176fe Signed-off-by: Gurkaran <gurkran@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/23417 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-11cppu: SAL_WARN_IF() -> SAL_INFO_IF() where it was dbglevel=2-specific beforeMiklos Vajna1-9/+9
As these fire already during the build. Change-Id: I750ea04be317fffb8bc321a2b7b4da0447789c8f
2016-03-11Let's use the iterator return by erase method of iterator listJulien Nabet1-3/+2
and avoid to retrieve list->begin and loop from the first element Change-Id: I536b7a03c4033b02a7226d25f64764c10c28bdd0 Reviewed-on: https://gerrit.libreoffice.org/23126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-10Remove unnecessary parenthesesStephan Bergmann1-9/+9
Change-Id: I6815a02ae8f47c40c3b8cf5692126142de867480
2016-03-10Fixed minor negation bug in SAL_WARN_IFrohan1-9/+9
I corrected the mistake that i did while converting OSL_ENSURE to SAL_WARN_IF while submitting a patch regarding removing OSL_DEBUG_LEVEL > 1 conditionals. Thanks to Julien Nabet :) Change-Id: I374373bf151a43b1ababf4c28b509da71068f755 Reviewed-on: https://gerrit.libreoffice.org/23112 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-09typoStephan Bergmann1-23/+23
Change-Id: Id990e76769c3b5e2e048f3faf754efbae2b41c3f
2016-03-09Use plain assert (to complement use of static_assert above)Stephan Bergmann1-32/+24
Change-Id: Id4ac9e86a6af3fa84f7a9680051dfe2564f8c5c5
2016-03-08Extract static_asserts out of OSL_DEBUG_LEVEL > 0Stephan Bergmann1-87/+95
Change-Id: I604b41a5063728833d57e2589e6d3ec39eb67166
2016-03-08Clean up namespaceStephan Bergmann1-1/+1
Change-Id: I8207f7906cb8914b6c272efaf8f136a1bce7e4b0
2016-03-08Extract checking code to its own check.cxxStephan Bergmann3-254/+283
Change-Id: I9d5b14c374ce62ac7b970faa30c38a5a76568ed4
2016-03-08loplugin:cstylecastStephan Bergmann1-1/+1
Change-Id: I3771f84ec94c62988c075dd26ee1de17200af705
2016-03-08Remove redundant checks (that trigger loplugin:implicitboolconversion])Stephan Bergmann1-4/+4
Change-Id: I86c0b56b7d330e3e3450a5806a89ca8fb7a1bfae
2016-03-08tdf#91794: Remove OSL_DEBUG_LEVEL > 1 conditionalsRohan Kumar5-146/+95
Updates pointed by sberg Change-Id: Ie12548dfa9ad3a6836efbfe64153bc075f138fc6 Reviewed-on: https://gerrit.libreoffice.org/22622 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-02-22WaE 0xdeadbeaf 32 bits litteral casting to 64 bits pointerNorbert Thiebaud2-2/+2
Change-Id: I9769a1d9707cc958329f1c05ccbed780983faf14 Reviewed-on: https://gerrit.libreoffice.org/22600 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2016-02-15tdf#57950: Replace chained O(U)StringBuffer::append() with operator+Arnold Dumas1-4/+1
Change-Id: Ic76cf0130ebec4cf723b83d82f59ae45bfcb3ea1 Reviewed-on: https://gerrit.libreoffice.org/22350 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-09Remove excess newlinesChris Sherlock10-19/+0
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-18Avoid -Werror,-Wdelete-non-virtual-dtor with current Clang trunkStephan Bergmann1-2/+4
Change-Id: I5300cd6ff2c924a4acc01ba7f4478a0db50aa08c
2016-01-10Fix typosAndrea Gelmini2-2/+2
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-03loplugin:implicitboolconversionAndrzej Hunt1-2/+2
Change-Id: I2ef26c34a424e653d85597c85baa736c19004313
2016-01-03cppcheck: allocaCalledCaolán McNamara2-28/+25
Change-Id: I4e2345cdf9fd8d088f3522d563263b65abedb7c9
2015-11-28Adapt to true wchar_t in clang-clStephan Bergmann1-7/+14
Change-Id: I14c2dc0be12151b5d4ea2ba3b65030f6f4494905
2015-11-25i125711 - Illumos port: generalize MAX_ALIGNMENT for SolarisPedro Giffuni1-2/+4
GCC in Ilumos appears to behave exactly like the Solaris SUNPRO compiler so generalize the case for Solaris. (cherry picked from commit e1da117c49fc02af9543e32526bf1c04657534c4) Change-Id: I3fa619f34c35608b187c3aa394552ac78c3f0c20
2015-11-22cppcheck:useInitializationListNoel Grandin2-4/+4
Change-Id: I744ff3e268fbffca9499121f3567640934aaae51 Reviewed-on: https://gerrit.libreoffice.org/20110 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-18Use C++11 char16_t for sal_UnicodeStephan Bergmann1-0/+53
...in LIBO_INTERNAL_ONLY, __cplusplus, non-MSVC case. It turns out that sal_Unicode happens to not be mangled into any symbols that make up the stable URE interface, so (for LIBO_INTERNAL_ONLY, at least) we are free to replace the typedef to sal_uInt16 with a typedef to any integral type layout-compatible with that. (sal_Unicode does appear in some symbols in sal's PRIVATE_textenc.1 section, but that is private between the sal and sal_textenc libraries, so changing those symbols does not require a change of SONAME.) C++11 chart16_t is the obvious choice (and will ultimately allow using u"..." to write literals of type array-of-sal_Unicode). Reportedly, char16_t is supported since GCC 4.4 and Clang 2.9 but will only be available in MSVC 2015. For plain C, we continue to use sal_uInt16. We could theoretically use C11 char16_t from <uchar.h>, but at least the Mac OS X 10.11 SDK still does not offer that C11 header. For MSVC, we continue to use wchar_t (which is actually unsigned short, due to /Zc:wchar_t-) for now. Potential options there include dropping /Zc:wchar_t- and using true wchar_t, or using C++11 char16_t once support for MSVC 2013 is dropped. Some code needed to be adapted that was written in a way assuming that sal_Unicode is unsigned short (which indicates that changing sal_Unicode for non-LIBO_INTERNAL_ONLY would be an ABI change). OUStringBuffer::append can now differentiate between being called with sal_Unicode (to append a single character) and erroneously being called with sal_uInt16 (intending to append a number's textual representation, for which the sal_Int32 overload must be used instead). Bugs found are 379fe0409e7973b36210cffa3dd1dfd4032f0ecc "Assume that this code wants to append a number, not a character" and dc148335a6a438848325f24c49198fba81043279 "Assume this wants to append the numerical representation." The GDB support for pretty-printing of sal_Unicode-related data in solenv/gdb/libreoffice/sal.py can presumably be simplified now. Change-Id: I445b3a80e65b7cb004d9e08b38bdc9ee93bc9401 Reviewed-on: https://gerrit.libreoffice.org/20036 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2015-11-18Clean upStephan Bergmann1-443/+407
Change-Id: I9ce96ac26efd6fb46f78aa6462d693113b359bb5
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann27-510/+510
Change-Id: I17eb40b2923793280ea220e519f97563c8490a19
2015-11-10cid#1338241 removed throw from C function.jan iversen1-1/+8
Lower level C++ make a throw, this cannot be passed back in a C function. Change-Id: I54ace0284d0291d54f53b8947e9f4ffc2e0a56ab Reviewed-on: https://gerrit.libreoffice.org/19873 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-11-10cid#1338242 cid#1338241 removed throw from extern "C" functionjan iversen1-3/+9
Encapsulated throw from C++ to a return false in the "C" function Change-Id: I2fc89b0dcf434395859300b3d3890247d1288295 Reviewed-on: https://gerrit.libreoffice.org/19872 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-11-09new loplugin: oncevarNoel Grandin2-4/+2
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f Reviewed-on: https://gerrit.libreoffice.org/19815 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-02tdf#94269: Replace "n" prefix for bool variables with "b"Benjamin Ni1-3/+3
Change-Id: I178545792c7354a362658ac7ef8b1d4cf0865797 Signed-off-by: Michael Stahl <mstahl@redhat.com>
2015-11-02Avoid ASan new-delete-type-mismatch with -fsized-deallocationStephan Bergmann1-11/+20
...where "subclasses" of typelib_TypeDescription are deleted non- polymorphically Change-Id: I708d245e12d2e2159e9df60b61d1b37801083651
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann7-36/+36
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY codeStephan Bergmann1-4/+4
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-09-30Fix typosAndrea Gelmini2-2/+2
Change-Id: I13c3dc33722f139582f27412d5d336264d3d15a3 Reviewed-on: https://gerrit.libreoffice.org/18942 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-14boost->stdCaolán McNamara4-6/+5
Change-Id: I3fd9e1599c5ad812879a58cf1dabbcd393105e1c Reviewed-on: https://gerrit.libreoffice.org/18564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-31loplugin:stringconstant: OUStringBuffer: appendAscii -> appendStephan Bergmann1-1/+1
Change-Id: I22808f7740a9a936deb9160b24fe4634f8613823
2015-08-18Some oslCondition -> osl::ConditionStephan Bergmann4-28/+22
Change-Id: I86cfbefd1cb8b22fca659a158b8e31d5c991de7a
2015-08-11loplugin: defaultparamsNoel Grandin1-1/+1
Change-Id: I906912f29448bfc72e8139546aa09525c959867f
2015-07-29com::sun::star-css in cppu,cppuhelperNoel Grandin3-10/+10
Change-Id: I84a412f587fd66f6c0610f083e61cf0fa079d4d9 Reviewed-on: https://gerrit.libreoffice.org/17384 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-13Make content of OSL_ASSERT, DBG_ASSERT, etc. visiblie in non-debug buildsStephan Bergmann1-2/+0
...to avoid lots of loplugin:staticmethods warnings. Also enables DBG_ASSERT etc. also for --enable-debug builds in addition to --enable-dbgutil builds. Change-Id: Ib89ecd9ab8ce7abb2c64790ace248b31f9d2b64d
2015-07-08Avoid loplugin:redundantcast in non-debug buildStephan Bergmann1-8/+5
Change-Id: Ib5f57ba5154c56b89ab550aef5a87ee27539ddd9
2015-06-26loplugin:stringconstant: handle OUString+=OUString(literal)Stephan Bergmann1-3/+2
Change-Id: I55363639900450c9780dd187805ce0500f68a2f4
2015-06-25loplugin:stringconstant: Flag more inefficienciesStephan Bergmann1-2/+1
Change-Id: I36ae4b57049fe4deabe785ccfecf78608461086f