summaryrefslogtreecommitdiff
path: root/cppu/qa
AgeCommit message (Collapse)AuthorFilesLines
2016-05-06cppu: replace boost::is_same with std::is_sameMichael Stahl1-5/+5
Change-Id: I7014737403da4b53b83488d17399b1c214b7a5db
2016-05-03Handle wchar_t as native C++11 type on windowsDavid Ostrovsky1-60/+0
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 Bergmann1-84/+0
...which has the same underlying type as sal_Bool Change-Id: Ief5a9b9a4d286488efe6e67ee72e7cc23d6f4075
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-01-18Avoid -Werror,-Wdelete-non-virtual-dtor with current Clang trunkStephan Bergmann1-2/+4
Change-Id: I5300cd6ff2c924a4acc01ba7f4478a0db50aa08c
2015-11-28Adapt to true wchar_t in clang-clStephan Bergmann1-7/+14
Change-Id: I14c2dc0be12151b5d4ea2ba3b65030f6f4494905
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 Bergmann2-90/+90
Change-Id: I17eb40b2923793280ea220e519f97563c8490a19
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann2-12/+12
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY codeStephan Bergmann1-4/+4
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-07-29com::sun::star-css in cppu,cppuhelperNoel Grandin1-8/+8
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-06-17Replace boost::scoped_array<T> with std::unique_ptr<T[]>Takeshi Abe1-2/+2
This may reduce some degree of dependency on boost. Done by running a script like: git grep -l '#include *.boost/scoped_array.hpp.' \ | xargs sed -i -e 's@#include *.boost/scoped_array.hpp.@#include <memory>@' git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \ | xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/' ... and then killing duplicate or unnecessary includes, while changing manually m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx, extensions/source/ole/unoconversionutilities.hxx, and extensions/source/ole/oleobjw.cxx. Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd Reviewed-on: https://gerrit.libreoffice.org/16289 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-04-01Add support for cppu::UnoType<void>Stephan Bergmann2-1/+2
Change-Id: I88259ffaffc73979c240721d2db166c79d3085f1
2015-04-01Replace remaining getCppuType et al with cppu::UnoTypeStephan Bergmann3-291/+81
Change-Id: Ied1a4e7226de4ae1d1c24af90ae9397ba80f404a
2014-12-19Remove unused */qa/checkapi/Stephan Bergmann1-30/+0
...superseded by CppunitTest_odk_checkapi Change-Id: I5df89a1a12f496984deab153f0ba2734323c1293
2014-10-31Removed duplicated includesAndrea Gelmini3-4/+0
Change-Id: I5362d997bfa086c9fb1726efcb15132a966684f6 Reviewed-on: https://gerrit.libreoffice.org/12160 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-05-13Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part11Julien Nabet1-16/+14
Change-Id: Ibe0a1006aba2b6cbd87c0bd6ca3acbf9ba7b0fbe
2014-04-24add missing modelines to idl filesThomas Arnhold2-0/+6
Change-Id: If52651c70ee659c83ef127da4fe5e266cfe7eec2
2014-04-09Clean up function declarationsStephan Bergmann2-13/+12
Change-Id: I2478861e79bbb0f6d7e8a0b7bc59a81f457d92dc
2014-04-03Cosmetics (to ease work related to finding unused functions)Stephan Bergmann1-4/+4
Change-Id: I88b7659fdfdcba43e69ef7489573b28952c8328c
2014-04-03remove unnecessary scope qualifier from sal_Bool usesNoel Grandin1-7/+7
i.e. convert "::sal_Bool" to "sal_Bool" Change-Id: Ie5943aee4fee617bf2670655558927ed25b7e067
2014-03-26First batch of adding SAL_OVERRRIDE to overriding function declarationsStephan Bergmann2-12/+12
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-02-27std::exception retrofit sequelStephan Bergmann2-4/+4
Change-Id: Ide9234c50592fe4f12eb1f6ea836ad60ce4697df
2014-01-22Let C++ inline functions return bool instead of sal_BoolStephan Bergmann1-3/+3
...to improve diagnosing misuses of boolean expressions in client code (cf. compilerplugins/clang/implicitboolconversion.cxx). This change should be transparent to client code. Change-Id: Ife614637082036dd17412f247be79233326c4f0b
2013-12-16fdo#72598 Remove SunStudio cruft from code baseJelle van der Waa1-18/+0
Change-Id: I5150eec33228e18e274a8ae4effd3f185851b7f4 Reviewed-on: https://gerrit.libreoffice.org/7103 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2013-11-14-Werror,-Wunused-member-functionStephan Bergmann1-0/+14
Change-Id: I557d9628478b0cddf5a2b176403bdd67db5a0695
2013-10-22Bin comments that claim to say why some header is includedTor Lillqvist1-1/+1
They are practically always useless, often misleading or obsolete. Change-Id: I2d32182a31349c9fb3b982498fd22d93e84c0c0c
2013-09-19Unlike idlc, unoidl doesn't support out-of-range byte constsStephan Bergmann2-4/+0
Change-Id: Ib1c98ea10a2d05e74a3aae9b2868a69c66efa543
2013-05-07Avoid warnings about unused test functionsStephan Bergmann1-43/+49
Change-Id: I6b2a40c4b95555c4d8bf0d8674fce46accd49965
2013-05-07Up-cast conversion constructor for css::uno::ReferenceStephan Bergmann1-0/+43
Based on a previous patch by Noel Grandin, <https://gerrit.libreoffice.org/#/c/3613/>, and borrowing from boost::is_base_and_derived (see comment in include/com/sun/star/uno/Reference.h) to avoid including Boost headers in URE headers. Change-Id: Iade5af144dd73ef03bd7d96000134c7a66a5e591 Reviewed-on: https://gerrit.libreoffice.org/3699 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2013-04-03Forbid old-style services/singletons inheriting new-style servicesStephan Bergmann1-1/+1
...does not make sense. Adapted some old-style services accordingly, where the inherited service had been changed to new-style after the fact. Change-Id: I5f3e4ddf99160778a319062a6c84f83529ff177b
2013-03-19removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings declarationsThomas Arnhold1-20/+20
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 Arnhold3-62/+53
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>
2012-11-30c++ API: use css alias in generated headers, adds global css declThorsten Behrens2-4/+0
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-09-18deprecate oustringostreaminserter.hxxNorbert Thiebaud2-5/+0
the intent of this header has canged over time. now it is already systematically included with ustring.hxx and the operator overload it provide fit nicely there... Just to be safe, since that include as been added to the api during the 3.5 timeframe and therefore is already in 'production' the header remain and simply attempt to include ustring.hxx but a warning is issued indicating that this header should not be used anymore... in a couple of major release we will thenr emove it completely All internal users of that header are converted. Change-Id: I8934c55f089e29d78c0f5649b7c87b2ecf024bad Reviewed-on: https://gerrit.libreoffice.org/634 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-09-17migrate some of the biggest consumer of osl_*InterlockedCount to osl_atomicNorbert Thiebaud2-4/+4
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-08-01Bin no longer used iOS cppunit stuff that breaks build evenTor Lillqvist5-156/+0
Change-Id: I78c71b22816834c66c8283e3d85e357b7b8d2836
2012-07-30udkapi, offapi: do not use #include "foo":Michael Stahl2-10/+10
Evidently on Windows, the newfangled ucpp handles #include "foo" differently from #include <foo> and treats it as a relative path, while the angle brackets always result in absolute paths. Since relative paths result in infinite rebuilds if make is invoked in a different directory, don't use #include "foo" in IDL files. Change-Id: Iedcda3a4be5542389a0be086f14541cda8dc5323
2012-07-16allow using rtl::OUString etc. simply as OUString, without rtl::Luboš Luňák1-0/+30
http://lists.freedesktop.org/archives/libreoffice/2012-April/029940.html The RTL_USING #define (set by gbuild for anything that's not public API) allows to use such classes simply by their name, without having to use the namespace or do explicit using rtl::OUString (which half of the sources do anyway). Change-Id: I7edaf12cd278489cdc1d5ff782f0a86361c13c0a
2012-06-27targetted re-work of cppunit pieces.Michael Meeks6-13/+5
2012-06-26re-base on ALv2 code.Michael Meeks7-174/+118
2012-06-13re-base on ALv2 code.Michael Meeks1-26/+17
2012-04-09cppu: use InternalUnoApiMatúš Kukan1-48/+0
2012-04-06Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operatorSzabolcs Dezsi1-64/+21
2012-03-14Enable -Wnon-virtual-dtor for GCC 4.6Stephan Bergmann2-4/+12
...which has the necessary features to support it. Change a lot of classes to either contain a protected non-virtual dtor (which is backwards compatible, so even works for cppumaker-generated UNO headers) or a public virtual one. cppuhelper/propertysetmixin.hxx still needs to disable the warning, as the relevant class has a non-virtual dtor but friends, which would still cause GCC to warn. Includes a patch for libcmis, intended to be upstreamed.
2012-01-21Removed some unused parameters; added SAL_UNUSED_PARAMETER.Stephan Bergmann1-1/+2
SAL_UNUSED_PARAMETER (expanding to __attribute__ ((unused)) for GCC) is used to annotate legitimately unused parameters, so that static analysis tools can tell legitimately unused parameters from truly unnecessary ones. To that end, some patches for external modules are also added, that are only applied when compiling with GCC and add necessary __attribute__ ((unused)) in headers.
2011-12-19-Werror=sign-promo fixesStephan Bergmann2-35/+37
2011-12-19cppu: convert to gbuildMatúš Kukan3-193/+48
Because of unit tests is here custom target where are idl files processed.
2011-11-27remove include of pch header in cppuNorbert Thiebaud6-10/+0