402 Commits

Author SHA1 Message Date
Stephan Bergmann
977c50178f idl: ignore -isystem args
Change-Id: I0758fd3117795ed68789385576aee5a885639104
2014-06-26 22:49:40 +02:00
Stephan Bergmann
3107156f41 loplugin:staticcall
Change-Id: Id440c165f6e98a7d0fe0c8c578e404db75416c48
2014-06-13 17:54:28 +02:00
Stephan Bergmann
f961cf50a7 Fix memory leak
Change-Id: Ie12862f8df701298db51ed45b5c24814a6f94def
2014-05-28 08:55:12 +02:00
Peter Senna Tschudin
3b24dcc8a8 Remove unnecessary semicolons
A simplified version of the semantic match that finds this problem is
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r1@
statement S;
position p,p1;
@@
S@p1;@p

@script:python r2@
p << r1.p;
p1 << r1.p1;
@@
if p[0].line != p1[0].line_end:
    cocci.include_match(False)
@@
position r1.p;
@@
-;@p
// </smpl>

Change-Id: Ib9708d37fbb4c6060f88d5dae3814a2d37b2091e
Reviewed-on: https://gerrit.libreoffice.org/9493
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-27 01:19:00 -05:00
Caolán McNamara
0897a5a8c5 coverity#1209405 Unchecked dynamic_cast
Change-Id: I5b16007b514169e2349c8c3a78d3c150c9d52d85
2014-05-26 15:51:59 +01:00
Thomas Arnhold
2bd7767d01 Resolves fdo#70681: fixincludeguards.pl: all that's left
Change-Id: I3e51a62710bb46c8255fd228d41d9300c90a1fb5
Reviewed-on: https://gerrit.libreoffice.org/9360
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-05-15 12:50:46 +00:00
Caolán McNamara
0d7b898bf7 coverity#1209786 Dereference before null check
Change-Id: I98bb62bbcb7ffbd2896ddbcbaeea27fff0851653
2014-05-09 09:43:16 +01:00
Caolán McNamara
0698ccf040 coverity#1209793 Dereference before null check
Change-Id: I5c89f7291117d66ff07f7d686c7030396cb504df
2014-05-09 09:43:15 +01:00
Caolán McNamara
6cf148baf9 translate to English
Change-Id: Ieb7ee3f8eb192612e76d5ad928389445e82ef90e
2014-05-08 14:48:22 +01:00
Noel Grandin
f0268c9c1b idl: sal_Bool->bool
Change-Id: I8b15c97b1fcc6acaf567e8b1d2d37cbc99687a9d
2014-05-08 11:44:54 +02:00
Thomas Arnhold
c12bc7f894 fixincludeguards.sh: idl and idlc
Change-Id: I665e901eb6f65308b8f130da1c6da95bc3255490
2014-04-19 11:10:12 +02:00
Takeshi Abe
9ef07c55bc This file seems unused since the 20th century
Change-Id: Idc26e03d51e37adbd23fb3c77d8ebe63ed8c3de3
2014-04-19 09:23:35 +09:00
Jan Holesovsky
2be92a9d4e svidl: Unwind SFX_SLOTMAP_ARG, and kill it.
Change-Id: Icd99fd2cd530f52b0acf5d91667eeec8142e8340
2014-04-18 22:49:26 +02:00
Jan Holesovsky
62256ea10a svidl: Unwind SFX_ARGUMENT macro, and kill it.
Change-Id: I61334b687c251ccc90f125e8bf95f8689028b8c3
2014-04-18 22:49:26 +02:00
Jan Holesovsky
6b1f812678 svidl: Unwind SFX_ARGUMENTMAP macro, and kill it.
Change-Id: I7c4902a4151f207d8a61b76d05fad74a4c8854d4
2014-04-18 22:49:26 +02:00
Andras Timar
c79a5f87b1 remove executable bit
Change-Id: I91f6e861f6d0dbea1b57ac73857e0c706b27f681
2014-04-17 15:11:14 +02:00
Stephan Bergmann
8f6c55a839 Replace SV_DECL/IMPL_REF macros with SvRef template
Change-Id: I0ef2e67f6d61e0ce118c0f5e926b8194ef9d8058
2014-04-07 12:38:27 +02:00
Stephan Bergmann
362d4f0cd4 Explicitly mark overriding destructors as "virtual"
It appears that the C++ standard allows overriding destructors to be marked
"override," but at least some MSVC versions complain about it, so at least make
sure such destructors are explicitly marked "virtual."

Change-Id: I0e1cafa7584fd16ebdce61f569eae2373a71b0a1
2014-04-01 19:22:54 +02: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
Matúš Kukan
4f4d9c0635 Avoid duplicate symbols in libmerged for Windows too.
This is working version of fc27a685d466dc380a8b68cd48f47db632ed3693

