Commit Graph

805 Commits

Author SHA1 Message Date
Noel Grandin
4722192098 Convert XmlReader::Result to scoped enum
Change-Id: I6a0d1dcf5ae51d2ac08aacdfec50865f93e51c21
Reviewed-on: https://gerrit.libreoffice.org/25365
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-25 11:59:08 +00:00
Noel Grandin
6c419129f2 optimise references list handling in OWeakConnectionPoint some more
After my commit	1e063e8b "optimise references list handling in
OWeakConnectionPoint"

Reduce scope of locking, and copy a the performance trick from
OInterfaceContainerHelper.

Change-Id: Idc218e9d4edf45f8c37c7e517d1a26821800448b
Reviewed-on: https://gerrit.libreoffice.org/25406
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-24 19:46:06 +00:00
Noel Grandin
6bda2bf6fe Convert XmlReader::Text to scoped enum
Change-Id: I4741b13fcf887a95b85886cb41f8236e128e81a2
Reviewed-on: https://gerrit.libreoffice.org/25364
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-24 06:54:19 +00:00
Markus Mohrhard
389d8db4d9 add some spaces to make it easier to read
Change-Id: I2eb1c74bc0d91d3a12a66989b696fccbf1d2825e
Reviewed-on: https://gerrit.libreoffice.org/25117
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-05-18 22:46:49 +00:00
Noel Grandin
1e063e8b7e optimise references list handling in OWeakConnectionPoint
avoid the expensive sequence copying and deleting in
OInterfaceContainerHelper.

Change-Id: I00867b8a25b27d2a0b0babdf41a082c014e0e07d
Reviewed-on: https://gerrit.libreoffice.org/24949
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-16 08:20:05 +00:00
Stephan Bergmann
9ea219dc5a loplugin:passstuffbyref
Change-Id: I5a98cea6402b0a02c0e7c329d07d05759a74ec95
2016-05-12 14:23:23 +02:00
Stephan Bergmann
14cd5182c5 Replace fallthrough comments with new SAL_FALLTHROUGH macro
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in
preparation of enabling -Wimplicit-fallthrough.  (This is only relevant for
C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.)

Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but
that would require adding back in dependencies on boost_headers to many
libraries where we carefully removed any remaining Boost dependencies only
recently.  (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its
future evolution will not have any impact on the stable URE interface.)  C++17
will have a proper [[fallthroug]], eventually removing the need for a macro
altogether.

Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-05-10 16:42:16 +02:00
Stephan Bergmann
0c2d6574c6 Remove ancient, dead CONTEXT_DIAG code
Change-Id: I24123a54fe847b35f6b3674e2caa9bfb4b339d4a
2016-04-27 14:28:59 +02:00
Stephan Bergmann
11ba28a47d Remove ancient OSL_DEBUG_LEVEL printf
...alerting about something that is not too exciting anyway

Change-Id: I7596f14e52a0272762f923882f5f92fc3ac1ddf4
2016-04-27 14:26:51 +02:00
Noel Grandin
e1af7f0c43 clang-tidy modernize-loop-convert in c*
Change-Id: I77d2548f8be97792660761e6156cd24734a95aaf
2016-04-21 11:03:55 +02:00
Stephan Bergmann
918faa4a16 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: If965f73934c182a1c96d9fdca6f395c256f6b259
2016-04-20 17:25:38 +02:00
Jochen Nitschke
150ac9cf05 clean-up: unused using declarations and includes
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-18 07:25:24 +00:00
Stephan Bergmann
5c36205847 Fix indentation
Change-Id: Ia043e0a5b7ec9623f6575a83374720be1f3b6b83
2016-04-11 11:03:48 +02:00
Julien Nabet
297fd836b7 Typo: multible->multiple
Change-Id: I1c61841be58d49132ac3c69a6b227d75e829f769
Reviewed-on: https://gerrit.libreoffice.org/23972
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-04-10 22:01:01 +00:00
Julien Nabet
efa2698299 Typo: rubust->robust
Change-Id: Icc6bef40a66d5616667d55bf02f10e19153457a7
Reviewed-on: https://gerrit.libreoffice.org/23971
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-04-10 21:25:13 +00:00
Jochen Nitschke
98d7b02f2b tdf#94306 replace boost::noncopyable in cppuhelper
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-08 09:32:48 +00:00
Rohan Kumar
d6411207bd tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals
I removed OSL_DEBUG_LEVEL > 1 conditionals to SAL_INFO
statements

Change-Id: I6f74f5146473464758f35629877a76bb2bc39b4e
Reviewed-on: https://gerrit.libreoffice.org/23071
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-04-05 10:03:42 +00:00
Jochen Nitschke
f7a75a66fa cleanup: remove unused Reference.h(xx) includes
and unused using-declarations from Reference.h

