Commit Graph

291 Commits

Author SHA1 Message Date
Stephan Bergmann
c0bd59c15b loplugin:nullptr (automatic rewrite)
Change-Id: Iefeeb51c2b101c097a8d77a4625f84baf1f2da44
2015-11-10 10:31:20 +01:00
Noel Grandin
c7e36de238 loplugin:stringconstant
Change-Id: I736e0d63ed891aee1582844aff25b9bdacab8db9
2015-11-02 15:04:05 +02:00
Stephan Bergmann
cb85f1c6ab loplugin:defaultparams
Change-Id: I7e232e92cc9d058f93eff9f7249e37ed3a9cd9ac
2015-10-20 11:45:02 +02:00
Stephan Bergmann
5d698f08c9 clang-analyzer-deadcode.DeadStores
nLen was unused ever since 5e1b6f6845 "first
version"

Change-Id: I110ccf9156c4d0c4b47b0fba928d388ba7e06387
2015-10-06 16:33:27 +02:00
Stephan Bergmann
8a13dc598b clang-analyzer-deadcode.DeadStores
...at least since 4695f7d361 "#82018# check for
double column names" removed the commented-out code that would have used it (and
which had been commented out ever since the code got introduced)

Change-Id: I11e9cafb53894ce7cb7ffc031f2d6b047bd3258d
2015-09-08 14:34:24 +02:00
Noel Grandin
8601307838 loplugin: defaultparams
Change-Id: Id0a933d3507bc0f8145afa04effadf8475c8e210
2015-08-14 10:52:46 +02:00
Julien Nabet
6e62d72b93 Remove include stdio (part1)
Change-Id: I364aedbd8870c2bbd3440f144143c503dd7ff2c1
Reviewed-on: https://gerrit.libreoffice.org/15767
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-05-17 14:57:02 +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
54e87df11f Change INetProtocol enumerators to CamelCase
...to avoid clashes with macros and poor warnings about hiding global FILE

Change-Id: I444e8b958f029201b228937e088efabc4b6d3050
2015-04-02 18:33:37 +02:00
Stephan Bergmann
44b3e56bb4 Change INetProtocol to scoped enumeration
...and fix o3tl::enumarray::operator [] const overload

Change-Id: I749b1b9d68686b03a97074253478d9d2d9d32b0b
2015-04-02 16:30:34 +02:00
Stephan Bergmann
17e74bf1a0 Replace remaining getCppuType et al with cppu::UnoType
Change-Id: Id2361bd7b50f4724211661b024583b8a3445500b
2015-04-01 08:36:20 +02:00
Stephan Bergmann
5209884f61 Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: I24dc3a9b16abb1397cdd6a4f6cfafb81cc61d0f9
2015-03-31 13:12:41 +02:00
Michael Stahl
250ef02bd8 connectivity: replace magic numbers with constants from CompareBookmark
Change-Id: Ifcd5766ce10de44f38d5c383cd7dc35b75152e88
2015-02-25 23:58:04 +01:00
Noel Grandin
2f928b2d09 remove NUMBERFORMAT_ constants
.. in favour of just using the underlying constants from
css::util::NumberFormat

