Commit Graph

442 Commits

Author SHA1 Message Date
c12bc7f894 fixincludeguards.sh: idl and idlc
Change-Id: I665e901eb6f65308b8f130da1c6da95bc3255490
2014-04-19 11:10:12 +02:00
9afdc72df6 callcatcher: update unused code
Change-Id: I48990c044e4583e835f3e995527ba423e8c459fb
2014-03-24 12:12:22 +00:00
a52c42ae05 loplugin:literaltoboolconversion
Change-Id: I513aeeabbb4d6fc48b6a95e034c311a454dd5ca7
2014-03-12 16:24:42 +01:00
ec689e4561 coverity#707935 Uninitialized scalar field
Change-Id: I7c957419b72cc97dbec819c51acb521bcd716624
2014-03-08 20:28:02 +00:00
361774e910 idlc: sal_Bool -> bool
Change-Id: Ibeed903d73eb8b3fce7b8c6021c9107437a8c813
2014-02-17 17:55:17 +01:00
89420ff310 Fix spelling errror
Change-Id: Ie5fc19fa223942e31899408324beb2e15c1d7bef
2014-02-06 19:16:56 +02:00
8e71d9400b Remove UNOIDL "array" and "union" vaporware from idlc
Change-Id: Iccd5a78b54620796cfde672388b70ad97d17b7a5
2014-01-30 17:53:45 +01:00
5061fa5345 bool improvements
Change-Id: I0ec9d6ed41eddbc0177c26755b621f404cfd4703
2014-01-28 20:26:26 +01:00
5806a777b0 coverity#440064 Logically dead code
Change-Id: I52c9e37ca4d3238b9018264b6542a9dcebca13f6
2014-01-28 11:29:17 +00:00
57f288fdcc coverity#440240 Dereference after null check
Change-Id: I1ca5e4d31ab203a0ddd5e98928f5046f5fffb485
2014-01-25 03:10:52 -06:00
c69b6417af fdo#72598 Remove SunStudio cruft from code base
Change-Id: Ia6799c852eb95d496fbc8dcfdabde62dffc263a6
Reviewed-on: https://gerrit.libreoffice.org/7066
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2013-12-13 09:07:07 +00:00
a39d07e134 Unwind occurrences of deprecated sal_sChar, sal_uChar
Change-Id: I76be464200d486efef9c8a7e957c310c9adae3b8
2013-11-27 12:52:32 +01:00
2c35fff7ec remove most use of RTL_CONSTASCII_USTRINGPARAM macro
This is largely unnecessary when working with OUString

Change-Id: I3cf4d68357a43665d01162ef4a2d5346a45da9be
2013-11-19 10:29:30 +02:00
e52779d2f8 remove unnecessary use of OUString constructor
Change-Id: Ifb220af71857ddacd64e8204fb6d3e4aad8eef71
2013-11-11 11:21:26 +02:00
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
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
7eb42bddb3 windows: warning 4706 is disabled globally in com_MSC_defs.mk
So there is no need to do this locally, too.

Change-Id: Ibc623235cae07a86dfd0dbc1d7672ca4273facec
2013-10-28 01:08:27 +01:00
7a06928bcf convert code to use OUString::endsWith
Convert places that call
   aStr[aStr.getLength()-1] == 'x'
to use the shorter form
   aStr.endsWith("x")

Change-Id: I1b3a19c0e89b8989cdbeed440f95fc76f9a4b6b6
2013-10-23 08:29:15 +02:00
a7724966ab Bin comments that claim to say why some header is included
They are practically always useless, often misleading or obsolete.

Change-Id: I2d32182a31349c9fb3b982498fd22d93e84c0c0c
2013-10-22 16:56:28 +03:00
5f5a981dd6 CID#705985 ensure umask for mkstemp
Change-Id: I861b85ac38a2881ff4b993047c1a15335308ba62
2013-09-12 13:09:04 +01:00
af05fe65ab CID#440614 use after free
a bit of guesswork here I admit

Change-Id: I774da6f585e4b81a25660b7823d6bb150630f44f
2013-09-12 13:09:03 +01:00
71ac97f709 Minor clean up
Remove an odd {1} repeat count, and remove the "."{DIGIT}+ pattern that is
already covered by the following {DIGIT}*"."{DIGIT}+ pattern.

Change-Id: If99dfe10a5e37225355472bf4deceb34c0a92eb9
2013-09-04 14:37:54 +02:00
2f4eeea173 Do not leave $$ uninitialized in case of error
Change-Id: Id28fb53a98ff164cd14f8f9dcb4ebee7a71bfd1e
2013-08-28 16:45:56 +02:00
284a03b4d2 parser.y: untabify, remove trailing whitespace, mode lines
Change-Id: Ief0109289c6dc70b51193fa5f4432efe2b48c3fb
2013-08-28 16:36:36 +02:00
4ef1f4ae49 downcast of address which does not point to an object of type 'AstInterface'
(note: object is of type 'AstTypeDef'); Clang -fsanitize=undefined

Change-Id: I1b11a7678f18557c8040af2118c1c0101913f086
2013-08-22 07:13:58 +02:00
d239ee4fa4 downcast of address which does not point to an object of type 'AstType'
(note: object is of type 'AstDeclaration'); Clang -fsanitize=undefined

