summaryrefslogtreecommitdiff
path: root/cppuhelper
AgeCommit message (Collapse)AuthorFilesLines
2016-03-10Avoid reserved identifiersStephan Bergmann1-20/+20
Change-Id: I6add6c03c92576127c3e3f93892bcc00c1f51424
2016-03-10Avoid reserved identifiers (use unnamed namespace, just in case)Stephan Bergmann1-7/+10
Change-Id: I3e34368a674e9f128a32604c82181b1b99632c37
2016-03-07improve defaultparams lopluginNoel Grandin1-3/+1
to catch calling params with defaults like "= OUSString()" Change-Id: Iad060e318ed492c22f8be44e326174fe6d28fff9 Reviewed-on: https://gerrit.libreoffice.org/22932 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-26Use an XInitialization-based channel to request service mgr pre-initStephan Bergmann4-145/+139
...instead of private cppu::preInitBootstrap function Change-Id: Id0e6fcf721b697c993e5acffaf7836452cfa9750 Reviewed-on: https://gerrit.libreoffice.org/22699 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2016-02-17use consistent #define checks for the Windows platformNoel Grandin1-1/+1
stage 2 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro In this stage we focus on replacing usage of the WIN macro Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84 Reviewed-on: https://gerrit.libreoffice.org/22393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-16use consistent #define checks for the Windows platformNoel Grandin1-1/+1
stage 1 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro Change-Id: Iece73abdee530937e0737190b1aa97a46cd3075f Reviewed-on: https://gerrit.libreoffice.org/22390 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-02-15Re-work cppu::preInitBootstrap()Henry Castro2-11/+18
In the preinit stage, the preInitBootstrap is called to load implementations for each service registered by the service manager. All service requests are: initial Component Context and the process service factory is set. However, some services require that VCL is properly initialized. Change-Id: Ib116e3da172b860f2df4d672f6181b5de0b7e6b2
2016-02-15In loadAllImplementations(), also invoke component factoryHenry Castro1-5/+81
Change-Id: Ie6f6d769b611c8440ddab802545e6bdc482d1476
2016-02-15Just abort() in the DISABLE_DYNLOADING case for nowTor Lillqvist1-0/+4
Should fix the build for Android. Change-Id: Iabba9da8755805ad4d9d21d7a6b4b22e3fa6418f
2016-02-15Introduce lok_preinit() to preload all registered UNO implementationsHenry Castro4-0/+58
Intended to be used from an application like the LibreOffice On-Line server so that it can be called in a process that then will call fork() several times, and much space consuming data will end up being shared. Change-Id: I65341c57d00308d246ec90deab8050b2c4bb3e61
2016-02-09Remove excess newlinesChris Sherlock12-21/+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-31unnecessary use of OUString constructorNoel Grandin1-1/+1
Change-Id: Idd31b0a53c8318af69bbcd32f6798721ec8eb8e1 Reviewed-on: https://gerrit.libreoffice.org/21945 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-04tdf#82775: Don't prematurely dispose single-instance servicesStephan Bergmann1-1/+3
...that happen to be requested concurrently from multiple threads Change-Id: Icecfb0b8d88c9123064689643eddf90a99d3b1b8
2015-12-02inline one-liner static methodNoel Grandin1-9/+1
Change-Id: I9e0bd7a34ed691b245738dd66ff5ba7cc879ebe5
2015-11-28Work around clang-cl PR25641Stephan Bergmann2-1/+3
"defaultbootstrap.o : error LNK2001: unresolved external symbol '[thunk]:private: virtual class com::sun::star::uno::Sequence<class rtl::OUString> __cdecl cppuhelper::ServiceManager::getAvailableServiceNames`adjustor{24}' (void)' (?getAvailableServiceNames@ServiceManager@cppuhelper@@GBI@EAA?AV?$Sequence@VOUString@rtl@@@uno@star@sun@com@@XZ)" Change-Id: I04b7353305ffeeb316d70ab8408aeb52ea0f7186
2015-11-20loplugin:overrideStephan Bergmann1-3/+3
Change-Id: Ic89d255bf56234a82b23ad6cc36d8d1250acbcab
2015-11-19cppuhelper: enable CppunitTest_cppuhelper_qa_weakMichael Stahl1-0/+4
Change-Id: Ie2339b31b1a2293183a29defb8a4944cb9eb61a8
2015-11-16use initialiser list for Sequence<OUString>Noel Grandin1-4/+3
Change-Id: Ia5e47261d1fc6fac2d046656c05a1c5eedb07e02 Reviewed-on: https://gerrit.libreoffice.org/19978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15Fast PCH generator and optimized PCH filesAshod Nakashian1-95/+53
Ported update_pch.sh to Python with improved performance and features. The new script is invoked from the same update_pch.sh which calls it for each library in parallel, although it can be invoked directly. The ported script (update_pch) updates all PCH files in ~15 seconds where the old script took ~4500 seconds. In addition, the new script supports 3-tiered headers (system, module, and local) and is very flexible to support other improvement. It has a per-library optimal configuration settings that can be updated using another new scripts (update_pch_autotune.sh) which finds optimal per-PCH settings. PCH files have been generated using the new scripts which builds significantly faster (2-3x, depending on module and configuration) and the intermediate binaries are noticably smaller (by several GBs). The new script stamps each generated PCH file with the command that generated it to make it trivial for users to update them, and also adds the command to invoke another script (update_pch_bisect) that helps find missing headers or conflicting headers that may break the build after updating the PCH. Finally update_pch has built-in unit-tests for makefile parsing and other core functionality. Change-Id: Ib933b50e50374d7e2e7e3e95ba8799b0cc8a27fa Reviewed-on: https://gerrit.libreoffice.org/19965 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-15use initialiser for Sequence<OUString>Noel Grandin3-6/+3
using variations of: git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence<OUString> (\w+)\(1\)\; \s*OUString\* pArray.*; .*\[0\]\s*=\s*(\S+)\;/Sequence<OUString> \1 { \2 };/g" Change-Id: I03c64334ff30ee14dce0d17b67f5122a3893bbe3 Reviewed-on: https://gerrit.libreoffice.org/19971 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-13Bogus assertStephan Bergmann1-10/+12
implementation can indeed be empty when cppu::writeSharedLibComponentInfo calls getEnvironmentFromModule(mod, curEnv, "", ""), which in the final if-branch calls getEnvironment with implementation = "". Happens when adding desktop/qa's test-active.oxt. Regression introduced with ae3a0c8da50b36db395984637f5ad74d3b4887bc "Add .component <implementation constructor='...' feature." Change-Id: Ia70958e4aa18d378ff35063bdf6187f6e073b765
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann22-144/+144
Change-Id: I62a63915dfc0bced2cd8ffe3999cbde5c4d97b0b
2015-11-04yyyyyNoel Grandin1-5/+4
Change-Id: I9a947beefd2dfe21da8239e841ea3fb416bd1548
2015-11-02tdf#94269: Replace "n" prefix for bool variables with "b"Benjamin Ni1-6/+6
Change-Id: I178545792c7354a362658ac7ef8b1d4cf0865797 Signed-off-by: Michael Stahl <mstahl@redhat.com>
2015-10-30use uno::Reference::set method instead of assignmentNoel Grandin3-7/+5
Change-Id: I080668f86f0ab8b3bba857ee21411f907ae285c4
2015-10-13remove some useless commentsNoel Grandin1-2/+2
found with git grep '// /' Change-Id: I948cf9ae61bbbf2ec706ca5b0572c4f27c58c745
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann13-258/+258
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-05clang-analyzer-deadcode.DeadStoresStephan Bergmann1-2/+2
Change-Id: Ib1163c1717e61d730b22c3d6d0a0a7cc171bba4e
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 McNamara3-36/+32
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-17tdf#84323: Make osl::Thread::wait more readableStephan Bergmann1-2/+2
Change-Id: I33eb6970050a103404344c7f16dd33349c154347 Reviewed-on: https://gerrit.libreoffice.org/15018 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2015-07-29com::sun::star-css in cppu,cppuhelperNoel Grandin12-147/+147
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-08Fix typosAndrea Gelmini1-1/+1
Change-Id: I70b03c152f63e48341dc5629a99b0eeab7b497c0 Reviewed-on: https://gerrit.libreoffice.org/16834 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-07-03Fix typosAndrea Gelmini1-1/+1
Change-Id: Ideb5688a8c9e7cf10038f2e9d00991e8653b1875 Reviewed-on: https://gerrit.libreoffice.org/16706 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-06-29Revert "return and use std::vector from OInterfaceContainerHelper"Noel Grandin3-60/+73
This reverts commit e57314f61f67b093510c5a8a8f34a62126ba8734.
2015-06-29return and use std::vector from OInterfaceContainerHelperNoel Grandin3-73/+60
since most of the time we don’t need a heavyweight uno::Sequence. Adds a new method getElementsAsVector(). Change-Id: I9e72bef0c0c723ffd0dd7d4152db5baec6784a7a Reviewed-on: https://gerrit.libreoffice.org/15747 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-25loplugin:stringconstant: Flag more inefficienciesStephan Bergmann1-2/+1
Change-Id: I5fe4002c3c0065dfe93be0d8f47df90d57af898b
2015-06-17Replace boost::scoped_array<T> with std::unique_ptr<T[]>Takeshi Abe5-14/+14
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-06-09cppcheck: noExplicitConstructorCaolán McNamara10-17/+18
Change-Id: Ic33ee6936f40bec4f3a82aea39a180ae6e9a0928
2015-06-08loplugin:cstylecast: deal with remaining pointer castsStephan Bergmann3-8/+8
Change-Id: I4eea017d429945cdd8636c0f06cb18f5887a0d78
2015-05-15tdf#62475: partial handmade fixesAndrea Gelmini1-4/+0
Change-Id: Ib9af202c43b916b9af4b4e18db35d470a8692fe4 Reviewed-on: https://gerrit.libreoffice.org/15712 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2015-05-02cppuhelper: Allow logging the used services / constructors.Jan Holesovsky1-0/+2
Change-Id: I9090561032e2f6e97eb74b8f1e8cd1698171e6ea
2015-04-22Various #include <sal/log.hxx> fixupsStephan Bergmann5-0/+5
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. Cleaned up some, but something like grep -FwL sal/log.hxx $(git grep -Elw \ 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF') -- \*.cxx) shows lots more files that potentially need fixing before the include can be removed from rtl/string.hxx and rtl/ustring.hxx. Change-Id: Ibf033363e83d37851776f392dc0b077381cd8b90
2015-04-15remove unnecessary use of void in function declarationsNoel Grandin6-22/+22
ie. void f(void); becomes void f(); I used the following command to make the changes: git grep -lP '\(\s*void\s*\)' -- *.cxx \ | xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;' and ran it for both .cxx and .hxx files. Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
2015-04-09convert RegError to scoped enumNoel Grandin1-12/+12
Change-Id: I55977c38578cb59deb195d91f8948da2e0905b6a
2015-04-09convert RegValueType to scoped enumNoel Grandin1-1/+1
Change-Id: Ic672e75db4d7323760577b19490ffa28d38965b6
2015-04-09convert REG_ constants to scoped enumNoel Grandin1-1/+1
Change-Id: I11d92218c5e0678d497f8964723033e2bd8b3300
2015-04-01Add support for cppu::UnoType<void>Stephan Bergmann1-1/+1
Change-Id: I88259ffaffc73979c240721d2db166c79d3085f1
2015-04-01Replace remaining getCppuType et al with cppu::UnoTypeStephan Bergmann11-80/+73
Change-Id: I620bf5d46c19f0182e822265eadf8eb11001855e
2015-03-31Reduce to static_cast any reinterpret_cast from void pointersStephan Bergmann4-8/+8
Change-Id: I0392b2fc9e48aab4a20849d8203cae96b1ef2d2c