Change-Id: I0c6b128b66c91b268f5ae300f9c17c7792df5e99
2015-02-25 10:34:27 +02: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
7f8f277b94 fdo#84938: convert STREAM_ #defines to 'enum class'
Change-Id: Ibbf14c7e9a5c1883c1311d4c86f948f74f8e473e
2015-01-07 11:20:44 +02:00
Stephan Bergmann
ecf24f3032 connectivity: Use appropriate OUString functions on string constants
Change-Id: I9ca72364cd57fd2da0c6f5f704a3fe494c0a1df5
2014-12-18 14:12:24 +01:00
Stephan Bergmann
bca00da686 connectivity: Use appropriate OUString functions on string constants
Change-Id: I10b2ddf9dcc83219fea8eb55783507eed52702e8
2014-12-12 17:51:11 +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
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
Noel Grandin
7d7b289da4 loplugin: cstylecast
Change-Id: I114924d5e0407883b2e77016da3c2e3e55657b21
2014-10-03 15:20:03 +02:00
Noel Grandin
ac10225762 implement --with-system-odbc on windows
Change-Id: I1757b9ce74277b1c11533f41caeafaf9b88658ef
2014-09-26 15:37:27 +02:00
Caolán McNamara
8923103eee coverity#706376 Uncaught exception
Change-Id: Ic18823fd60826c144058df32c27ab25d58664e30
2014-07-21 13:59:34 +01:00
Stephan Bergmann
e50ef195bc New loplugin:stringconcat
Change-Id: Id7c517fb37bc28797c45fc0dde83e866f2aa4aac
2014-07-01 15:45:52 +02:00
Thomas Arnhold
a2db194ea0 connectivity: fix includes
Change-Id: I5d5dc6871789865189c78fe9135e7f8bff829489
2014-06-04 21:18:39 +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
Noel Grandin
7339ab25ee fdo#63690 - replace RTL_CONTEXT_ macros with SAL_INFO
this is a continuation of the above bug, removing SAL_INFO's
that only mark function entry.

