Noel Grandin
0eb9f56db5
use uno::Reference::set method instead of assignment
...
Change-Id: I2b592fd3327f4bbe4685e84711dc9d6f19222a97
2015-11-05 07:41:29 +02: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
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
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
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
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
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
Caolán McNamara
e57401aeb0
coverity#704287 Logically dead code
...
Change-Id: Iab22d2d12319bc01f9aebc1dcf40f47881d40446
2014-03-29 18:12:06 +00: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
Noel Grandin
2ac50736e4
remove unnecessary use of OUString constructor in SCRIPTING module
...
Change-Id: I87dd775949d1d3cc2c191e84e57b49cd66ecc750
2013-11-11 08:36:06 +02:00
Noel Grandin
aeb41c9b9b
remove redundant calls to OUString constructor
...
Change code like this:
aStr = OUString("xxxx");
into this:
aStr = "xxxx";
Change-Id: I31cb92e21658d57bb9e14b65c179536eae8096f6
2013-11-04 10:11:07 +02:00
Noel Grandin
0e6a2601b3
Convert code that calls OUString::getStr()[] to use the [] operator
...
This also means that this code now gets bounds checked in debug builds.
Change-Id: Id777f85eaee6a737bbcb84625e6e110abe0e0f27
2013-11-04 08:06:10 +02:00
Noel Grandin
e2451bd729
Convert indexOf->startsWith and lastIndexOf->endsWith
...
This is both an optimisation and a cleanup.
This converts code like
aStr.indexOf("XX") == 0
to
aStr.startsWith("XX")
and converts code like
aStr.lastIndexOf("XXX") == aStr.getLength() - 3
to
aStr.endsWith("XXX")
Note that in general
aStr.lastIndexOf("X") == aStr.getLength() - 1
converts to
aStr.isEmpty() || aStr.endsWith("X")
so I used the surrounding context to determine if aStr could be empty
when modifying the code.
Change-Id: I22cb8ca7c2a4d0288b001f72adb27fd63af87669
2013-10-31 08:34:21 +02:00
Marcos Paulo de Souza
ee5661ecd3
fdo#54938: Adapt supportsService implementations..
...
to cppu::supportsService
Change-Id: I0b03d3910f094f2183bf9859db9d5bcaf35d1f14
Reviewed-on: https://gerrit.libreoffice.org/6370
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
Tested-by: Stephan Bergmann <sbergman@redhat.com >
2013-10-22 10:28:10 +00:00
Takeshi Abe
f4004429d3
Mark as const
...
Change-Id: Ic81dd60fadecf72f25792903985f2b387df7a7a0
2013-08-19 07:47:34 +09:00
Eike Rathke
6b2aaa7d23
resolved fdo#67444 don't push_back() with already reserved size
...
Change-Id: I5660bdf07ad0adae053508bed1805369850c1134
2013-08-07 12:02:58 +02:00
Eike Rathke
38522416bd
use LanguageTag::getMatchingFallback()
...
Change-Id: Ib6fd9581728bdd7c32ccec9ce538d9b4c5658b04
2013-07-11 17:48:14 +02:00
Eike Rathke
3f1a58884e
added FIXME-BCP47 comments
...
Change-Id: I9e47a22f8a061461bfb0f21e74ae001e719f04b6
2013-07-10 21:48:15 +02:00
Noel Grandin
6a043e9c0a
Use the new type-checking Reference constructor to reduce code noise
...
Also create a Clang compiler plugin to detect such cases.
Change-Id: I61ad1a1d6b1c017eeb51f226d2dde0e9bb7f1752
Reviewed-on: https://gerrit.libreoffice.org/4001
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org >
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2013-05-22 10:44:29 +00:00
Stephan Bergmann
617e7c6231
Missing include
...
Change-Id: I1be082b7db5592ad5090cf3ffaafe708bb1d9be4
2013-04-16 19:07:36 +02:00
Luboš Luňák
1946794ae0
mass removal of rtl:: prefixes for O(U)String*
...
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).
Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-04-07 14:23:11 +02:00
Thomas Arnhold
39d45390f4
removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings declarations
...
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-19 10:48:30 +00:00
Thomas Arnhold
8b27d78b4a
automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
...
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 >
2013-03-19 09:00:26 +00:00
Caolán McNamara
df37f7d8e8
move loop variables into least scope pos
...
Change-Id: I8e69e92bbfee2bf20918d041ecc6b7a3f7729fbd
2013-02-24 23:24:26 +00:00
Julien Nabet
3901964b6d
coverity#704434 Non-array delete for scalars
...
Change-Id: Ie92de56ead7988d951fe44cf63b4e72214b1e22f
Reviewed-on: https://gerrit.libreoffice.org/2358
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2013-02-24 23:22:55 +00:00
Thomas Arnhold
d5caf6898b
loplugin: unused variables
...
Change-Id: I7fc203900256839e679bf73b717d121fedc42087
2013-02-24 17:44:31 +01:00
Noel Grandin
fbd4588afd
fdo#46808, convert io::TextOutputStream service to new-style
...
Change-Id: I12af47afc21c2b646197893a77698f4e0818f94f
2013-02-11 08:02:15 +02:00
Noel Grandin
ff85e8319a
fdo#46808, convert io::TextInputStream service to new style
...
Change-Id: Ida4abdd6587399aa8ade88af672bcb23ab7ea0f1
2013-02-11 08:02:15 +02:00
Tor Lillqvist
60e7472b9d
OUString::concat() does not modify in-place
...
Change-Id: I298f33a23e44146d7ce5fbf72d176020804e03d6
2012-11-28 21:49:24 +02:00
Noel Grandin
5837402fb1
fdo#46808, use service constructor for ucb::SimpleFileAccess
...
I upgraded the service to return XSimpleFileAccess3, since it
already implemented that interface, and it's backwards
compatible.
Change-Id: I40001a46048bd21a23b6a2f58a95376f06fc634b
2012-11-15 08:28:44 +01:00