summaryrefslogtreecommitdiff
path: root/connectivity/source
AgeCommit message (Collapse)Author
2021-04-15loplugin:stringliteralvar look for assignmentsNoel Grandin
to O[U]String from char array literals, we can convert the char literals to O[U]StringLiteral and avoid a runtime allocation Change-Id: I15d8dddb2cd428b90740e39f20daf98e0941aa6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-08lok: remove event listener when disposingHenry Castro
In order to prevent that the event listener holds the object reference count when removed, ensure they are removed when disposing the object. Change-Id: I7cb4cb7d87acfc9610c2498760ade531456fe22e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113493 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2021-04-02Simplify some static variable initializationsMike Kaganski
Change-Id: I6cdd44aa66b9597ccc51fc3fd69b57485ccb3230 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113515 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-27tdf#141115 semi-userfriendly message on UNION query on file driverLionel Elie Mamane
Rather than silently returning only the first (left) part of the UNION, error out. Change-Id: I6ed1eba55ad33f149d9010933a3c7a835fce0451 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113207 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Lionel Mamane <lionel@mamane.lu> Tested-by: Jenkins
2021-03-27tdf#141115: correctly find the ORDER BY clause of a UNIONLionel Elie Mamane
instead of blindly assuming a SELECT is not a UNION, leading to an out-of-bounds array access when it is. Change-Id: I8f904ae65acba8d8ee23b95299058207af68c0ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113189 Reviewed-by: Lionel Mamane <lionel@mamane.lu> Tested-by: Jenkins
2021-03-25fix connectivity buildCaolán McNamara
since... commit a0656ec6fc2b41e65f1b40dbd64f546175e2762f Date: Thu Mar 25 09:53:33 2021 +0300 const OUString -> const OUStringLiteral Mostly automated rewrite Change-Id: Id15273edde05933927378e45baadebc0727d558e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113083 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-25const OUString -> const OUStringLiteralMike Kaganski
Mostly automated rewrite Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-23tdf#124176: Use pragma once instead of include guardsMehmet Sait Gülmez
Change-Id: Ie396c62d7743918c36ee0a2041f26c7a7e70c802 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112945 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-03-23tdf#124176 replace include guards with pragma oncePanos
Change-Id: Iac0caac45130fd7da21ed9e7869abbd288931747 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112975 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-03-23tdf#124176 Use pragma once in connectivityVincent LE GARREC
Change-Id: I4a57cd6dcbc180fe9a378d2713c687a66476ee79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111979 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-03-21fix typo in code: anylizeSQL->analyzeSQLJulien Nabet
Change-Id: Ibee6322c03c6bd03a72bcb66b27077527f5529ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112855 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-03-10Drop 'static_cast<cppu::OWeakObject*>' syntactic noiseMike Kaganski
... a leftover from 96388e5e809a48573970df9b6b2649517a08447f. Change-Id: I909a470612c421472d8bf94f80e3e94ecb51d6e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112257 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-10Drop 'static_cast<cppu::OWeakObject*>' syntactic noiseMike Kaganski
... where the object is created in-place, and its type is known Change-Id: Ifabfcf2f3ad0d60152f14e8d970c1faa42115288 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112256 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-09loplugin:refcounting (clang-cl)Stephan Bergmann
Change-Id: I91189ebd902b70e2fbe42fe8cc09b8677af1a5fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112194 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-03-08loplugin:refcounting (macOS)Stephan Bergmann
Change-Id: Id9c5035933453bad617d1a2f78241e435e42fe91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112168 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-03-05loplugin:refcounting (--enable-evolution2)Stephan Bergmann
Change-Id: I83f16646e5bd7c3814d9d3dd3fa6408c40f96bd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111968 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-03-03loplugin:refcounting (--enable-postgresql-sdbc)Stephan Bergmann
Change-Id: I79a1d05be3a4e7a8e278665ff5863cdc4b182009 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111832 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-03-03loplugin:refcounting (clang-cl)Stephan Bergmann
Change-Id: I400ef428921573ae345de15e94695e98f0b02a92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111813 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-03-03loplugin:referencecasting (clang-cl)Stephan Bergmann
Change-Id: If32c6f6d3618c134cfb2ac89e827491525c34687 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111811 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-03-02loplugin:refcounting (macOS)Stephan Bergmann
Change-Id: Ia68887778e6779cfaee58c88344c748a2b3d4579 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111831 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-26loplugin:refcounting in connectivityNoel
Change-Id: Iee324d84334f60a13615a4d422d480c9c597fdbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111539 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-22loplugin:refcounting in connectivityNoel
Change-Id: Iff2f096e7ee00d9cb29d47462dd7e1963c6b06e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-19loplugin:referencecasting (--enable-evolution2)Stephan Bergmann
Change-Id: I7e4470e0713a69ecbae3aebac2129557bd8a16c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111249 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-18loplugin:referencecasting (macOS)Stephan Bergmann
Change-Id: I99470067a34fab9fbc2ea53d2f8a634240f0d223 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111127 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-18createResulSet -> createResultSetNoel Grandin
Change-Id: If0ca3c8dfaade4764832fe7ccf506a4451795d7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111068 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-17loplugin:referencecasting in connectivityNoel
Change-Id: I4b91c3e4a225323235ea37d77f0f96600bf412be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110969 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-10Remove unneeded breaksAndrea Gelmini
Extending this: https://gerrit.libreoffice.org/c/core/+/110512 Change-Id: If7e6f9c4079c2e0b48e642aa0b140fb4e03996bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110520 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-09loplugin:referencecasting check for Reference::queryNoel
Change-Id: I008d16d933c70df132699872ac4c39a5c1f87b34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110592 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-05restore com.sun.star.mozilla.MozillaBootstrapCaolán McNamara
its used to find mozilla profile dirs for cert-related reasons removed overzealously with... commit ee9ed2192b56c98e5b8ee9890ddb4c533117332a Date: Thu Dec 10 18:39:26 2020 +0100 tdf#138715 remove mork driver Change-Id: I52f1ace5d4aac100c7652dc499ffe9c8312c9474 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110413 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-29loplugin:stringviewparam extend to new..Noel
O[U]StringBuffer methods Change-Id: I0ffbc33d54ae7c98b5652434f3370ee4f819f6f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110090 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-28simplify code, use more subView()Noel
Change-Id: I569c7f34acbdf8451cd5c9acf1abd334637072d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110051 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-26loplugin:passstuffbyrefNoel
Change-Id: I330e0ab6c9955939dad313f9d472f93e39dbd313 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109924 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-24Use ContainerType().swap and avoid local variablesMike Kaganski
Change-Id: I773555180758a97aff37f9bc27de83c355d71521 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109761 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-01-13Fix some warnings for Raspberry pi 4 (part6)Julien Nabet
Change-Id: I1114968f38a5309862723dde9554e3df97309f23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109239 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-01-13loplugin:stringviewparam (clang-cl)Stephan Bergmann
Change-Id: Ie66996f905fcb68ee413171c8727cb42dcb28dbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109178 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-12loplugin:stringview (clang-cl)Stephan Bergmann
Change-Id: I64177842c3f77a5ae43574a18f389b64f61bc868 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109176 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-10tdf#124176 Use pragma once instead of include guardsanirudhS
Change-Id: I609925d09086c764ae0360e08e0d74c8d4b7d484 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109053 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-01-09fix coverity parse errorsCaolán McNamara
Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-08Fix uses of OTools::get/putValue with string argumentsStephan Bergmann
...after 723a2623bd11c51d506873862893ee4009caaab1 "Use string view here". My clang-cl build's > connectivity/source/drivers/ado/AColumn.cxx(164,62): error: implicit conversion of constant &u"Autoincrement"[0] of type 'const char16_t *' to 'bool'; use 'true' instead [loplugin:consttobool] > OTools::putValue(m_aColumn.get_Properties(), u"Autoincrement", getBOOL(rValue)); > ^~~~~~~~~~~~~~~~ > connectivity/source/drivers/ado/AColumn.cxx(239,62): error: implicit conversion of constant &u"Autoincrement"[0] of type 'const char16_t *' to 'bool'; use 'true' instead [loplugin:consttobool] > m_IsAutoIncrement = OTools::getValue(aProps, u"Autoincrement").getBool(); > ^~~~~~~~~~~~~~~~ etc. revealed that those arguments were now silently picking the OLEVariant(bool) overload. Change-Id: I83f0d790591d6be9b84fb6263747085dc7bd94d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108962 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-04loplugin:stringviewparam: operator +=Stephan Bergmann
Change-Id: I30ce1b5bd8fb168da7067c1967c5af2569df2653 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108512 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-26loplugin:stringliteralvar (macOS)Stephan Bergmann
Change-Id: I54bc8d175bbe883b6d390a3120ef38c33b7d36d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108357 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-26New loplugin:stringliteralvarStephan Bergmann
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for details. (Turned some affected variables in included files into inline variables, to avoid GCC warnings about unused variables.) Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-26Remove leftover declarationStephan Bergmann
...after 3c86650aac3900d0cb9602ceba3508136064485d "Fix Windows build of Library_ado" Change-Id: Id7ff77194f6d412dbb1c37f63f3e80c8b877fd78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108319 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-25Fix Windows build of Library_adoStephan Bergmann
...presumably related to --disable-pch and/or latest MSVC 2019 16.8.3 changes? OLEVariant is needed as a complete type in some of the Aolewrap.hxx template code. Change-Id: I0422674ba747c133cda03c540e6d0715f2a398a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108269 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-20tdf#124176 Use #pragma once in connectivitysiddheshpatil777
Change-Id: Icaa8a6e3db0b0754c5adfb3543ebe1a7af831bfb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108021 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-12-18fix buildStephan Bergmann
...after 177792660697f85763b39f455d7ebff0f83084fd "pgsql-sdbc: use libpq's custom free()..." Change-Id: I44f86470707eea850742130caf7ec243d850ad51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107933 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-18pgsql-sdbc: use libpq's custom free()...Lionel Elie Mamane
... for stuff allocated by libpq Their documentation says this is important on Microsoft Windows: It is particularly important that this function, rather than free(), be used on Microsoft Windows. This is because allocating memory in a DLL and releasing it in the application works only if multithreaded/single-threaded, release/debug, and static/dynamic flags are the same for the DLL and the application. Also use const unique_ptr since we don't need the value to survive the scope in any way. Change-Id: If4637ea0cd1c05125d63e2f3d37dbeaf716973f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105967 Tested-by: Lionel Mamane <lionel@mamane.lu> Reviewed-by: Lionel Mamane <lionel@mamane.lu>
2020-12-18pgsql-sdbc small optimisationLionel Elie Mamane
1) use const unique_ptr since we don't need the value to survive the scope in any way. 2) put the custom deleter function (PQconninfoFree) in the ptr class rather than at runtime. Saves one pointer in the ptr class and reduces the ptr class overhead... Change-Id: I914baa0d8ae0426322fd343f5163d09f43c4c41c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105968 Tested-by: Jenkins Reviewed-by: Lionel Mamane <lionel@mamane.lu>
2020-12-15Use string view hereMike Kaganski
Change-Id: I597820083f863ec19f05f4da1aa226f4c67cf258 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107741 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>