Commit Graph

1400 Commits

Author SHA1 Message Date
Caolán McNamara
3cb7db75ac gtk3: native render the comically oversized gtk3 spinbuttons
Change-Id: I3e97200d59a97271617a6e9a88c807a07a33edfe
2015-06-22 15:48:46 +01:00
Caolán McNamara
90134af864 cppcheck: noExplicitConstructor
Change-Id: I913f983bb0f55e05bb5ec8994ee75a7e7d69bd1b
2015-06-22 15:46:13 +01:00
Caolán McNamara
1f116adb7c callcatcher: update unused code
Change-Id: I29b3f1408b814a1424d8bab232e9ac618901b4c2
2015-06-20 14:20:33 +01:00
Noel Grandin
4729774b24 remove unnecessary check for null when calling delete
Idea originally from caolan.
Found using the following command:
find . -name *.cxx | xargs /opt/local/bin/grep -zlP '(?m)if\s*\(\s*\w+\s*\)\s*delete\s+\w+\;'

Change-Id: I3338f4e22193a6dfd6219c8c75835224a3392763
2015-06-15 14:46:41 +02:00
Noel Grandin
81b954718f loplugin:unnecessaryvirtuals
Improve the plugin a little.
Create a python script to process the output.
Run it again.

Change-Id: I05c21d8a21c8f4243af739c412fda0a521f9b5f0
2015-06-09 10:06:57 +02:00
Stephan Bergmann
8538026000 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: If951c1982314c5a045d51bc4fff62a3e2b265e08
2015-06-08 16:24:31 +02:00
Stephan Bergmann
08e278b411 loplugin:implicitboolconversion
Change-Id: Ic0c6487661286efa04452427fc3a64da747c2ce8
2015-05-31 13:55:45 +02:00
Lionel Elie Mamane
d6d19acaca do not try to get bookmark when in invalid position
Change-Id: I64fc14e527af4f0f846bbfae84cf8d1d2914b6b9
2015-05-30 17:32:51 +02:00
Lionel Elie Mamane
b4e6dd8200 handle getParameters being called before execute()
Change-Id: If81e745ee15df3848c6577a9e979672523718daf
2015-05-30 17:32:50 +02:00
Lionel Elie Mamane
8607f8b552 tdf#82591 ORowSetBase::getRow handles insert row correctly
and critically for this bug, modified row, too.

Change-Id: I11c418d8926cabe81fcdb65d7293a4283e566f7a
2015-05-30 17:32:48 +02:00
Noel Grandin
6c1cabe677 loplugin:unnecessarysuperclass, merge IWarningsContainer..
..into WarningsContainer

Change-Id: I682528a4eb1b1298faf12b2d498db65f94800cd5
Reviewed-on: https://gerrit.libreoffice.org/15905
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-29 06:46:40 +00:00
Noel Grandin
add1351e59 loplugin:staticmethods
Change-Id: Ie6867e04156f40cacee275d5bbf3d63ac4965b30
2015-05-05 09:30:39 +02:00
Michael Stahl
7259901b25 dbaccess: log exception messages in ORowSetCache
Change-Id: I1c76d4ce91d1f22d88106918ab139b17f6f017f0
2015-04-29 16:13:10 +02:00
Stephan Bergmann
6cb8d552eb loplugin:simplifybool
Change-Id: I77d80494ab99b4cd70f623798389f8dc35772d8a
2015-04-24 12:36:20 +02:00
Stephan Bergmann
2240118177 Improved loplugin:literaltoboolconversion looking into cond. exprs.
...automatic rewriter fixes

Change-Id: I6b04ca80f08f8a71ff94e309fd52f44d736751ee
2015-04-23 18:39:07 +02:00
Matthew Nicholls
a1a25f4c6c tdf#88710 Cleanup after removing dbtoolsclient
Removes "virtualdbtools" and its implementation under "simpledbt", which are
mostly wrappers around various dbtools functions and classes, previously aiding
the now removed dynamic loading logic.

Removes IDataAccessTools, IDataAccessTypeConversion and IDataAccessToolsFactory
interfaces and their accompanying implementations which are completely unused.

Removes IDataAccessCharSet (implemented by ODataAccessCharSet) and moves the
implementation into a function which replaces ODataAccessCharsetHelper.

Removes ISQLParseNode and ISQLParser and their implementation in
OSimpleParseNode and OSimpleSQLParser, which simply wrap around OSQLParseNode
and OSQLParser respectively. To avoid including "sqlbison.hxx" unnecessarily,
includes to "sqlbison.hxx" are now only used where needed.

Change-Id: Id882dfbf43514d84a1eaffc1f916d627830c8cd6
Reviewed-on: https://gerrit.libreoffice.org/15450
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
2015-04-22 07:25:17 +00: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
373a9b9bb6 loplugin:redundantcast: redundant const_cast followed by implicit upcast
Change-Id: I58297ba336d96358eb0683684bbd763870ef56cb
2015-04-13 12:36:36 +02:00
Stephan Bergmann
cc7ae77764 Replace remaining getCppuType et al with cppu::UnoType
Change-Id: I2d1b59cf13c3944b24ad54dc63e20b83a9c8a015
2015-04-01 08:38:29 +02:00
Michael Stahl
0777231112 V803 decreased performance postfix increment
These are pretty silly anyway, but apparently it complains even about
integer variables which make this rather a waste of time.

