Commit Graph

216 Commits

Author SHA1 Message Date
Noel Grandin
dac4ca5f68 new loplugin: externalandnotdefined
Find "missing headers," where a function is declared directly in the
.cxx (as extern) and not defined, and should arguably instead be declared
in an include file.

Change-Id: I6d83ee432b2ab0cd050aec2b27c3658d32ac02a2
2014-07-11 14:12:25 +02:00
Norbert Thiebaud
42fcd888ae coverity#735397 dead code
Change-Id: If8d82a39af7a506f42b6c13d8408ffc479b564e7
2014-07-01 12:44:06 +02:00
Caolán McNamara
a7fcb3ed07 clang: Returning null reference
Change-Id: I2cfc14e73696a027283dfa5eef98f784505dc5a3
2014-06-26 16:29:13 +01:00
Thomas Arnhold
dd8f095940 WaE: warning C4101: 'ex' : unreferenced local variable
Change-Id: Ib8b71b50fe52a7cc4e261626549ac3e067851797
2014-06-04 08:30:26 +02:00
Kohei Yoshida
5a827671d1 Avoid static local of a singleton. This crashed writer unit tests.
Change-Id: I7c5f2d372676cdb317a8dad636bf1aab7dd5db37
2014-05-29 21:59:42 -04:00
Takeshi Abe
a71ae24a23 Avoid possible memory leaks in case of exceptions
Change-Id: Iac63a5d60478e5cd8e2b77c889c7b312d3d15f67
2014-05-29 09:29:15 +09:00
Caolán McNamara
3d046b753d coverity#706235 Uncaught exception
Change-Id: I06321ca2b686207a1d9bd698461aedf84daf31e1
2014-05-28 13:49:50 +01:00
Caolán McNamara
9986fe77f4 coverity#706234 Uncaught exception
Change-Id: I7542008369ed3433cd8bfce7702f036148195516
2014-05-28 13:49:50 +01:00
Caolán McNamara
cf16d4eb9d coverity#706232 Uncaught exception
Change-Id: I07e13af4f4578d5d6823b6d10aa9c37d04ecc395
2014-05-28 13:49:49 +01:00
Stephan Bergmann
a77a7f6083 Fix memory leak
...by using css::uno::Type instead of a naked typelib_TypeDescription.

Change-Id: I387692265e9e032cb5ed6519739ebb3307db6f28
2014-05-28 14:34:12 +02:00
Stephan Bergmann
b8a329989c Fix memory leak (missing typelib_TypeDescription_release)
...by radically simplifying TypeToIdlClass().  It is unclear to me why this was
so complicated.  The only mildly plausible reaons would be that the old code
was careful to return null instead of throwing an exception for an unknown type,
but the TypeToIdlClass-call-sites either strongly expect a non-null return value
(by dereferencing it without any further checking) or use OSL_ASSERT or similar
to verify it.  So lets hope this is good.

Change-Id: I3e24eb6117e84c9d33f4c5f0e2fa88da4c4f2c30
2014-05-28 14:34:12 +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
Julien Nabet
b09b5f8f7c Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part19
Change-Id: Iab50c52a132c90389992ef68c2d31df95a193ab9
2014-05-22 23:21:18 +02:00
Julien Nabet
68741d0055 Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part13
Change-Id: Ieecfd7ccb10c75ac639d0ba8e7cb588607097c2a
2014-05-15 22:52:22 +02:00
Julien Nabet
5ec7a589be Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part8
Change-Id: Ie16923d17541e84e0d7424fffe37caf410786abf
2014-05-10 06:19:42 +02:00
Thomas Arnhold
9e436082af dflt -> default
Change-Id: I89f1f5771eb7d96da233a8c7386b906b2a3a9c3e
2014-05-06 07:19:09 +02:00
Noel Grandin
4f9b21248f simplify ternary conditions "xxx ? yyy : false"
Look for code like:
   xxx ? yyy : false;
Which can be simplified to:
   xxx && yyy

Change-Id: Ia33c0e452aa28af3f0658a5382895aaad0246b4d
2014-05-05 12:47:48 +02:00
Thomas Arnhold
618a0f8c03 whitespace for include statements
Change-Id: I76bd0ef07a2fa134e948724cecdf539ffe6ccb8a
2014-04-15 13:43:13 +02:00
Thomas Arnhold
8d202fa72f typo: paramter -> parameter 2014-04-14 12:32:54 +02:00
Stephan Bergmann
cc725643fd Clean up function declarations and some unused functions
Change-Id: I63c4c61847fea4500b667a5ea9f2b32207692033
2014-04-09 10:12:02 +02:00
Noel Grandin
1eee88dd6b basic: sal_Bool->bool
Change-Id: I1c084ca86c0b1308eb2fc1451ba34d2e702c6a7f
2014-04-07 13:53:50 +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
567ef6d578 Second batch of adding SAL_OVERRIDE to overriding function declarations
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.

Change-Id: Ie656f9d653fc716f72ac175925272696d509038f
2014-03-27 18:12:18 +01:00
Noel Grandin
f288d7dcbd basic: sal_Bool->bool
Change-Id: Id4952b6f97f9e8f917fea5651dee91499d109e48
2014-03-27 13:45:08 +02:00
Noel Grandin
96710f8e46 convert OUString::match to OUString::endsWith
Convert code like:
    rTxt.match( "---", rTxt.getLength()-3 )
to:
   rTxt.endsWith( "---" )

Change-Id: Iada74c5e714f7234f25b326526843a36255d5599
2014-03-19 08:55:21 +02:00
Stephan Bergmann
25cedf1dc7 Introduce com.sun.star.beans.theIntrospection singleton
...deprecating com.sun.star.beans.Introspection (single-instance) service.

