7481 Commits

Author SHA1 Message Date
Lionel Elie Mamane
09224f2316 don't detach from database if we are not attached
this leads to a cascade of uncaught/unexpected exception and thus abort in debug build

Change-Id: If417d2fd2037379e3006f98bc046713729ea4648
2016-06-02 11:53:23 +02:00
Noel Grandin
a52231c785 com::sun::star->css in connectivity
Change-Id: I9489e92dc89a6d83a26ff4f0d9aad26acd28ad9f
Reviewed-on: https://gerrit.libreoffice.org/25537
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30 08:37:11 +00:00
Noel Grandin
77d5491e15 loplugin:unusedmethods
Change-Id: I08e9bb65b2530148b80c67f01d51e594fc698acb
Reviewed-on: https://gerrit.libreoffice.org/25543
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30 06:34:42 +00:00
Noel Grandin
509f0c6a8a loplugin:unusedreturntypes
and clean up the python script

Change-Id: I0a7068153290fbbb60bfeb4c8bda1c24d514500f
Reviewed-on: https://gerrit.libreoffice.org/25439
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-26 07:26:47 +00:00
Noel Grandin
95d20a3799 Revert "remove some manual ref-counting"
until I have a better understanding of the UNO reference
counting.

This reverts commit 111de438ea3e512a541281dc0716cc728ea8d152.
2016-05-24 11:02:42 +02:00
Noel Grandin
111de438ea remove some manual ref-counting
triggered when I noticed a class doing acquire() in the constructor and
then release() in the destructor.

found mostly by
   git grep -n -B5 -e '->release()'

Change-Id: Ie1abeaed75c1f861df185e3bde680272dbadc97f
Reviewed-on: https://gerrit.libreoffice.org/25363
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-24 06:54:06 +00:00
Noel Grandin
d3f21849ec Convert T_DRIVERTYPE to scoped enum
Change-Id: I87cfefbd35df5a8db8bac72f937a5906071b7568
Reviewed-on: https://gerrit.libreoffice.org/25356
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-24 06:53:58 +00:00
Noel Grandin
5785d6022b Convert OKeyType to scoped enum
Change-Id: Ic604991cdc0bf3e6dc5604a4a2b33f62b92f0915
Reviewed-on: https://gerrit.libreoffice.org/25355
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-24 06:53:50 +00:00
Noel Grandin
a887bed580 convert TAscendingOrder to scoped enum
Change-Id: Idd88c08df47c4175702cea0e0a36c6b3e031469f
Reviewed-on: https://gerrit.libreoffice.org/25212
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-22 17:53:29 +00:00
Noel Grandin
8a2149c105 clang-tidy misc-assign-operator-signature
Change-Id: I2953a88d9e2f5923732865ef17615d5928ac5f5f
Reviewed-on: https://gerrit.libreoffice.org/25154
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-20 07:55:30 +00:00
Noel Grandin
2383d557e5 clang-tidy misc-unused-alias-decls
Change-Id: Iabde7a84b9c2758e0d2b2ffe0fb99fcfa51ff124
Reviewed-on: https://gerrit.libreoffice.org/25075
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-19 13:07:28 +00:00
Noel Grandin
2c8fe2e737 update unusedmethods plugin to deal with constructors
and fix the operator< implementations in some of the other
plugins too.

Change-Id: Ie5631e0cdc8d2a994ad2af2533cdb558a6cfc035
Reviewed-on: https://gerrit.libreoffice.org/25057
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-18 10:03:44 +00:00
Noel Grandin
d96c114171 clang-tidy modernize-make-shared
Change-Id: I3fa866bfb3093fc876474a9d9db29fe05dc2af3a
Reviewed-on: https://gerrit.libreoffice.org/25056
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-18 06:58:44 +00:00
Damjan Jovanovic
2049e55f50 Make CSV line parsers consistent with CSV field parsers.
Our CSV field parsing algorithms treats fields starting with a quote
(immediately at the beginning of the row, or after the field delimiter) as
quoted. A quoted field ends at the corresponding closing quote, and any
remaining text between the closing quote and the next field delimeter or end
of line is appended to the text already extracted from the field, but not
processed further. Any quotes in this extra text are taken verbatim - they
do not quote anything.

Our CSV line parsers were big hacks - they essentially read and concatenate
lines until an even number of quote characters is found, and then feed this
through the CSV field parsers.