Change-Id: Idb0f72481415594e3f8b7a11ad6e4b8835f6fca0
Reviewed-on: https://gerrit.libreoffice.org/9343
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
2014-05-13 18:04:58 +00:00
Stephan Bergmann
fc0f5f6548 Revert "coverity#1202903 Uncaught exception"
This reverts commit 3716833635,
DeploymentException is a RuntimeException.
2014-04-22 15:38:55 +02:00
Caolán McNamara
3716833635 coverity#1202903 Uncaught exception
Change-Id: I2872cf32d9cd3d28a70d02365e2169da5f79ad7b
2014-04-17 18:33:38 +01:00
Caolán McNamara
5a2d9fffad coverity#706314 Uncaught exception
Change-Id: Ib723848550c910f94db2b1c5bc16e5f886e03bed
2014-04-17 18:33:38 +01:00
Noel Grandin
199d333f13 connectivity: sal_Bool->bool
Change-Id: I96371121ce6697f153f4e973e65831ea2265eb56
2014-04-16 11:51:51 +02:00
Michael Stahl
e98e738a82 replace some SvStream seeking with calls to remainingSize()
Change-Id: I2905e98425b9991d6138ab0adc15083d313ca445
2014-04-11 23:08:11 +02:00
Noel Grandin
8728c34662 connectivity: sal_Bool->bool
Change-Id: Iafa52d3643b9313c20c75cf98f6b1ec231bf9d6d
2014-04-01 07:38:09 +02:00
Stephan Bergmann
5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
Norbert Thiebaud
d9cd3dc9aa connectivity: harmonize types relatated to Tell()/Seek()
Change-Id: I032f6d32b151203e62b23bffaf25dbc4aeb5ae8a
Reviewed-on: https://gerrit.libreoffice.org/8217
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-02-25 04:42:28 +00:00
Stephan Bergmann
ad73967e99 Remove unnecessary extractInterface
Change-Id: I4848bf84615274ad5732223a354fb7a6b845d9a8
2014-02-24 08:08:00 +01: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
ead1525417 bool improvements
Change-Id: If35c939adede6a912dee14714a7ceeab84ac977e
2014-01-28 20:24:39 +01:00
Stephan Bergmann
9ed364774c Adapt all (non-extension, SharedLibrary) .components to environment="..."
Change-Id: I56f38bd786f3a026cb2908f28540dc9c4003af83
2013-12-17 11:06:00 +01:00
Lionel Elie Mamane
56ad826194 flat text DB: fix move by bookmark
To test whether the range [a,b( is *before* e,
compare e to b, not to a.

This makes a difference when a==b, which happens for row 0 (header)
when there is no header.

Change-Id: I629b71936f82a468febe0360909264dd80304437
2013-11-30 12:03:20 +01:00
Lionel Elie Mamane
c0285abc4b factorise code
Change-Id: Ifd1829843886b8c58669fd4ccf04bc35bf4a0e10
2013-11-30 12:03:19 +01:00
Caolán McNamara
a556802b52 xub_StrLen->sal_Int32
Change-Id: I4ee33d8c5c564df62ad65cbcaf0d0cb253129fc8
2013-11-13 13:50:37 +00:00
Noel Grandin
ef90021abe convert OUString !compareToAscii to equalsAscii
Convert code like
   if( ! aStr.compareToAscii("XXX") )
to
   if( aStr.equalsAscii("XXX") )
which is both clearer and faster.

Change-Id: I267511bccab52f5225b291acbfa4e388b5a5302b
2013-11-11 12:58:12 +02:00
Noel Grandin
1bdb2b6f06 remove unnecessary use of OUString constructor in CONNECTIVITY module
Change-Id: Ie32d03920d996db2793ead9940fc90668cde03dd
2013-11-11 11:21:25 +02:00
Noel Grandin
296329a926 convert xub_StrLen to sal_Int32
convert for loops using xub_StrLen to use sal_Int32

Change-Id: I5f635ca078966fefe938dbc7e8dea7c8d0d0b554
2013-11-06 08:51:22 +02:00
Tor Lillqvist
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
Marcos Paulo de Souza
2b91dc3ae6 fdo#54938: Adapt connectivity module to use cppu::supportsService
Change-Id: I885b4c7a60ff51d44138c4f8a56a584c38a9804a
Reviewed-on: https://gerrit.libreoffice.org/6172
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2013-10-09 15:03:38 +00:00
Norbert Thiebaud
8529e88518 Cleanup String in connectivity
Change-Id: Ica1cf0ac9e9da9c943e50ba77b1ce4a9dc7f8300
Reviewed-on: https://gerrit.libreoffice.org/4895
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2013-07-19 09:45:01 +00:00
Norbert Thiebaud
710f41b7ae Clean String and sal_Bool in tools
Change-Id: I6a92196f33d7a5278c7dcc426112e9c56d582655
Reviewed-on: https://gerrit.libreoffice.org/4627
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2013-06-30 04:58:49 +00:00
Thomas Arnhold
ba0a57702c remove OUString wrap for string literals
For some functions and all kinds of Exceptions.

CannotConvertException
CloseVetoException
DisposedException
EmptyUndoStackException
ErrorCodeIOException
Exception
GridInvalidDataException
GridInvalidModelException
IOException
IllegalAccessException
IllegalArgumentException
IllegalTypeException
IndexOutOfBoundsException
NoMasterException
NoSuchElementException
NoSupportException
PropertyVetoException
RuntimeException
SAXException
ScannerException
StorageWrappedTargetException
UnsupportedFlavorException
VetoException
WrappedTargetException
ZipIOException
throwGenericSQLException
throwIllegallArgumentException

createInstance
createInstanceWithContext
forName
getByName
getPackageManager
getPropertyValue
getUnpackedValueOrDefault
getValueByName
hasPropertyByName
openKey
setName
setPropertyValue
supportsService

bash command:

for i in `cat list`; do git grep "$i\s*(\s*OUString(\s*\"" -- '*.[hc]xx'
	| cut -d ':' -f1 | sort -u
	| xargs sed -i
		-e "s/\(\<$i\s*(\)\s*OUString(\s*\(\"[^\")\\]*\"\)\s*)\s*/\1\2/g"
		-e "s/\($i.*\)\"+ /\1\" + /g";
done

Change-Id: Iaf8e641b0abf28c082906014f87a183517630535
Reviewed-on: https://gerrit.libreoffice.org/4624
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-06-29 21:52:54 +00:00