Commit graph

446 commits

Author SHA1 Message Date
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
Noel Grandin
e6469c892d fix OSX build
by reverting part of commit
commit 752cd07d08
"InterfaceContainer2 with vector instead of Sequence"

cannot add comphelper as a dependency to a module that is part of URE

Change-Id: I40aeeff1fa39988af911b00a06fb1ac8edeb6f03
2016-01-25 10:21:13 +02:00
Noel Grandin
752cd07d08 InterfaceContainer2 with vector instead of Sequence
create an InterfaceContainer2 class to replace InterfaceContainer.
It uses a std::vector instead of a Sequence for the mutable listener
list, which provides far better performance.

Switch all our internal use-sites to the new class.

Change-Id: I6b56cfa511ded2395faa22e68fab3b2f16c3cb88
2016-01-25 08:52:03 +02:00
Andrea Gelmini
64d624b651 Fix typos
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-10 14:17:20 +00:00
Noel Grandin
ec3f724158 loplugin:unusedfields
Change-Id: Icac4ac1a2614e72bc9ff070819533e09eeb1a864
2015-11-30 10:34:38 +02:00
Caolán McNamara
70b09d9322 cppcheck: noExplicitConstructor
Change-Id: I1934441858baeeb41a46f694dbcef2d846b308b7
2015-11-24 10:35:44 +00:00
Noel Grandin
8569c6d0ad use initialiser list for Sequence<OUString>
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-16 08:35:42 +00: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
Noel Grandin
54d22957bc use initialiser for Sequence<OUString>
performed using:
git grep -lP 'Sequence.*OUString.*\(1\)'
| xargs perl -0777 -pi -e
  "s/Sequence<OUString> (\w+)\(1\);
.*\[0\] = (\S+);/Sequence<OUString> \1 { \2 };/g"

Change-Id: I4da56c80fa09bfc1e8f868794001e9921431e09f
Reviewed-on: https://gerrit.libreoffice.org/19968
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 11:31:23 +00:00
Noel Grandin
8e234c5b7d use initialiser syntax for Sequence<OUString>
replaced using the script:

git grep -lP 'Sequence.*OUString.*\(1\)'
  | xargs perl -0777 -pi
    -e "s/Sequence< OUString > (\w+)\(1\);
.*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g"

Change-Id: I23688a91562051a8eed11fc2a85599545c285c34
Reviewed-on: https://gerrit.libreoffice.org/19967
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 10:13:08 +00:00
Mario J. Rugiero
b62f1bd5bf Replaced for_each and algorithm include by range based loop and exception.
Since the only thing used from algorithm was std::for_each, and std::exception
was being used without including it.

Change-Id: Ida415bfbcae2b14811183a6afa46b6f6e1ac6ab2
Reviewed-on: https://gerrit.libreoffice.org/19864
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-10 10:35:14 +00:00
Stephan Bergmann
22980bea48 loplugin:nullptr (automatic rewrite)
Change-Id: I04ceb5b1514a1d0bf123a1cded5e1aac3e8dde2f
2015-11-10 10:31:29 +01:00
Noel Grandin
6c80a8fe89 new loplugin: oncevar
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-09 08:34:40 +00:00
Stephan Bergmann
77ce12c6f7 loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: Ifcfb6792138802f4150ccb966927818fbd3f64e3
2015-11-06 09:36:25 +01:00
Noel Grandin
fcb8df3bcf use uno::Reference::set method instead of assignment
Change-Id: I11822c50fa66d038a3d6f38054ab35c2e613f077
2015-11-04 14:20:51 +02:00
Stephan Bergmann
84eeebd750 Fix create/destroy mismatch
Change-Id: Ibff6caedae0c5ed84cf4864c7a52af56a7cea527
2015-11-03 08:48:10 +01:00
Noel Grandin
b5db48ada1 no need to use OUString constructor in call to createInstance
Change-Id: Iaf3d83ba1490cb1d97a5bd4d1f7cd6943d4a7296
Reviewed-on: https://gerrit.libreoffice.org/19704
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-01 15:25:43 +00:00
Noel Grandin
3bc5df7f32 UNO: no need to use OUString constructor when calling createInstance
Change-Id: I37da28539b94706574116d0fff5f008aabfb5526
Reviewed-on: https://gerrit.libreoffice.org/19682
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-30 08:59:59 +00:00
Noel Grandin
63cec254e7 com::sun::star->css in io
Change-Id: I4a0cd4b29db91584c23148d659846c71b90b0d65
2015-10-23 12:55:52 +02:00
Caolán McNamara
1769074bd5 coverity#1327454 Uncaught exception
and a boatload more along that vein