This patch rewrites the line parsers to work exactly how the field parsers
work. Text such as:
"another" ",something else
is now correctly parsed by both Calc and Base as:
[another "],[something else]
instead of breaking all further parsing.

Patch by: me

(cherry picked from commit 60e93b8b5b6bc4220d66e95cd234a37f3c8f8fd7)

Change-Id: Iced60fad9371e17a2e5640cd7169804b18cf5103
Reviewed-on: https://gerrit.libreoffice.org/24999
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-05-17 12:38:44 +00:00
Caolán McNamara
c880eb6b69 tweak assert and switch to squeak by NDEBUG and nonNDEBUG
Change-Id: I996d69d83acb77e96cb105f65a0243bd5fe80295
2016-05-12 12:32:56 +01:00
Caolán McNamara
92c4c76f55 fall-through->SAL_FALLTHROUGH
Change-Id: I91ed1614162f3b7de13a0fe4ce1af689dce21510
2016-05-12 12:22:16 +01:00
Stephan Bergmann
14cd5182c5 Replace fallthrough comments with new SAL_FALLTHROUGH macro
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in
preparation of enabling -Wimplicit-fallthrough.  (This is only relevant for
C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.)

Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but
that would require adding back in dependencies on boost_headers to many
libraries where we carefully removed any remaining Boost dependencies only
recently.  (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its
future evolution will not have any impact on the stable URE interface.)  C++17
will have a proper [[fallthroug]], eventually removing the need for a macro
altogether.

Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-05-10 16:42:16 +02:00
Stephan Bergmann
0f3ac23d73 Insert explicit "break" when falling through to empty next case
...which itself only contains a "break" (or nothing at all at the end of the
"switch"), as otherwise Clang -Wimplicit-fallthrough would warn about these.

Change-Id: I25c1cf2ca74dfeba7ca0385ca8f1c1bf30bbf91b
2016-05-10 14:57:26 +02:00
Michael Stahl
c06be53493 connectivity: replace boost::remove_reference with std::remove_reference
Change-Id: I7c11fcdaf8065fa86d224ad2fab88b0bcb907255
2016-05-06 23:37:10 +02:00
Noel Grandin
f3d9aab841 teach passstuffbyref plugin to check for..
unnecessarily passing primitives by const ref.

Suggested by Tor Lillqvist

Change-Id: I445e220542969ca3e252581e5953fb01cb2b2be6
Reviewed-on: https://gerrit.libreoffice.org/24672
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-06 06:48:38 +00:00
Stephan Bergmann
ef184fcd88 Fix Windows-only code, part 8
Change-Id: I875c4f4382221baaaedcdfe9513ed75706e8517b
2016-05-04 14:46:15 +02:00
Stephan Bergmann
6cf34974b8 Fix Windows-only code, part 7
Change-Id: Idf118bee77b55004897ae085e124b9cec2ba4237
2016-05-04 14:30:53 +02:00
Stephan Bergmann
c3ec547ca9 Fix Windows-only code, part 6
Change-Id: Ib9a311dd199db81b0be46a7c32c49a10e1b866e7
2016-05-04 14:22:34 +02:00
Stephan Bergmann
6e70103da0 While at it, delete Any functions on sal_Bool*
(at least for LIBO_INTERNAL_ONLY), to help further reduce the occurrences of
sal_Bool across the code base

Change-Id: I70654a0cb56655984c717b7b894f26c9ab47536e
2016-05-04 11:59:23 +02:00
Stephan Bergmann
6e717957b2 NULL -> nullptr
Change-Id: I7e4e36fbff89cb45c01a11dc70c4e6f17fe3bc38
2016-05-03 16:35:30 +02:00
Noel Grandin
43b4903db3 teach stylepolice plugin about ref-counted-pointer naming
Change-Id: I6e91d22fc1826038c05ddb6fc065563c6a250752
Reviewed-on: https://gerrit.libreoffice.org/24459
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-28 09:31:16 +00:00
Stephan Bergmann
6a0a9870a3 -Werror=maybe-uninitialized
Change-Id: Iafa3712d3b600e11b687e7ec5a4ea5a14e87a48b
2016-04-25 17:11:22 +02:00
Stephan Bergmann
ba84f9ce04 Cannot extract Any to sal_uInt32
...which has the same underlying type as sal_Bool

Change-Id: If0548d2830b5924dec06e487c83a468fe8567c87
2016-04-25 16:30:35 +02:00
Noel Grandin
753fa20383 fix Windows build
Change-Id: I35b0d9a1ed6b4929217e75a03132f53844acd5b9
2016-04-25 13:25:29 +02:00
Noel Grandin
d8acc42e5b simplify OPropertyMap init
Change-Id: I4ac86aea7ea391c1c708308b12670005e5eb7d6f
2016-04-25 11:57:07 +02:00
Stephan Bergmann
ff5021927d Avoid reserved identifiers
Change-Id: I4654278f9a718042efde46755ee25e62494e3fb6
2016-04-22 16:34:08 +02:00
Stephan Bergmann
db496668e0 loplugin:salbool
Change-Id: Ibcae25d2476de37842e4a0e670b5951f431195a2
2016-04-22 09:30:55 +02:00
Noel Grandin
e1af7f0c43 clang-tidy modernize-loop-convert in c*
Change-Id: I77d2548f8be97792660761e6156cd24734a95aaf
2016-04-21 11:03:55 +02:00
Noel Grandin
5abc669599 new plugin stylepolice
check for local variables which follow our member field naming
convention, which is highly confusing

Change-Id: Idacedf7145d09843e96a584237b385f7662eea10
2016-04-21 08:32:47 +02:00
Stephan Bergmann
15e410e5af loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I6fada7331ee369c35cbe019db4e730ce56cd1a1f
2016-04-20 17:25:37 +02:00
Jochen Nitschke
a07d5aef3f follow-up for clean-up declarations and includes
small change for commit 150ac9cf05ed9da6a2af5bc3f820280fd853e519
use forward declaration instead of include

Change-Id: Ida9742b49233dc2bd2731e816dd6dc4d5705bb07
Reviewed-on: https://gerrit.libreoffice.org/24222
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-18 20:57:08 +00:00
Jochen Nitschke
385c265065 cppcheck: silence known condition warning in connectivity
Change-Id: Ic1e1b2f7aeb6d4c0a2f59f298df125c12a75b081
Reviewed-on: https://gerrit.libreoffice.org/24197
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-18 15:56:51 +00:00
Stephan Bergmann
7ef97b93d7 loplugin:passstuffbyref
Change-Id: Ie10757b8026e0bdf8be40f41bb04bb02334241f3
2016-04-18 15:30:09 +02:00
Noel Grandin
789055bc2a clang-tidy performance-unnecessary-copy-initialization
probably not much performance benefit, but it sure is good at
identifying leftover intermediate variables from previous
refactorings.

Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657
Reviewed-on: https://gerrit.libreoffice.org/24026
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18 07:37:31 +00:00
Jochen Nitschke
150ac9cf05 clean-up: unused using declarations and includes
Searched source for using declarations.
Checked if those symbols reappear in the source file,
even in comments or dead code but not in #include statements.
If they don't reappear, remove the declaration.
Remove includes whose symbol got removed.

Change-Id: Ibb77163f63c1120070e9518e3dc0a78c6c59fab0
Reviewed-on: https://gerrit.libreoffice.org/24148
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18 07:25:24 +00:00
Stephan Bergmann
c65f6dfb9f loplugin:passstuffbyref
Change-Id: I5c2883dab8045e70467c6d09a75dcb423eecf702
2016-04-15 10:04:38 +02:00
Michael Stahl
49d320c620 tdf#97853 connectivity: fix inverted condition
Also in 2 places IS_TYPE was converted to dynamic_cast instead of a
typeid check; use typeid there too, just for consistency.

(regression from ac9671f94800b647f82b12e718968311a025e87e)

Change-Id: I0df47a845eff660c791304c22c97704589ab999f
2016-04-13 18:40:53 +02:00
Noel Grandin
ef26856260 loplugin:passstuffbyref in connectivity
Change-Id: I751977ecc1b532f72dd5673767471cb0a2cdbd06
2016-04-13 13:27:51 +02:00
Jochen Nitschke
4c7ec9f112 cleanup: remove unused com/sun/star/uno includes
Sequence.h(xx), Any.h(xx) and Type.h(xx)
and remove unused using-declarations from these files.

Add a few missing includes provided by them.

Change-Id: I6b91b6d1fdf9d0496dd546c0aab9bdcc6831a5d4
Reviewed-on: https://gerrit.libreoffice.org/23805
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-12 06:38:26 +00:00
Noel Grandin
f3120c0aa8 clang-tidy performance-unnecessary-value-param in connectivity
Change-Id: Ie84eeac24f22c5e3d3a4f63728a73023d626ccc0
2016-04-11 11:38:57 +02:00
Stephan Bergmann
3c3bd96ce8 No need to wrap SAL_INFO in OSL_DEBUG_LEVEL > 0
Change-Id: Ibb62a7fd5975ca891333f78a6f3c7c50329aa073
2016-04-11 09:26:43 +02:00
Julien Nabet
234f10eb26 Replace OUtoCStr macro
+ use SAL_INFO instead of OSL_TRACE for the impacted lines and surroundings

Change-Id: Icf12f51d68af15527ec7baf79a2d60608d849c97
Reviewed-on: https://gerrit.libreoffice.org/23975
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-04-11 05:59:03 +00:00
Jochen Nitschke
f781997ee1 tdf#94306 replace boost::noncopyable in c...
comphelper, connectivity and cppcanvas.

Replace with C++11 delete copy-constructur
and copy-assignment.
Removed unused boost/noncopyable.hpp includes from
some source files in cppcanvas.

Change-Id: I90780820e21fbfd291ac10c266e7d16616e3a81b
Reviewed-on: https://gerrit.libreoffice.org/23905
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-08 09:58:36 +00:00
Stephan Bergmann
5aadbc15a5 Avoid reserved identifiers
Change-Id: I2217920ced336189a94c0a5d1e3ac0ccd3912881
2016-04-06 15:31:06 +02:00
tymyjan
c20cc7e79b tdf#97499 Fixed containers parameters clearing #4
Change-Id: I7c96181399f4d7e62d4aceca404b22d68f903513
Reviewed-on: https://gerrit.libreoffice.org/23754
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-04 05:49:06 +00:00