Change-Id: I48e861b5b7692ea051edf52d7ad9cc54ca989e22
2014-03-17 20:38:22 +01:00
Matúš Kukan
50c5a4ce9c Revert "Avoid duplicate symbols in libmerged for Windows too."
Forgot to test properly on Windows :-(.

This reverts commit fc27a685d466dc380a8b68cd48f47db632ed3693.
2014-03-14 10:10:09 +01:00
Matúš Kukan
fc27a685d4 Avoid duplicate symbols in libmerged for Windows too.
Export these symbols from sfx library.
For cases when we link together more libraries, there are more symbols,
so I've kept __attribute__((__weak__)) hack there.

Change-Id: I8b7f6fc9bea479dca5062344c04b74c1f3eb36b2
2014-03-14 09:31:42 +01:00
Caolán McNamara
2be3417bf6 coverity#1103651 Unchecked return value
Change-Id: Iee2bbba1e581364f72a73421ba8e799fa05a94e4
2014-03-10 11:36:26 +00:00
Caolán McNamara
525c539ac9 fix indent
Change-Id: I0f09c42928d354bd26fa5137a2faa768560b1223
2014-03-10 11:36:25 +00:00
Caolán McNamara
2a7f4e37b5 coverity#707933 Uninitialized scalar field
Change-Id: I03c835327eabc9bfdc9904abb2ba6a8f13bd7207
2014-03-08 20:28:01 +00:00
Caolán McNamara
dbfff3f4ae coverity#707932 Uninitialized scalar field
Change-Id: I73524c3e1911456ef14dcb07f073fed85f869524
2014-03-08 20:28:01 +00:00
Caolán McNamara
27f033ec70 coverity#707931 Uninitialized scalar field
Change-Id: I5c34f9bc96ee23fca6182740e3279de1485c61ea
2014-03-08 20:27:59 +00:00
Matúš Kukan
dbfc495a9a Add config option used when we try to link one huge object file.
In theory, it should not be used, we use it now to mark duplicated
symbols from sdi slots as weak. See idl/source/objects/types.cxx.

Change-Id: I3c6fccfb96884df6b9e6eb35b8615ba4d66ca208
2014-02-21 07:52:24 +01:00
Noel Grandin
0c7f352775 remove SvStream::operator>> methods
in favour of ReadXXX methods.

Change-Id: Ic2c0a7b6b92ff4c236ae99b39d77f3d935b301e3
Reviewed-on: https://gerrit.libreoffice.org/7915
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-02-12 19:45:10 +00:00
Noel Grandin
b2878af322 more SvStream:operator>> conversion
Convert the template based read_lenPrefixed methods to regular
methods.

Change-Id: Ifd0e93aca055e55a0575e4377ec2b8e266dfb019
Reviewed-on: https://gerrit.libreoffice.org/7895
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-02-12 15:32:11 +00:00
Noel Grandin
15535e32dd convert SvStream::operator>> methods to ReadXXX methods
First, I updated the clang rewriter to do the conversion.
Then I lightly hand-tweaked the output for the few places where
the rewriter messed up, mostly when dealing with calls on "this".

Change-Id: I40a6a977959cd97415c678eafc8507de8aa3b1a9
Reviewed-on: https://gerrit.libreoffice.org/7879
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-02-12 15:31:40 +00:00
Noel Grandin
a3682484c6 cid#705188 missing break in switch
Change-Id: I5e777801a7df934f61182f6df8f66fc18d00073c
2014-02-12 08:59:05 +02:00
Caolán McNamara
a0d5d57386 coverity#707930 Uninitialized scalar field
Change-Id: Ib652a8a1f81dde1f5ac3b6b7b73376c73777247c
2014-02-11 14:33:34 +00:00
Stephan Bergmann
dc61cc8c96 bool improvements
Change-Id: Ifdee50acbc72387812156af5cb8b078d97ebe5d1
2014-01-28 20:26:26 +01:00
Noel Grandin
16a2e90335 remove SvStream::operator<< methods
.. and convert the last few places still using those methods.

Change-Id: Id2cd8f9c0dd281df43af439d4fef65881f34a6fd
Reviewed-on: https://gerrit.libreoffice.org/7495
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-01-22 22:00:47 +00:00
Noel Grandin
d803483f6a convert more SvStream::operator<< calls
.. to more explicit SvStream::Write* calls
This was done using another run of the clang rewriter, and then
a lot of hand tweaking to fix all the places where the rewriter
did not play nice with various macros.

Change-Id: I7bcab93851c8dfb59cde6bc76290c6484d88fb18
Reviewed-on: https://gerrit.libreoffice.org/7494
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-01-22 22:00:39 +00:00
Stephan Bergmann
bbd9668d5f bool improvements (related to mixing bool/sal_Bool in &=, |=, ^=)
Change-Id: I9869d9709f28b68ef7b518527175589d80644668
2014-01-22 15:00:54 +01:00
Noel Grandin
c648d08720 convert SvStream::operator<< overloads to more explicit methods
This is in preparation for more conversion of SvStream::operator<< calls
to use more explicit method names.
This converts the subclasses that have their own convenience overloads
of operator<< to use normal methods.

Change-Id: I5efd5d9a24c264cb86d2471303dd5849bf91ba80
2014-01-16 16:08:34 +01:00
Caolán McNamara
2530d2923c presumably each entry needs a tab and semicolon
Change-Id: Iedb57186d56c6d1445bcfe2ad37d0569dba32b4e
2013-12-27 13:40:35 +00:00
Julien Nabet
c959586c09 cppcheck: fix Same expression on both sides of '||' + simplify a bit
Change-Id: I7903c4af5263f93dc4d311b73cb21e144a63d8d9
2013-12-27 14:28:42 +01:00
Noel Grandin
6eac9deadd remove unnecessary RTL_CONSTASCII_STRINGPARAM in OUString::equalsL
Convert code like this:
    if (aStr.equalsL(RTL_CONSTASCII_STRINGPARAM("rem")))
to:
    if (aStr == "rem")
which compiles down to the same code.

Change-Id: I2dfa0f0a457c465948ecf720daaa45ff29d69de9
2013-11-21 13:29:29 +02:00
Noel Grandin
d454834895 Revert "remove RTL_CONSTASCII_STRINGPARAM in OString::equalsL calls"
This reverts commit acebbee971136e6ee0a7bc75bd57d937d6e1c295.

I mistakenly converted OUString::equalsL calls to OUString::startsWith
calls.
2013-11-20 16:38:28 +02:00
Noel Grandin
acebbee971 remove RTL_CONSTASCII_STRINGPARAM in OString::equalsL calls
Convert code like:
    if (aByteStr.equalsL(RTL_CONSTASCII_STRINGPARAM("rem")))
to:
    if (aByteStr.startsWith("rem"))

Change-Id: I09e40b3fdc87d59a8176c2a5f39cc6aa5cf5a576
2013-11-20 13:56:08 +02:00
Noel Grandin
d894fee80e remove RTL_CONSTASCII_STRINGPARAM in OStringBuffer constructor
Convert code like:
    OStringBuffer aKeyName(RTL_CONSTASCII_STRINGPARAM("NDX"));
to:
    OStringBuffer aKeyName("NDX");
which compiles down to the same code

Change-Id: If9c96a290bc18cc8285fb733f27be58c6958b63c
2013-11-20 13:56:07 +02:00
Noel Grandin
5112f6a6c6 remove RTL_CONSTASCII_STRINGPARAM in OString constructor
Convert code like:
    OString aKeyName(RTL_CONSTASCII_STRINGPARAM("NDX"));
to:
    OString aKeyName("NDX");
which compiles down to the same code

Change-Id: I1780264cae4484fc78f0586b0750c09f2dce135f
2013-11-20 13:56:07 +02:00
Noel Grandin
1730df0127 remove unnecessary RTL_CONSTASCII_STRINGPARAM in OString::append
Convert code like:
   aOStringBuf.append( RTL_CONSTASCII_STRINGPARAM( " is missing )") );
to:
   aOStringBuf.append( " is missing )" );
which compiles down to the same code.

Change-Id: I3d8ed0cbf96a881686524a167412d5f303c06b71
2013-11-20 10:07:32 +02:00
Tor Lillqvist
93a23d1148 No __weak__ in Win32
Change-Id: I3bd5e3787d0f47cfef667734211cdf8c0fd606a7
2013-11-15 18:16:50 +02:00
Michael Stahl
f35b3fea46 clean up #ifdef ICC code
According to the dmake documentation, ICC refers to Visual Age C++ for
OS/2, which is not a supported compiler (or platform).

Change-Id: Ic9e23bc7c44de110a3a312bd007beda3b660927d
2013-11-10 00:03:22 +01:00
Michael Stahl
5effaa90f3 idl: fix out of bounds string accesses
Change-Id: Id0d07ff9bcd4858cb74458eaf13fb9386387f455
2013-11-07 01:34:34 +01:00
Caolán McNamara
45e366eadb drop unnecessary tools/string includes
Change-Id: I4278999b9b7d184c26036bbe9e3b98420f461e8c
2013-10-20 19:00:36 +01:00