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
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
Noel Grandin
aa6c54f337
loplugin:unusedfields
...
Change-Id: I321b594f1190cdd997b4769161e1c02d31f46213
Reviewed-on: https://gerrit.libreoffice.org/21566
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2016-01-18 08:37:10 +00:00
Noel Grandin
fe0e43a376
loplugin:unusedmethods unused return value in scripting
...
Change-Id: I9b203e255eddce59c37df1a94884e459df034459
2016-01-14 11:45:21 +02:00
Caolán McNamara
bea8a7ad63
cppcheck: noExplicitConstructor
...
Change-Id: Ib43e53d5b6c9c130adb765ac9b769f58060ac640
2015-12-29 19:46:23 +00:00
Noel Grandin
8ac44ca189
loplugin:unusedfields in scripting
...
Change-Id: Ida8fb31bd85f4807d74daab3d022d8e6340a774d
2015-12-22 09:53:26 +02:00
Noel Grandin
a508f639a0
mark UNO structs as SAL_WARN_UNUSED, where possible
...
Change-Id: Ie3de518f60c9f1313c68df54dbdc1fb2804f1f0d
2015-11-26 13:26:25 +02: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
Stephan Bergmann
65464ed098
loplugin:nullptr (automatic rewrite)
...
Change-Id: I9b7d8de65780325175d24965057596b88d3c0f05
2015-11-10 10:31:37 +01:00
Stephan Bergmann
801b914324
loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
...
Change-Id: If0f1446a25f423b8cbfe6346f7a691f4f2618ad0
2015-11-06 09:36:56 +01:00
Noel Grandin
0eb9f56db5
use uno::Reference::set method instead of assignment
...
Change-Id: I2b592fd3327f4bbe4685e84711dc9d6f19222a97
2015-11-05 07:41:29 +02:00
Caolán McNamara
4ea0390faa
cppcheck: noExplicitConstructor
...
Change-Id: I06186e8f0bbc8522f538e8639a68e816093becc2
2015-11-02 10:16:38 +00:00
Noel Grandin
d95a27f944
com::sun::star->css in scaddins,sccomp,scripting
...
Change-Id: Id9167341940bac65f055e1e33ff0670f6fa0f6c4
Reviewed-on: https://gerrit.libreoffice.org/19629
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
2015-10-28 06:31:27 +00: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
Takeshi Abe
f3c7e69536
scripting: tdf#88206 replace cppu::WeakImplHelper* etc.
...
with the variadic variants.
Change-Id: I2a59d42efbb1aeef5078d0b0744b5a3c0559affa
Reviewed-on: https://gerrit.libreoffice.org/18123
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Michael Stahl <mstahl@redhat.com >
2015-09-03 17:53:31 +00:00
Caolán McNamara
7462cfde6d
coverity#1308579 Uncaught exception
...
Change-Id: I6bd1f9cdf69865972de9c22106a95e1ebf9a74f7
2015-06-29 09:43:34 +01:00
Caolán McNamara
9202cab167
coverity#1308598 Uncaught exception
...
Change-Id: Id65e076641506e128c27cec4f50bc677e808fa95
2015-06-29 09:43:31 +01:00
Caolán McNamara
6f823d85f7
coverity#1308548 Uncaught exception
...
Change-Id: I62d538799a814346df4de00dc232a04376e77ad7
2015-06-28 20:52:35 +01:00
Caolán McNamara
a4fdbaf546
coverity#1308512 Uncaught exception
...
Change-Id: Iacdf2e25fb041ec7e2bae8a505604ef538ee9dac
2015-06-28 17:55:48 +01:00
Noel Grandin
4ea281a3cc
cppcheck:redundantAssignment
...
Change-Id: I1167d0ce6b6f6e48309d0551c1d2a283d79546a7
2015-06-15 13:34:14 +02:00
Stephan Bergmann
4446cdf20b
loplugin:cstylecast: deal with remaining pointer casts
...
Change-Id: I14d1c6f703c83bc4a0259ce68e93a315bbfdde4e
2015-06-08 16:27:44 +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
Noel Grandin
ee094bd46f
loplugin:staticmethods
...
Change-Id: If97f01a05294fa7efd59a8934c7b6f65cda5084a
2015-04-13 09:37:12 +02: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
Julien Nabet
7da92fdcb0
cppcheck: Possible inefficient checking for <var> emptiness
...
Change-Id: I6ca0e477a4429e762c48c721951b9876db3a5c6c
2015-01-04 19:11:13 +01:00
Caolán McNamara
ca8787a981
boost::unordered_map->std::unordered_map
...
Change-Id: I5d458f43616edc395faa8c27edaddc7d515166db
2015-01-04 12:51:09 +00:00
Michael Weghorn
17fc7aa3b8
fdo#39440 reduce scope of local variables
...
This addresses some cppcheck warnings.
Change-Id: I390607e002e93cf7a6babc26d9be084d9f185058
2014-12-21 20:18:17 +01:00
Andrea Gelmini
da40cac540
Fix common typos. No automatic tools. Handmade…
...
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959
Reviewed-on: https://gerrit.libreoffice.org/12164
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2014-11-12 11:04:11 +00:00
Noel Grandin
705c48d32e
fdo#38835 strip out OUString globals
...
they are largely unnecessary these days, since our OUString infrastructure
gained optimised handling for static char constants.
Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
2014-11-05 08:44:19 +02:00
Norbert Thiebaud
39c8834d21
coverity#1209004 Unchecked return value
...
Change-Id: I8749a5d6f176406e181312d94a1e643974d87617
2014-10-05 13:26:10 -05:00
Daniel Sikeler
32d6415617
fdo#83512 Make use of OUStringHash and OStringHash
...
Change-Id: I33cafe68c798e3d54943ea1790fa4e73f85e525d
Signed-off-by: Stephan Bergmann <sbergman@redhat.com >
2014-09-18 13:12:48 +02:00
Caolán McNamara
d375986dae
coverity#707084 Uncaught exception
...
Change-Id: I89459f7a77fcb5785cfb2e8288326fce65202d9c
2014-09-02 15:36:28 +01:00
Stephan Bergmann
70946992d4
Fix some *_component_getFactory function types
...
Change-Id: I912f9d1454c049419e9ead6f0ff8d7fa7d8cd6c5
2014-08-28 16:11:33 +02:00
Noel Grandin
533c6cb6ba
fixes for up-casting to Reference<XInterface>
...
Fix regressions introduced with
6a043e9c0a
"Use the new type-checking
Reference constructor to reduce code noise"
Change-Id: I85662856f21c810a7db497fe3b0e116f075b1687
Signed-off-by: Stephan Bergmann <sbergman@redhat.com >
2014-06-25 17:10:43 +02:00
Julien Nabet
d59da701c6
Related fdo#58774 Alternative dialog Find & Replace for Writer
...
After having installed the extension from http://extensions.libreoffice.org/extension-center/alternative-dialog-find-replace-for-writer/releases/1.4
I had a crash, extract of bt:
5 0x00002aaad3ee13df in rtl::OUString::copy (this=0x7fffffff2510, beginIndex=147, count=-15) at /home/julien/compile-libreoffice/libreoffice/include/rtl/ustring.hxx:1481
6 0x00002aaad3edc10e in stringresource::StringResourcePersistenceImpl::implScanLocaleNames (this=0x8e2bba0, aContentSeq=uno::Sequence of length 24 = {...})
at /home/julien/compile-libreoffice/libreoffice/scripting/source/stringresource/stringresource.cxx:1728
So add a quick check to be sure iDot > iSlash
Change-Id: I944a852d6cc9a35c451985ac96032f0d848136e8
2014-06-21 22:33:17 +02:00
Noel Grandin
db246b491c
scripting: remove SAL_THROW macro
...
Change-Id: I535a57d043ac51926ae6f640d721d0dd1571c3fa
2014-06-05 08:17:52 +02:00
Noel Grandin
e7bc3cab01
remove boilerplate in UNO Exception constructor calls
...
Now that we have default values for Exception constructor params,
remove lots of boilerplate code.
Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
2014-05-23 15:06:00 +02:00
Noel Grandin
b2096deaff
various loplugin:passsequencebyref
...
Change-Id: Id1045a7f66b4fa10b6491587ba07246a31ceba72
2014-05-14 16:54:27 +02:00
Noel Grandin
2ff8ae7c9e
scripting: sal_Bool->bool
...
Change-Id: I1550c49cce2ad64f9d62b06ec20512a750f83b84
2014-04-24 10:53:16 +02:00
Thomas Arnhold
8bb2ce61c0
fixincludeguards.sh: some smaller dirs
...
Change-Id: Ic25bd678dc299627299b22145efd7bebcf2b39d0
2014-04-19 11:10:13 +02:00
Noel Grandin
5babf1b903
remove unnecessary scope qualifier from sal_Bool uses
...
i.e. convert "::sal_Bool" to "sal_Bool"
Change-Id: Ie5943aee4fee617bf2670655558927ed25b7e067
2014-04-03 13:54:02 +02:00
Caolán McNamara
e57401aeb0
coverity#704287 Logically dead code
...
Change-Id: Iab22d2d12319bc01f9aebc1dcf40f47881d40446
2014-03-29 18:12:06 +00:00
Stephan Bergmann
70cc2b191b
First batch of adding SAL_OVERRRIDE to overriding function declarations
...
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.
Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-03-26 16:39:26 +01:00
Noel Grandin
86a32589e9
Find places where OUString and OString are passed by value.
...
It's not very efficient, because we generally end up copying it twice -
once into the parameter and again into the destination OUString.
So I create a clang plugin that finds such places and generates a
warning so that we can convert them to pass-by-reference.
Change-Id: I5341a6ea9e3190f4b4c05c42c85595e3dcd83361
2014-03-18 08:32:26 +02:00
Donizete Waterkemper
c4cff5a645
fdo#54938: Convert some places to use cppu::supportsService
...
Change-Id: Ib941c6ec82d81b1da815561eee87ee91dc8de200
Reviewed-on: https://gerrit.libreoffice.org/8443
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org >
Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com >
2014-03-03 15:53:46 -06:00
Stephan Bergmann
5e21a413c7
cppuhelper: retrofit std::exception into overriding exception specs
...
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
Alexander Wilms
b0308236d2
Remove visual noise from scripting
...
Change-Id: Id9f177a20d911ce1e041407aa556c9cf13f0efc8
Reviewed-on: https://gerrit.libreoffice.org/8305
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2014-02-26 08:37:40 -06:00
Alexander Wilms
0ce0c369aa
Remove unneccessary comments
...
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb
Reviewed-on: https://gerrit.libreoffice.org/8182
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2014-02-23 03:38:49 +00:00
Stephan Bergmann
dbac5ccaf8
bool improvements
...
Change-Id: I0ef2adc0bd4a4764c38094b2b7d27c3453ecc117
2014-01-28 20:26:23 +01:00
Noel Grandin
82625bb98e
remove unnecessary sal_Unicode casts in OUStringBuffer::append calls
...
Convert code like:
buf.append( static_cast<sal_Unicode>('!') );
to:
buf.append( '!' );
Change-Id: Iacb03a61de65a895540940953b49620677b3d051
2014-01-07 09:43:37 +02:00