Change-Id: Ic7d458d3b8e5c99df1995251f75d3ad57d0df967
2015-10-17 14:46:27 +01: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
Noel Grandin
8d811d701f loplugin:mergeclasses
Change-Id: I672d277a8d2dc6b57b299679e7e98348f9dbde30
2015-10-12 09:13:34 +02:00
Noel Grandin
1d8806120f loplugin:mergeclasses
Change-Id: I31fe981dac14bd732ee68ee1a2e475dd1b0498a2
2015-10-12 09:13:34 +02:00
Stephan Bergmann
1d00baff39 clang-analyzer-deadcode.DeadStores
Change-Id: I22b423b99c87070ab1b8ce7f3eff928384951947
2015-10-07 12:49:43 +02:00
Andrea Gelmini
9956b99e68 Fix typos
Change-Id: I44bdb63bef76e9686e995661a24a3bef7cd50ab7
Reviewed-on: https://gerrit.libreoffice.org/18959
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-30 11:03:11 +00:00
Stephan Bergmann
1656b722f0 loplugin:stringconstant: OUStringBuffer: appendAscii -> append
Change-Id: I3adb8d5664ecd8fafccc7bae0656f15100484422
2015-08-31 08:03:05 +02:00
Takeshi Abe
e00d41f76d io: tdf#88206 replace cppu::WeakImplHelper* etc.
with the variadic variants.

Change-Id: Iad03db6b729a785ab8b29a69943fa45f5a36b21b
Reviewed-on: https://gerrit.libreoffice.org/17849
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-19 07:48:50 +00:00
Stephan Bergmann
6b7c23b3fb Some oslCondition -> osl::Condition
Change-Id: Ib2c98db9ffd5871b6422c05f0230bbe27d1ba729
2015-08-18 08:16:19 +02:00
Noel Grandin
9e1d98fec2 loplugin: defaultparams
Change-Id: I320eb6149793689c496b14090e8e0243397d01ba
2015-08-14 11:11:10 +02:00
Noel Grandin
5256953397 inline some use-once typedefs
Change-Id: I55cc82c8e180cce371c996690608090b1bfdfda4
Reviewed-on: https://gerrit.libreoffice.org/17494
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03 12:16:13 +00:00
Noel Grandin
38ecca9b30 inline a bunch of use-once macros
no point in having a macro unless it's actually going to reduce the
number of lines of code