Change-Id: I297a7ae6044fa329d245ecf08fd5c4cb930f5b19
Reviewed-on: https://gerrit.libreoffice.org/23735
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-04-02 19:01:24 +00:00
Julien Nabet
1151fec7a8 Let's use the iterator return by erase method (final)
Change-Id: I1934b0c2a9ae9fa089d7e9ded4a289908fb2709a
Reviewed-on: https://gerrit.libreoffice.org/23173
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-12 14:30:32 +00:00
Wastack
83452dd083 tdf#97966 redundant static keywords removed 6
Change-Id: Iaf034f3b2282a973f6503edea41cb3184543fb11
Reviewed-on: https://gerrit.libreoffice.org/23133
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-11 08:38:11 +00:00
Stephan Bergmann
daa6a98549 Avoid reserved identifiers
Change-Id: I6add6c03c92576127c3e3f93892bcc00c1f51424
2016-03-10 18:32:03 +01:00
Stephan Bergmann
132b4e91bc Avoid reserved identifiers (use unnamed namespace, just in case)
Change-Id: I3e34368a674e9f128a32604c82181b1b99632c37
2016-03-10 18:32:03 +01:00
Noel Grandin
70f87284c6 improve defaultparams loplugin
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-03-07 05:57:17 +00:00
Stephan Bergmann
79c11bb56e Use an XInitialization-based channel to request service mgr pre-init
...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-26 12:37:04 +00:00
Noel Grandin
2087484c65 use consistent #define checks for the Windows platform
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-17 11:33:57 +00:00
Henry Castro
8d7f29a933 Re-work cppu::preInitBootstrap()
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-15 22:23:19 +02:00
Henry Castro
6b41b89cc5 In loadAllImplementations(), also invoke component factory
Change-Id: Ie6f6d769b611c8440ddab802545e6bdc482d1476
2016-02-15 22:23:11 +02:00
Tor Lillqvist
682c48afd9 Just abort() in the DISABLE_DYNLOADING case for now
Should fix the build for Android.

Change-Id: Iabba9da8755805ad4d9d21d7a6b4b22e3fa6418f
2016-02-15 22:16:15 +02:00
Henry Castro
df5f7c6aba Introduce lok_preinit() to preload all registered UNO implementations
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-15 16:17:53 +02:00
Chris Sherlock
a238b1f8d3 Remove excess newlines
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-02-09 08:18:05 +00:00
Stephan Bergmann
e83f31724e tdf#82775: Don't prematurely dispose single-instance services
...that happen to be requested concurrently from multiple threads

Change-Id: Icecfb0b8d88c9123064689643eddf90a99d3b1b8
2016-01-04 14:21:45 +01:00
Noel Grandin
947cc1b53a inline one-liner static method
Change-Id: I9e0bd7a34ed691b245738dd66ff5ba7cc879ebe5
2015-12-02 08:47:30 +02:00
Stephan Bergmann
80c0767b98 Work around clang-cl PR25641
"defaultbootstrap.o : error LNK2001: unresolved external symbol
'[thunk]:private: virtual class com::sun::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-28 08:44:53 +01:00
Noel Grandin
96c26b0d9d use initialiser for Sequence<OUString>
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-15 12:20:39 +00:00
Stephan Bergmann
97464be980 Bogus assert
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
ae3a0c8da5 "Add .component <implementation
constructor='...' feature."

Change-Id: Ia70958e4aa18d378ff35063bdf6187f6e073b765
2015-11-13 15:59:33 +01:00
Stephan Bergmann
bf3f840302 loplugin:nullptr (automatic rewrite)
Change-Id: I62a63915dfc0bced2cd8ffe3999cbde5c4d97b0b
2015-11-10 10:31:21 +01:00
Noel Grandin
59b072e22b yyyyy
Change-Id: I9a947beefd2dfe21da8239e841ea3fb416bd1548
2015-11-04 14:10:44 +02:00
Benjamin Ni
be729e7721 tdf#94269: Replace "n" prefix for bool variables with "b"
Change-Id: I178545792c7354a362658ac7ef8b1d4cf0865797
Signed-off-by: Michael Stahl <mstahl@redhat.com>
2015-11-02 23:40:57 +01:00
Noel Grandin
cb4fa1d1e2 use uno::Reference::set method instead of assignment
Change-Id: I080668f86f0ab8b3bba857ee21411f907ae285c4
2015-10-30 11:08:36 +02:00
Noel Grandin
1716b3a338 remove some useless comments
found with git grep '// /'

Change-Id: I948cf9ae61bbbf2ec706ca5b0572c4f27c58c745
2015-10-13 10:07:49 +02:00
Stephan Bergmann
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
Stephan Bergmann
e676f98f34 clang-analyzer-deadcode.DeadStores
Change-Id: Ib1163c1717e61d730b22c3d6d0a0a7cc171bba4e
2015-10-05 09:51:38 +02:00
Andrea Gelmini
3f6da86e9f Fix typos
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-30 13:05:20 +00:00
Caolán McNamara
22b80ac8e2 boost->std
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-09-14 12:54:25 +00:00
Stephan Bergmann
b190574b6a tdf#84323: Make osl::Thread::wait more readable
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-08-17 15:37:22 +00:00
Noel Grandin
171990764e com::sun::star-css in cppu,cppuhelper
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-29 06:44:57 +00:00
Andrea Gelmini
799cc41b53 Fix typos
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-08 05:48:18 +00:00
Andrea Gelmini
87dc6c82d5 Fix typos
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-07-03 09:02:48 +00:00
Noel Grandin
b55166d266 Revert "return and use std::vector from OInterfaceContainerHelper"
This reverts commit e57314f61f.
2015-06-29 10:11:53 +02:00
Noel Grandin
e57314f61f return and use std::vector from OInterfaceContainerHelper
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-29 07:25:22 +00:00