Change-Id: Ica2e3a3541c7dcb1aab79222c5abf40d6988c882
2014-03-07 10:33:07 +01: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
6a38eace8c Remove visual noise from basic
Change-Id: I10865b94f67de39e9dbcbe71ede42aa94d81db61
Reviewed-on: https://gerrit.libreoffice.org/8234
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-25 21:09:17 +00: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
12f1faf7bf svl: sal_Bool -> bool
Change-Id: Ic31455a1f5ffffa35d4fdde901dd70734207b6f4
2014-02-20 08:17:00 +01:00
Stephan Bergmann
bd20500cf3 Simplify access to theCoreReflection singleton
Change-Id: I9901991a320b87895230a92095c9c7d3109380a6
2014-02-07 12:03:03 +01:00
Noel Grandin
d366c9b20e remove unnecessary sal_Unicode casts in various places
Change-Id: Ibf04062ca86ed866202d748c3b62a210d30ed6ec
2013-11-14 08:17:32 +02:00
Norbert Thiebaud
8b308d510e basic: include <> for external includes
Change-Id: I4715bbe853d60ef15f20a4d2441c688003ca568e
2013-11-11 22:37:24 -06:00
Noel Grandin
e9c4ee996d remove unnecessary use of OUString constructor in BASIC module
Change-Id: Iee86ce9200285647d5031cb2f89266a52704dd44
2013-11-11 11:21:25 +02:00
Caolán McNamara
1ce668649b CID#738564 uninitialized member
Change-Id: I35a4d3d412b1848fe3ef8aed600471fc1c8a61d2
2013-10-07 09:16:26 +01:00
Takeshi Abe
d57010faf1 sal_Bool to bool
Change-Id: Ie8e35c4342db6e2dc35fca33cee7b4d71cfcb732
2013-10-07 17:08:18 +09:00
Takeshi Abe
ea1e3b77d4 sal_Bool to bool
Change-Id: I16ddbcf100e21d6c05fccbe24faca2932a605902
2013-10-02 10:00:44 +09:00
Lionel Elie Mamane
b31f33bcc1 Easier conversion between Basic Date and UNO Date/Time
Utility functions to convert between Basic Date type
and the representations of Date and Time in UNO, namely:
 - com.sun.star.util.Date
 - com.sun.star.util.Time
 - com.sun.star.util.DateTime

Name of new functions:
 - CDateToUnoDate
 - CDateFromUnoDate
 - CDateToUnoTime
 - CDateFromUnoTime
 - CDateToUnoDateTime
 - CDateFromUnoDateTime

Change-Id: I2b971df20df1c0351d071023e042169b548894f1
Reviewed-on: https://gerrit.libreoffice.org/5897
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2013-09-11 20:40:19 +00:00
Noel Power
e70a436fe3 fix runtime error when using extended types
note: using VBA objects with the code completion is not possible at
the moment. Unfortunately there is some hard coded hacks for flattening
the namespace used by checkUnoObject.

Change-Id: Ic3a3149f41a6959943e71fa7ac22ff4dab7f30a1
2013-09-02 18:16:48 +02:00
Stephan Bergmann
4b2c05d4f7 Simplify iteration over Sequence
Change-Id: I84b79c6cc11a5cd506e22caf294423a3c0b953f0
2013-08-19 14:15:20 +02:00
Michael Stahl
91f3d77b98 tweak comment translations
ede5f05c fb3a1bb9 5e04331f fd6089b9 66a1d406

Change-Id: I5077ce5f6182f9193cebaaf63190450d375679dd
2013-08-08 23:25:25 +02:00
Thomas Arnhold
955ebe83a8 String to OUString and cleanup
Change-Id: Idc18c1a6a64edea3399c8747ec0f096a2f964b68
2013-06-29 16:23:24 +02:00
Noel Grandin
8bf8a2f349 fdo#46808, Convert script::InvocationAdapterFactory to new style
Change-Id: I2fe24c863f4c43471f46032ed15fcd5b98863fc1
2013-05-14 13:39:29 +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
Noel Power
c90373f98e detect follow-on default member of default member object bnc#809017
Change-Id: I366c049fc342240081957b81d2f28bfcf8d4e331
2013-03-15 17:24:12 +00:00
Thomas Arnhold
8035a3af26 some further OUString cleanup
Change-Id: I13eb94092e29ececc9fbf494074acde5f893b605
2013-03-08 04:51:28 +01:00
Thomas Arnhold
f5ca04caca Related to fdo#60724: correct spelling
Using the autocorrect list of LibreOffice
extras/source/autotext/lang/en-US/acor/DocumentList.xml

Change-Id: I8b93969bc0742c2e95b8b7db3c4c37691e8d3657
Script: http://pastebin.ca/2327716
2013-03-03 17:14:16 +01:00
Julien Nabet
94477cb5fb Fix typo accessable/accessible
Change-Id: I2f6d00a6361243a52a593acaaf2bf624d8a2730e
2013-02-23 17:29:22 +01:00
Noel Power
6865445a5e fix basic access to nested uno structures fdo#60117
Although basic might appear to correctly change nested struct elements
fdo#60117 shows that basic can be fooled ( and even the watch(ed) variable
in the debugger shows the expected values ). The problem stems from the
fact that the uno object held by basic isn't infact modified when changed
via the introspection uno service.

Additionally pimp the existing tests to check the actual uno struct to see
if the changes made are *really* reflected in the object

Change-Id: Iff007e17df87148ea81e69d3567c8cf9857fdcaa
2013-02-11 12:23:38 +00:00
Marcos Paulo de Souza
d905daa0d0 fdo#57950: One more chained append in basic
Change-Id: I179b5bfd1d85152a53bb821ab9eeb78efb8a6083
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/1516
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
2013-01-03 17:08:55 +00:00