summaryrefslogtreecommitdiff
path: root/connectivity
AgeCommit message (Collapse)Author
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-15update pchesCaolán McNamara
Change-Id: I280dea8fe5f346a5555f4bf479896877579d63e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107748 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
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>
2020-12-15loplugin:stringview (clang-cl)Stephan Bergmann
Change-Id: I7920101576f1b5a115bf2af74f18832e0341eb24
2020-12-14Fix typo in codeAndrea Gelmini
Change-Id: Ia1263267e8bfd4ca92a3da199fbc29a386f69c31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107681 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-12-14tdf#124176 Use #pragma once in connectivityDuP-491
Change-Id: Ib817bcd477db276a9554b1b3bdc87cf91c2a6658 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107668 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2020-12-14tdf#138715 remove mork strings and install targetsJan-Marek Glogowski
Hopefully fixes the package build. Regression from commit ee9ed2192b56c98e5b8ee9890ddb4c533117332a ("tdf#138715 remove mork driver"). Change-Id: I0faad65af834e3668c9845eadfe3439ae57b3699 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107692 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-12-13tdf#138715 remove mork driverRene Engelhard
since TB moved to sqlite Change-Id: Ifddf1a6c9783a294ee9ccfac667c7e798674d7a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107574 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-12-11Adapt the remaining OUString functions to std string_viewStephan Bergmann
...for LIBO_INTERNAL_ONLY. These had been missed by 1b43cceaea2084a0489db68cd0113508f34b6643 "Make many OUString functions take std::u16string_view parameters" because they did not match the multi-overload pattern that was addressed there, but they nevertheless benefit from being changed just as well (witness e.g. the various resulting changes from copy() to subView()). This showed a conversion from OStringChar to std::string_view to be missing (while the corresponding conversion form OUStringChar to std::u16string_view was already present). The improvement to loplugin:stringadd became necessary to fix > [CPT] compilerplugins/clang/test/stringadd.cxx > error: 'error' diagnostics expected but not seen: > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd] > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd] > 2 errors generated. Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-09Fix loplugin:stringviewparam handling of comparison operatorsStephan Bergmann
Change-Id: I58456efb9588b544d998ac6a4c27d55457280742 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107510 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-07move various notebookbar widgets into vclCaolán McNamara
and we can drop their factories then Change-Id: I1e261886dd7700710ba628da4bbeeba65efa1531 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107134 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-07loplugin:stringview (macOS)Stephan Bergmann
Change-Id: I4d52c1583a47c948eac9712710da4e71953f73cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107357 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-06tdf#125957: FIREBIRD Datatype Binary(fix)[CHAR] couldn't be filled with contentJulien Nabet
Really use sCharsetName which is xRow->getString(13) trimmed See commit bf662904c4b60e93c6b86e06288d41996eed12a2 Author: Tamas Bunth <tamas.bunth@collabora.co.uk> Date: Sat Dec 16 12:57:43 2017 +0100 tdf#104734 Firebird: Add Binary (fix) type There is no explicit binary type in Firebird. It can be accomplished using the CHAR type with a special character set, which tells the database that it is binary data and there is no collation. (called OCTETS). Because of that, we also need the character set to decide the exact column type. And also refactor some parts of the driver: - Create class to determine internal type from firebird type, subtype, scale and character set. - Use internal type (DataType::XXX) in XDatabaseMetaData::getTypeInfo() indirectly. (We want to return a Firebird type for each internal type, not in the opposite direction. Change-Id: I3c9c764d353eeead5e8c00f1142846725eecce15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107280 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Lionel Mamane <lionel@mamane.lu> Tested-by: Jenkins
2020-12-04update pchesCaolán McNamara
Change-Id: I3e22c2000da03f6f3345353846213203993aa865 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107192 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-01tdf#124176 Use #pragma once in connectivityganeshdevare
Change-Id: I5a25e8b7bdbb4de411d5aa5313d409a4c0beb24b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106839 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2020-12-01OSL_FAIL.*exception -> TOOLS_WARN_EXCEPTIONNoel
Change-Id: I6800e23ead2767d245d5da71d2d40e0f8a6d7e1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106859 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-30loplugin:stringviewparam (Library_evoab)Stephan Bergmann
Change-Id: I0d20cf793df61c4d893ddb2c732118f1d36cfd29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106894 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-30loplugin:stringviewparam (Library_postgresql-sdbc-impl)Stephan Bergmann
Change-Id: I9f37f6abfe7d923f8ca0a2d4fd5b699d7034f9f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106901 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-30loplugin:stringviewparam include comparisons with string literalsNoel
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-27tdf#137745: crash, when deleting tables and changed relationship isn't changedJulien Nabet
bt here: https://bugs.documentfoundation.org/attachment.cgi?id=166782 some explanations here: https://bugs.documentfoundation.org/show_bug.cgi?id=137745#c8 Change-Id: I1d9dc8d2e3ad7e3e36c4687cb9b2c5990f2d2c8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106715 Tested-by: Jenkins Reviewed-by: Lionel Mamane <lionel@mamane.lu>
2020-11-26The Windows oleauto.h SafeArray* functions use LONG for indexingStephan Bergmann
Change-Id: If973cc337e0674462cfe2a15e347881a861a761f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106697 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-25loplugin:stringviewparamStephan Bergmann
Change-Id: Ieddc3cc1913e57f51d270cead97b1eadaa81fc6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106507 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-24loplugin:stringviewparamStephan Bergmann
Change-Id: I6fc8b3b550c113b7b0f807bedbfc0e02b59cd719 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106506 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-24loplugin:stringview (macOS)Stephan Bergmann
Change-Id: I20e4bdefdf8f05bbe1ac547a16e8d5e06e3303eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106501 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-19loplugin:stringview: Flag empty string converted to string viewStephan Bergmann
Change-Id: Idf412dc5f235230512160cb4fb7e1a00baa1cfa7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106085 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-18Related tdf#121886: Firebird Datatype Image(BLOB) is not working properlyJulien Nabet
xBlob->length() returns sal_Int64 not sal_Int32 so deal with it in: - OResultSet::getBytes - ODatabaseMetaData::getColumns and warn if blob is more than SAL_MAX_INT32 also rename xDescriptionBlob into xBlob Change-Id: Ib79930c4c8fb00b1682c9a9530a3dee9b040e7ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106029 Tested-by: Jenkins Reviewed-by: Lionel Mamane <lionel@mamane.lu>
2020-11-16tdf#121886: Firebird Datatype Image(BLOB) is not working properlyJulien Nabet
with Form or Report image controls. Implements getBytes at least when LONGVARBINARY corresponds to a BLOB Change-Id: I7e4e99b537333558d5c3dcd172dc54e73472553b Change-Id: I86c20310235fb4902633fab058066a1f2d62a600 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105899 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-11-13tdf#123936 Formatting files in module connectivity with clang-formatPhilipp Hofer
Change-Id: I2c2f170c19663002637c702e9168c19c067ebbc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105656 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-12New loplugin:stringviewparamStephan Bergmann
...to "Find functions that take rtl::O[U]String parameters that can be generalized to take std::[u16]string_view instead." (Which in turn can avoid costly O[U]String constructions, see e.g. loplugin:stringview and subView.) Some of those functions' call sites, passing plain char string literals, needed to be adapted when converting them. Change-Id: I644ab546d7a0ce9e470ab9b3196e3e60d1e812bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105622 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-11loplugin:stringviewNoel
Add new methods "subView" to O(U)String to return substring views of the underlying data. Add a clang plugin to warn when replacing existing calls to copy() would be better to use subView(). Change-Id: I03a5732431ce60808946f2ce2c923b22845689ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105420 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11convert more long -> tools::LongNoel
found by grepping and changed by hand. Change-Id: I3c720859dba430fde3abc76c6c5cb58269efaf4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105512 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-08tdf#130596 FIREBIRD error in query input param when referred field is SQL_LONGJulien Nabet
In addition, deal too with: - SQL_INT64 - SQL_FLOAT - SQL_BOOLEAN Change-Id: I542fbedcb01f1967a4d5d482cbb2edf7ed3bf757 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105434 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-06tdf#135202: Mysql use openssl libs to be able to use caching_sha2_pwJulien Nabet
Change-Id: I7552b65022b725c6e87fef61478dc6e9c4322559 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105376 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-11-06tdf#42949 Fix new IWYU warnings in directories c*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Iac1e7802dbe1efa01c2befdd10406231788d4fc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105315 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-02Fix regression after aba06f2c3a39f33007a8f4e6e234254f42e01f0dJulien Nabet
It generated requests like: CHAR CHARACTER SET OCTETS (100) instead of: CHAR(100) CHARACTER SET OCTETS Change-Id: If32723a99d1ca40c765d89b527ec633cc17cf72b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105157 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-10-31tdf#121553: Firebird, fix datatypes managementJulien Nabet
In Firebird, BLOB and CLOB are both "BLOB" types but can be distinguished with SUB_TYPE - BINARY for BLOB - TEXT for CLOB ("C" = "Character" -> Text) To deal with this, the enum "BlobSubtype" has been created in connectivity/source/drivers/firebird/Util.hxx it contains: - Blob = 0 - Clob = 1 but also - Image = -9546 This last one is to deal with LONGVARBINARY which doesn't exist in Firebird It has been added with: see https://cgit.freedesktop.org/libreoffice/core/commit/?id=0217031a98508731f15df9d361a6e5b584db5716) When creating a table, Tables::createStandardColumnPart was adding SUB_TYPE part in request part but only when creating table not when altering table. So let's deal with subtypes in the 2 mappings: - ODatabaseMetaData::getTypeInfo from DatabaseMetaData.cxx - ColumnTypeInfo::getColumnTypeName from Utils.cxx and let's remove the SUB_TYPE wrong management part from Tables::createStandardColumnPart Also, BINARY and VARBINARY were wrongly mapped since they should be respectively: - CHAR CHARACTER SET OCTETS - VARCHAR CHARACTER SET OCTETS It also showed that DataType::VARBINARY was missing in ColumnTypeInfo::getColumnTypeName() change from my previous commit see: https://cgit.freedesktop.org/libreoffice/core/commit/?id=5b33b1a6b0f251202e89cef436efd4719c3fc0c4 Change-Id: I5589fd4f781671076f534865cfe9d30943738fd2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105107 Reviewed-by: Lionel Mamane <lionel@mamane.lu> Tested-by: Jenkins
2020-10-29tdf#137801: Firebird fix warn when changing a table having a field type BLOBJulien Nabet
OTableController::alterColumns() from dbaccess/source/ui/tabledesign/TableController.cxx checks if a column changes with: if((nType != pField->GetType() || sTypeName != pField->GetTypeName() || etc See https://opengrok.libreoffice.org/xref/core/dbaccess/source/ui/tabledesign/TableController.cxx?r=585cefd1#1002 So for example for "BLOB" field, LO was comparing "SQL_BLOB" from "sTypeName" with "BLOB" from "pField->GetTypeName()" In the same way, LO was comparing "SQL_LONG" from "sTypeName" with "INTEGER" from "pField->GetTypeName()" or "SQL_VARYING" from "sTypeName" with "VARCHAR" from "pField->GetTypeName()" Change-Id: I3632f3ee5845b4f07d606fddd586951a3deea67f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104979 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-10-21Fix typosAndrea Gelmini
Change-Id: Ia66e31a0ad71dde1a6c1caa911d6083e1fb9eb61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104538 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2020-10-21use tools::Long in comphelper..cuiNoel
Change-Id: I65167999c6049038f8f5d530a0c5cb0552ab0e06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104609 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-19clang-cl: Adapt Windows-specific code to extended loplugin:cstylecastStephan Bergmann
...after 1ebeacb20ad0165e399629fcfd7795ad0da3edf8 "Extend loplugin:cstylecast to certain function-style casts" Change-Id: I99bd383f5b3bee861d442d2e1be6ecd356b78315 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104523 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-14More fixes of uses of now-explicit OUString ctor taking raw sal_Unicode pointerStephan Bergmann
...in Windows-only code, after c927aab29ebfff1ce3ac0b2f27ae343025a9890c "Make the OUString ctors taking raw sal_Unicode pointer/non-const array explicit". Interestingly, these occurrences were accepted by MSVC and only cause errors with clang-cl, so happened to go unnoticed until now. Change-Id: I33e7653e28a21541ef793b4b0750abb6037752db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104314 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-03use more TOOLS_WARN_EXCEPTIONNoel
Change-Id: Id83c478af5d04ad548c7cf4239fe2fb3ee154dc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103861 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>