Change-Id: I15e847d33d5decd2adcab04e4f1567d3997d28a2
2015-03-13 16:23:26 +01:00
Caolán McNamara
0f46d90621 callcatcher: update unused code
Change-Id: I08e99a019fd2ec16e2c995035e4bcc09678ef92b
2015-02-17 11:44:56 +00:00
Miklos Vajna
671bf2330a dbaccess: use constructor feature for ORowSet
Change-Id: Iabb04fde096e8d0bb92b3d796310354df5985e9a
2015-02-09 08:09:27 +01:00
Stephan Bergmann
86fa2dcbd2 loplugin:deletedspecial
Change-Id: Ia89bfb9f4c51207d591e84bfe5e74cf0e7e8918b
2015-02-07 12:35:58 +01:00
Stephan Bergmann
cead54b6e5 Use vector::data
...in some places where it is obvious that it does not hurt that for an empty
vector the obtained pointer is not necessarily a nullptr.

Change-Id: Id5d66b1559ca8b8955d379bcdbfae6986ef46a51
2015-01-28 17:56:18 +01:00
Noel Grandin
b44cbb26ef new loplugin: change virtual methods to non-virtual
Where we can prove that the virtual method is never overriden.

In the case of pure-virtual methods, we remove the method entirely.
Sometimes this leads to entire methods and fields being
eliminated.

Change-Id: I138ef81c95f115dbd8c023a83cfc7e9d5d6d14ae
2015-01-26 08:42:28 +02:00
Lionel Elie Mamane
3d12bdfb24 when beforeFirst/afterLast, there is no value, so none to notify
Change-Id: I599f8efae98e7cc7f65f47cec7f342c8b3dc8282
Reviewed-on: https://gerrit.libreoffice.org/14177
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2015-01-25 18:18:16 +00:00
Lionel Elie Mamane
294cea0f5b that better be the case
Change-Id: Ic0262292e207146c563b8830243a80104f94f903
Reviewed-on: https://gerrit.libreoffice.org/14176
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2015-01-25 18:17:56 +00:00
Caolán McNamara
db15e9290e coverity#1266514 Useless call
Change-Id: I2a95e2faa7682934cd69264c82ed2618225be2a7
2015-01-25 14:03:56 +00:00
Lionel Elie Mamane
47bd9bd00e RowSet: notify listeners when next() brings us afterLast
Change-Id: I6024352f9d7c68d8075d90b5954ec3ba662a06f0
2015-01-22 13:18:54 +01:00
Lionel Elie Mamane
4a7089ffdf Malarkey, the cache has been positioned by our caller and we do not move it.
Even when called with _bMoved==false, that is when inserting row or when asked to move to the position we are already in.

Change-Id: Icff5a18638f7e850db4678cdf82021f56f135d1f
2015-01-22 13:18:54 +01:00
Lionel Elie Mamane
900d648f8b use enum constant instead of hard-coded integer literal
Change-Id: Ide3f05cc66353787acb33b33340577624f25a8bc
2015-01-22 13:18:53 +01:00
Lionel Elie Mamane
d7c9a1d9d6 fdo#88475 RowSetBase: reposition cache before interrogating it
This partially reverts:

  commit d20232a77565f46fedc0b556f4d50addff4d3559
  Author: Lionel Elie Mamane <lionel@mamane.lu>
  Date:   Thu Dec 6 13:22:06 2012 +0100

      Don't force refresh when higher up code did not request it

      Change-Id: I0f415c96fc05c1d776d14885751aef020c42f4ae

which did not take into account that the cache is shared with the
clones.

Finish the above commit more deeply, that is
more aggressively avoid moving the cache if we don't need to:
when we merely reposition the cache in case another RowSet(Clone)
has moved it, no need to force a move and by that to force a refresh.

Change-Id: I28d62673fdf10ee6507d38bb7c79c08e4b40902f
2015-01-22 13:18:53 +01:00
Stephan Bergmann
c79fe32dad Some more loplugin:cstylecast: dbaccess
Change-Id: Iaa409f0f36df63235b38bf3a02dad22ad0762a26
2015-01-20 09:06:46 +01:00
Stephan Bergmann
17fe6b54cd dbaccess: Use appropriate OUString functions on string constants
Change-Id: I1d63c9123ad985cb3424b0ac0ad30c12e39f8170
2014-12-18 14:12:24 +01:00
Stephan Bergmann
2b86f17f05 dbaccess: Use appropriate OUString functions on string constants
Change-Id: Iea28ad5e1a469830e002471517197365fd6de3ee
2014-12-15 10:11:27 +01:00
Michael Weghorn
c70d907c6b fdo#39440 remove unused variables
This addresses 3 cppcheck "unusedVariable" warnings.