Change-Id: Ic8760d6506cf272d7bd088f7b3b4dcbf288099fc
2015-07-27 08:18:16 +02:00
Stephan Bergmann
8585e0a1fd Avoid loplugin:staticmethods in non-debug build
Change-Id: I205531a51f9d3e6611aafc5eb8fbd1ab49a517d8
2015-07-08 20:59:50 +02:00
Noel Grandin
1a7e0cfd86 loplugin:unusedmethods bridges,ucbhelper,io,pyuno
Change-Id: I483deb33b9d861af679d4a36e13585345401e10d
Reviewed-on: https://gerrit.libreoffice.org/16681
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-02 12:14:34 +00:00
Stephan Bergmann
950f7c31ea loplugin:cstylecast: deal with remaining pointer casts
Change-Id: Ia282c33c70977e3c9e8f1c6fd86bee2fa6eca5c3
2015-06-08 16:25:54 +02:00
Stephan Bergmann
224c8aabaa loplugin:cstylecast: deal with those that are (technically) const_cast
Change-Id: I61dc52779d3b873ba5429ddf53ba5be159b28ff2
2015-06-02 11:27:06 +02:00
Stephan Bergmann
2302e27d80 Clean up passing Boolean value to osl::Socket::setOption
Change-Id: I6757f2bc7e8b4ff9d7b3ebda88da35a5d7b93655
2015-05-08 09:49:03 +02:00
Noel Grandin
71b809959b remove unnecessary use of void in function declarations
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-15 11:47:12 +02:00
Stephan Bergmann
2fc4a8c811 Add support for cppu::UnoType<void>
Change-Id: I88259ffaffc73979c240721d2db166c79d3085f1
2015-04-01 12:48:44 +02:00
Stephan Bergmann
abf2ad6dae Replace remaining getCppuType et al with cppu::UnoType
Change-Id: I736518e38a9badf9ee24564952a135bd5019d110
2015-04-01 08:39:47 +02:00
Stephan Bergmann
a52cf476e7 Clean up template-parameter-dependent C-style casts
Change-Id: Ia1ab134a0afbeeb3ae40264bd4233a47df26b734
2015-03-29 15:13:45 +02:00
Stephan Bergmann
43c745912d Clean up C-style casts from pointers to void
Change-Id: I5f2240b6ac5210f185081bec891ad6d3f7901679
2015-03-28 19:09:22 +01:00
Stephan Bergmann
3099c70b11 Fix various XServiceInfo implementations
...to match what is recorded in the .component files

Change-Id: Ie548cd37872d3b8540222201afaac73040e65c8f
2015-03-17 12:25:11 +01:00
Noel Grandin
c9e6b58541 enable tcpNoDelay for loopback connections automatically
it can make a significant speed difference for applications
talking to the office binary via UNO

Change-Id: If6e901908fe6a6119ac1fd0bf8feebabe5602ff7
Reviewed-on: https://gerrit.libreoffice.org/13856
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-20 10:40:44 +00:00
Stephan Bergmann
14c12fac0e Some more loplugin:cstylecast: io
Change-Id: Iefd3268299b43ba08b9bc7699aa104288119ff4a
2015-01-20 09:06:48 +01:00
Caolán McNamara
fd1372ba8b boost::unordered_map->std::unordered_map
you can get debug stl this way

Change-Id: Ia70a3e7c7c452390e8bee34975d296c9318e4a19
2015-01-02 16:14:36 +00:00
Stephan Bergmann
e7d6a1d238 io: Use appropriate OUString functions on string constants
Change-Id: Ib05e759a1223d71e738940f6f9298ac593d94a27
2014-12-16 17:28:43 +01:00
Tor Lillqvist
14fa102cb9 Fix C4716: 'anonymous namespace'::Input::readBytes : must return a value
Change-Id: I1d660da4cdd3f612ac1478e37e613446d4253fae
2014-11-26 11:01:00 +02:00
Stephan Bergmann
ed30f63364 Unit test for fdo#79941 (handle short reads)
...done as a subsequentcheck as doing it as a BootstrapFixtureBase (which is the
easiest way) makes it depend on later modules in the dependency chain.

Change-Id: I9588bae409b38aa373ccfa855042f598b6e2bb2b
2014-11-24 22:04:35 +01:00
Stephan Bergmann
7a0bfcbce1 fdo#79941: Properly handle short reads
Change-Id: Ie762ff272410d809382f98a1d446946b566df747
2014-11-21 18:32:16 +01:00
Michael Stahl
721366ebe1 cppu: clean up public headers with include-what-you-use
Unfortunately iwyu gets quite confused by the weird cyclic dependencies
between various foo.h/foo.hxx and cppumaker generated headers, so it's
not obvious if any improvement here is realistic...

Change-Id: I0bc66f98b146712e28cabc18d56c11c08418c721
2014-11-18 18:51:48 +01:00