Change-Id: I08eef7d3e8b298abd16b0c6d72cfb72b75190cd5
2013-08-22 07:13:58 +02:00
64b993e046 finish deprecation of O(U)String::valueOf()
Compiler plugin to replace with matching number(), boolean() or OUString ctor,
ran it, few manual tweaks, mark as really deprecated.

Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
2013-08-21 15:10:35 +02:00
caab53cf21 fdo#43460 connectivity,extensions,filter,idl,idlc: use isEmpty()
Change-Id: I78ba286be5aa4d731f734e5eb16adb77c686aad9
Reviewed-on: https://gerrit.libreoffice.org/4325
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2013-06-18 17:31:20 +00:00
4b373ef7f5 fdo#60724 change spelling error REMOVEABLE -> REMOVABLE II
Change-Id: I0057b9174af6a83f3fde0e27c3a91a4aeca95873
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-05-29 10:43:24 +02:00
2ae6f9d1d2 RHEL-5 baseline ver of flex doesn't have nounistd
lets try this hack, if it fails revert and I'll just
manually update the baseline with a newer flex than
flex-2.5.4a-41.fc6

Change-Id: If644489e80fc4e4cdba97808af0fe4d544d08646
2013-05-23 13:57:20 +01:00
09373d4583 soltools: remove Package_inc and empty unistd.h nonsense
Change-Id: Ic05de69951b28b9cc8d62f0a534b507c424e6b25
2013-05-10 17:56:24 +02:00
84068dae54 fix logical-op-parenthesis warning
Change-Id: Ib97f667c9acb644c3becb81f851ad8c7e4ff31ea
2013-04-07 09:42:18 -04:00
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
ce2991ee86 Forbid old-style services/singletons inheriting new-style services
...does not make sense.  Adapted some old-style services accordingly, where the
inherited service had been changed to new-style after the fact.

Change-Id: I5f3e4ddf99160778a319062a6c84f83529ff177b
2013-04-03 11:30:06 +02:00
aa753f01ba -Wunused-macros
Change-Id: Ifaa1637122d6f9cae1e29b77ac36ca5d1f220aed
2013-03-27 09:36:53 +01:00
488e6875e9 remove external include guards
Change-Id: If5758e02baa8e019923355b6c97043b306223fdd
2013-03-25 19:58:16 +01:00
fa545023ad Introduce HAVE_GCC_PRAGMA_DIAGNOSTIC_{MODIFY,SCOPE}
...replacing hard-coded GCC version checks.  Those checks that guard

  #pragma GCC diagnostic ignored "-Wnon-virtual-dtor"

appear relevant only for GCC itself, not Clang (which used to fail the old
guards because it typically announces itself with a rather low
__GNUC__/__GNUC_MINOR__ version), see 6e67c03dc0225fc66343546b14e902b9d238b1a3
"Enable -Wnon-virtual-dtor for GCC 4.6"

Change-Id: I6bfa4d5caa6192e7a203ce829682bf6bb8d61a1b
2013-03-25 08:52:54 +01:00
c7af37db60 deleting NULL is safe
Change-Id: I3748d0034b2c8e9d9122ad2a9001763eb1265e1d
2013-03-25 10:54:05 +09:00
0ed451e338 coverity#704237 Logically dead code
Change-Id: I7a5087b2ac89ee2839f0e0d8450efc7fca1dd68b
2013-03-23 17:28:48 +01:00
25363b4e45 coverity#440066 Logically dead code
Change-Id: I54d1b22859bd4f0a1e68ce79ed2ce4d7fbeb5107
2013-03-22 19:53:41 +01:00
f25fcba2f2 coverity#440065 Logically dead code
Change-Id: I6b735ca48bd996c71ad6c6103e68af2cd2890d98
2013-03-22 19:42:28 +01:00
5bb4a2ba1d further OUString cleanup
Change-Id: I19954ee5976cb881a5fe73a889c8e04a19b14eb6
2013-03-19 14:18:10 +01:00
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
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
1b4b53a2ec fix spelling
Change-Id: I52eb4153c3396be88b72cab3b7899f0c6ab18103
2013-03-07 08:23:37 +02:00
21e1e859a7 fdo#60724 change spelling error REMOVEABLE -> REMOVABLE
Only applies to PropertyAttribute::REMOVEABLE, and all instances in comments.
All other instances of the misspelling have remained the same.
Example: AF_REMOVEABLE

Change-Id: I391f4101bbc3e06689318235a37d616065bc1686
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-03-06 10:39:30 +01:00
f68cd77923 Fix type unkown -> unknown
Change-Id: I8d55d5ae5ae38ae2b252859b5400e36301f19ef0
2013-02-21 21:50:01 +01:00
814ae45d4b Some cppcheck cleaning
Change-Id: I099171d85a51095f0ff6d592c1260d931f9769b2
2013-02-13 15:08:20 +01:00
56f4d7dc9d Some cppcheck cleaning
Change-Id: I8609949377181f8edb30ac07b2791cfcd079fc7d
2013-02-12 21:24:25 +01:00
f8569cd9a2 UNO constants cannot be of CHAR type
Change-Id: I13f2f1d38b99a5eb1d10f40c524894e37a47f7e2
2013-01-30 13:52:03 +01:00