Change-Id: I2bf566458b84f34422cee08a3814ad5b04955e50
Reviewed-on: https://gerrit.libreoffice.org/13460
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-14 12:07:21 +00:00
Stephan Bergmann
147ff66242 Typo "mehtod" -> "method"
Change-Id: I49f3f59c76bd4dd078f7014b6a0450241214db7f
2014-12-08 11:11:43 +01:00
Lionel Elie Mamane
5a96c7cb51 fdo#86852 correctly recognise NULL values in query parameter values dialog
Change-Id: I3c0cf976e0a9fbafe6eee768799a2f48c2ee0ea9
2014-12-01 19:06:01 +01:00
Michael Stahl
15b4ab8d19 cppuhelper: clean up public headers with include-what-you-use
Change-Id: I41ba46831f24b2960a1fe982b74a2b623e682e0b
2014-11-18 18:51:49 +01:00
Brij Mohan Lal Srivastava
d32be3ace8 fdo#86023 - O[U]String needs a 'clear' method
Added clear() method to OString and OUString class, Updated appropriate call-sites.

Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-11-14 09:20:38 +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
Caolán McNamara
79fcf0b4a8 callcatcher: update unused code
Change-Id: Ida4221bfbfe30f7e1abd5c367d8cb8b9edd310bb
2014-11-03 14:48:49 +00:00
Stephan Bergmann
ad9498f8b8 More -Werror,-Wunused-private-field
...detected with a modified trunk Clang with

> Index: lib/Sema/SemaDeclCXX.cpp
> ===================================================================
> --- lib/Sema/SemaDeclCXX.cpp	(revision 219190)
> +++ lib/Sema/SemaDeclCXX.cpp	(working copy)
> @@ -1917,9 +1917,10 @@
>    const Type *T = FD.getType()->getBaseElementTypeUnsafe();
>    // FIXME: Destruction of ObjC lifetime types has side-effects.
>    if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl())
> -    return !RD->isCompleteDefinition() ||
> -           !RD->hasTrivialDefaultConstructor() ||
> -           !RD->hasTrivialDestructor();
> +    return !RD->hasAttr<WarnUnusedAttr>() &&
> +           (!RD->isCompleteDefinition() ||
> +            !RD->hasTrivialDefaultConstructor() ||
> +            !RD->hasTrivialDestructor());
>    return false;
>  }
>
> @@ -3517,9 +3518,11 @@
>    bool addFieldInitializer(CXXCtorInitializer *Init) {
>      AllToInit.push_back(Init);
>
> +#if 0
>      // Check whether this initializer makes the field "used".
>      if (Init->getInit()->HasSideEffects(S.Context))
>        S.UnusedPrivateFields.remove(Init->getAnyMember());
> +#endif
>
>      return false;
>    }

to warn about members of SAL_WARN_UNUSED-annotated class types, and warn about
initializations with side effects (cf.
<http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039602.html>
"-Wunused-private-field distracted by side effects").

Change-Id: I3f3181c4eb8180ca28e1fa3dffc9dbe1002c6628
2014-10-15 15:58:56 +02:00
Lionel Elie Mamane
195674627c fdo#84658 on reexec, cancel modification before resetting IsModification state
Change-Id: I878bff4d36ca1c2dd9474c937b03d0b366a6e911
2014-10-06 12:23:22 +02:00
Noel Grandin
a28e7f7aa9 loplugin: cstylecast
Change-Id: Ie478d1fcfd3b64d7a2128887c216b5e0b4501ab9
2014-10-03 15:20:04 +02:00
Stephan Bergmann
d54a72a408 dbaccess: std::auto_ptr -> std::unique_ptr
Change-Id: I2b27aaf589fcbe4da1680f624a57be7ae62b0dc5
2014-09-25 08:40:12 +02:00
Kay Schenk
32b46b74f2 Resolves: #i121492# Base can not filter by dates
Patch by: hanya
Fixed date filter problems in table view. Now processes old style date format
and "normal" for database as expected.

(cherry picked from commit 79ff7fc76c74a012933230d6f3c37977eccc6398)

Conflicts:
	dbaccess/source/core/api/SingleSelectQueryComposer.cxx

Change-Id: I2ae1b50b9e85ff2c543aaea90894a7edd5bc7524
2014-09-22 10:23:53 +01:00
Julien Nabet
a762204a5d Typos
Change-Id: Icf850c4b7b146a82a5638a3cd88ad02f3171aff3
2014-09-17 21:15:33 +02:00
Stephan Bergmann
b396ae62f7 dbaccess: sal_Bool -> bool
Change-Id: Ifad71823e72be71cbd9f9f58a51f4553ff54e4d4
2014-09-12 16:15:27 +02:00
Caolán McNamara
7a3f09216e coverity#1231674 Uncaught exception
and

coverity#1231675 Uncaught exception

Change-Id: If0907f2048fc5e492d5b8b49388c3bfad542e5f7
2014-08-17 16:39:19 +01:00