summaryrefslogtreecommitdiff
path: root/connectivity
AgeCommit message (Collapse)Author
2017-12-18loplugin:unusedindexMike Kaganski
Change-Id: I256a807dd2a4c81126b5a76f3d472e31b8224146 Reviewed-on: https://gerrit.libreoffice.org/46652 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-15loplugin:salcall (clang-cl)Stephan Bergmann
Change-Id: Idda630320bb5e02e1ea675b3b3786c9ec6ac166b Reviewed-on: https://gerrit.libreoffice.org/46504 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-15loplugin:salcall (macOS)Stephan Bergmann
Change-Id: Ie3454079f405df91280658e62f72b5108dfb7714 Reviewed-on: https://gerrit.libreoffice.org/46473 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-15loplugin:salcall (macOS)Stephan Bergmann
Change-Id: I297ac09358ce948acae9b73e8ed605964520c73b Reviewed-on: https://gerrit.libreoffice.org/46437 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-14No need to keep these whitelisted functions decorated with SAL_CALLStephan Bergmann
The only effect SAL_CALL effectively has on LO-internal code is to change non- static member functions from __thiscall to __cdecl in MSVC (where all other functions are __cdecl by default, anyway). (For 3rd-party code, it could be argued that SAL_CALL is useful on function declarations in the URE stable interface other than non-static member functions, too, in case 3rd-party code uses a compiler switch to change the default calling convention to something other than __cdecl. But loplugin:salcall exempts the URE stable interface, anyway.) One could argue that SAL_CALL, even if today it effectively only affects non- static member functions in MSVC, could be extended in the future to affect more functions on more platforms. However, the current code would already not support that. For example, 3af500580b1c82eabd60335c9ebc458a3f68850c "loplugin:salcall fix functions" changed FrameControl_createInstance in UnoControls/source/base/registercontrols.cxx to no longer be SAL_CALL, even though its address (in ctl_component_getFacrory, in the same file) is passed to cppuhelper::createSingleFactory as an argument of type cppu::ComponentInstantiation, which is a pointer to SAL_CALL function. Change-Id: I3acbf7314a3d7868ed70e35bb5c47bc11a0b7ff6 Reviewed-on: https://gerrit.libreoffice.org/46436 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-11loplugin:salcall fix functionsNoel Grandin
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11loplugin:unnecessaryparen (clang-cl)Stephan Bergmann
Change-Id: I2c5aa4c5c3a100de87d3f873b371dded994e4a7c Reviewed-on: https://gerrit.libreoffice.org/46200 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-09Firebird: check isc_blob_info errorTamas Bunth
Change-Id: I398bf195a8cfebe081fd3034d6c539b02aaf6d73 Reviewed-on: https://gerrit.libreoffice.org/46148 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-09Firebird: Revert not closing cursor,..Tamas Bunth
..but suppress error of closing closed cursor Change-Id: I58f96f02f3f600a089bde361ed3e46a03a4902d4 Reviewed-on: https://gerrit.libreoffice.org/46141 Reviewed-by: Tamás Bunth <btomi96@gmail.com> Tested-by: Tamás Bunth <btomi96@gmail.com>
2017-12-09clean code at setObjectWithInfoTamas Bunth
Change-Id: I8cb4eaebd71d8b06523230954da15d73325ac94b Reviewed-on: https://gerrit.libreoffice.org/46130 Reviewed-by: Tamás Bunth <btomi96@gmail.com> Tested-by: Tamás Bunth <btomi96@gmail.com>
2017-12-09tdf#70425 do not close cursor explicitlyTamas Bunth
A cursor need only be closed in this manner if it was previously opened and associated with stmt_handle by isc_dsql_set_cursor_name() See Interbase API Guide: isc_dsql_free_statement Change-Id: Iadb0dcf83ee58b6196112c44d922528a3f56f7ea Reviewed-on: https://gerrit.libreoffice.org/46132 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2017-12-09tdf#70425 Firebird: accept integers in setDoubleTamas Bunth
Change-Id: I471197a9c60ca28b93be0974956e5e1d90f843ca Reviewed-on: https://gerrit.libreoffice.org/46125 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2017-12-07loplugin:salcall handle static methodsNoel Grandin
Change-Id: Id6820abec4b8ca8bee26d62b333fd30b42a14aec Reviewed-on: https://gerrit.libreoffice.org/46007 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-07loplugin:countusersofdefaultparams in connectivityNoel Grandin
Change-Id: Ia613257f2de1395c6629c1c37026ed48d4b927c8 Reviewed-on: https://gerrit.libreoffice.org/45854 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-06loplugin:salcall handle virtual methodsNoel Grandin
Change-Id: Iab95db31188ea2914a46d63a7ebef3d825e6ec42 Reviewed-on: https://gerrit.libreoffice.org/45851 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-05Replace deprecated std::bin2nd with lambda in connectivityStephan Bergmann
(as std::bind2nd is gone by default at least from recent libc++ in C++17 mode) Change-Id: I344fe128fab0f57a2c5f2dfc8c097e1ab2406508 Reviewed-on: https://gerrit.libreoffice.org/45857 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-05loplugin:unnecessaryparenStephan Bergmann
Change-Id: Ib9eeb7d224b20622bafd96e123feb5aa97abac28 Reviewed-on: https://gerrit.libreoffice.org/45858 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-05Replace deprecated std::mem_fun et al in connectivityStephan Bergmann
(as std::mem_fun_t is gone by default at least from recent libc++ in C++17 mode) Change-Id: I74a7ff92385068cb4de1865921bd7c2509859b63 Reviewed-on: https://gerrit.libreoffice.org/45859 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-05loplugin:salcall fix non-virtual methodsNoel Grandin
first, since those are safer to change than virtual methods Change-Id: Ie3b624019d75ee2b793cee33b3c5f64e994e8bfe Reviewed-on: https://gerrit.libreoffice.org/45798 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-05remove some unused definesNoel Grandin
and move the script to python Change-Id: I97bca04053d9d38b59c74fcf61caafbc2c137cc9 Reviewed-on: https://gerrit.libreoffice.org/45776 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-04new loplugin salcall: remove unnecessary SAL_CALLNoel Grandin
In this first commit, I use the plugin to verify the consistency of our SAL_CALL annotations. The point being to make the next commit more mechanical in nature, purely using the rewriter. There are various chunks of unix-only code that have never had to be compiled by MSVC, hence the inconsistencies. In bridges, I had to inline some typedefs to make the verification code happy, since it cannot see into typedefs. Change-Id: Iec6e274bed857febf7295cfcf5e9f21fe4a34da0 Reviewed-on: https://gerrit.libreoffice.org/45502 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-30loplugin:unnecessaryparen: signed numeric literalsStephan Bergmann
Change-Id: I75c8224452ca9c3711a2ccaca9ecf549fa59cb64 Reviewed-on: https://gerrit.libreoffice.org/45549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-30Disable check for successful file deletion for nowStephan Bergmann
...as it makes JunitTest_dbaccess_complex fail on Windows. Apparently, those files are held open by soffice for whatever reason. Needs further investigation... Change-Id: Id80b6f58288deaa39fc74fe36886e371968f8d82
2017-11-29loplugin:unusedmethodsNoel Grandin
Change-Id: I2efb5c0e5735c179314c6c5de87821cee3b033e1 Reviewed-on: https://gerrit.libreoffice.org/45386 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-27loplugin:unnecessaryparen: Warn about parentheses around literalsStephan Bergmann
...that are not composed of multiple tokens, like ("foo" "bar"). Also don't yet warn about Boolean literals, which are sometimes wrapped in parentheses to silence unreachable-code warnings. To avoid multiple warnings about code like f((0)) switch to generally using a set of ParenExpr to keep track of which occurrences have already been handled. Change-Id: I036a25a92836ec6ab6c56ea848f71bc6d63822bc Reviewed-on: https://gerrit.libreoffice.org/45317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-27loplugin:unnecessaryparen check for (f1()).f2Noel Grandin
Change-Id: I93257b0ddd41c649875124d6d5c5faeaa431bae3 Reviewed-on: https://gerrit.libreoffice.org/45218 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-23Fix an argument for SQLSetDescRec.Damjan Jovanovic
Remove a duplicated and commented T3SQLNativeSql definition. Patch by: me (cherry picked from commit 72c9a57b915e080b4bd27800f30232624172b1c3) Change-Id: I2730ede794f750181075b253f62951d47ec82ddc Reviewed-on: https://gerrit.libreoffice.org/45176 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-23loplugin:useuniqueptr in connectivity/source/drivers/macab/Stephan Bergmann
...which revealed that lcl_CFType.cf should rather be of type CFTypeID (i.e., unsigned long), and required some adaption of for loops to cope with the type differences between old sal_Int32 length vars and new std::vector::size calls. Change-Id: Ic87acbb8b4255627fa976d3615bb319237aa4deb Reviewed-on: https://gerrit.libreoffice.org/45154 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-23loplugin:simplifybool for negation of comparison operatorNoel Grandin
Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791 Reviewed-on: https://gerrit.libreoffice.org/45068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-22drop duplicate methodCaolán McNamara
Change-Id: Idadd0a64e41cd02f5167b275081c3576a6224b12 Reviewed-on: https://gerrit.libreoffice.org/45075 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-20look for =() in loplugin:unnecessaryparenNoel Grandin
Change-Id: I4f9b71ff7767e90987bb40358fc46ed5d1d571d0 Reviewed-on: https://gerrit.libreoffice.org/44944 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-18silence some coverity warningsCaolán McNamara
Change-Id: I5a530e37156b5cd36e8a07ac20851880a46f520d Reviewed-on: https://gerrit.libreoffice.org/44875 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-18Assume thread encoding for ODBC status stringMike Kaganski
OTools::ThrowException uses SQLGetDiagRec to get error message. It's not the caller's responsibility to define the encoding of resulting string. Also, using the default setting of RTL_TEXTENCODING_MS_1252 turns returned localized strings into garbage. To allow correct conversion into Unicode string, let's use current thread encoding, and drop the input encoding parameter. Change-Id: Idb02e3ebb4fc407ce5e658fb2137ea2aa3bc127d Reviewed-on: https://gerrit.libreoffice.org/44877 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-11-16Delete test*.odb filesStephan Bergmann
...that are created in java.io.tmpdir (e.g., /tmp on Linux) by connectivity.tools.HsqlDatabase.createDBDocument() during e.g. JunitTest_dbaccess_complex. This revealed that connectivity.tools.AbstractDatabase.delete() (even if it would have been called by the test) would have been non-effective at deleting the file, as the java.io.File constructor used takes a pathname not a file URL as argument, so the call to java.io.File.delete() would not have deleted the relevant file (and returned false, rather). Change-Id: I268e1d1732ac7a0db9ccde7d4ac4f09aa3811e11 Reviewed-on: https://gerrit.libreoffice.org/44801 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-14Translate German debug stringsJohnny_M
Change-Id: If4da1df3f7889d2b579fcde4fec5ac3c82026555 Reviewed-on: https://gerrit.libreoffice.org/44627 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2017-11-13survive building dbaccess+connectivity with --disable-dynamic-loadingCaolán McNamara
Change-Id: I49387d2b6ec1893bf721e3289f2f620a4ce71fb3 Reviewed-on: https://gerrit.libreoffice.org/44668 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-13Fix typosAndrea Gelmini
Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91 Reviewed-on: https://gerrit.libreoffice.org/44654 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-11-09connectivity: fix loplugin:datamembershadow warning in the Calc driverMiklos Vajna
Change-Id: Idcc6b1734599eec5d9eefbefb8849dc050b6a9d6 Reviewed-on: https://gerrit.libreoffice.org/44522 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-09loplugin:unusedvariable add some more std:: typesNoel Grandin
Change-Id: Ib15931e415990b56367fe3e1c7cf3f22cc4826d5 Reviewed-on: https://gerrit.libreoffice.org/44529 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-07loplugin:finalclasses in connectivityNoel Grandin
Change-Id: I0cd075efad83c0a8d6f05c91201a9aa86649590b Reviewed-on: https://gerrit.libreoffice.org/44386 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-03Move ado_{pre,post}_sys_include.hStephan Bergmann
...to connectivity/source/inc/ado/, as it is included from include files there, which only happens to work because of -I$(dir $(3)) in gb_CObject__command_pattern (in solenv/gbuild/platform/com_MSC_class.mk) and the fact that those include files in connectivity/source/inc/ado/ are in turn only included from .cxx files in connectivity/source/drivers/ado/. Change-Id: I0bbecaeeaac1f94fa86355e391d2826f3e29c440 Reviewed-on: https://gerrit.libreoffice.org/44230 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-01loplugin:constantparam in connectivityNoel Grandin
Change-Id: Ia13d0931bbdf642fe04119ea1112788fb143eba8 Reviewed-on: https://gerrit.libreoffice.org/44110 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-27loplugin:includeform: connectivity (Windows)Stephan Bergmann
Change-Id: I27b865cbb79c9ed9c1b5af9f0666450778ae8335
2017-10-24loplugin:includeform: connectivity (macOS)Stephan Bergmann
Change-Id: Ib87a1dae55f926baffe1cf436fedeab59508d253
2017-10-23loplugin:includeform: connectivityStephan Bergmann
Change-Id: I06596fac09f0568b8bab2e2e235a2b88bcd3fc7a
2017-10-23overload std::hash for OUString and OStringNoel Grandin
no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-16Make include files found through -Iconnectivity/source/incStephan Bergmann
...instead of implicitly next to the including file, in preparation of loplugin:includeform Change-Id: I4272c5e24eb887a36a6f3c296def375956f56499
2017-10-13Do not cast sal_Unicode separator to sal_CharEike Rathke
... living in an ASCII world? Change-Id: I82912924420766734573a10b2e110fef6fcadd1c Reviewed-on: https://gerrit.libreoffice.org/43343 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-10-13Correct copypasta decimal separator as group separatorEike Rathke
Quite certainly the decimal separator wasn't to be obtained twice and used as group separator the second time.. Change-Id: I8fb1a066f7f33f377fc98f917aeadad74c41205b Reviewed-on: https://gerrit.libreoffice.org/43342 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-10-11connectivity writer driver: survive merged cellsMiklos Vajna
Fow now just don't crash on them, instead give empty result for those cells. Change-Id: I9edd231b00fa00af95408a550484da74c98275da Reviewed-on: https://gerrit.libreoffice.org/43319 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>