summaryrefslogtreecommitdiff
path: root/connectivity
AgeCommit message (Collapse)Author
2022-01-14connectivity: can avoid copying hereMiklos Vajna
aTableNames is not changed till we hold a reference to that name. Change-Id: I8a06b5bead101cba4e3293f6c29a849e7a9d0f6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128396 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-01-13Recheck modules [a-c]* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I74a3c3a67c3639376e2251c3eb917fa4139dfbd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127808 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-01-12gbuild: build static LO / link static executablesJan-Marek Glogowski
This allows to build a complete static LibreOffice on Linux, except for linked externals. Since LO's static build implies disabled dynamic loading, one must select one VCL backend to be compiled in. See the (large) comment in solenv/gbuild/static.mk trying to explain, why this implementation was chosen (spoiler: seems there is no other way) and what is actually implemented. This will collect all libraries, statics and externals of executables. If the executable uses components, it will get linked to all static components. While it works with any Executable, it just makes sense for soffice.bin, because the static component map sucks every dependency in, bloating most other binaries. In theory on could generate the dependencies based on the list of used components (see gb_CppunitTest_use_components), then generate a specific static constructor map, directly include it in the exe's cxx code and then link the minimal dependencies. The static LO should build on Linux with: --enable-customtarget-components --disable-dynamic-loading Tested VCL plugin config is: --disable-gtk3 --disable-gen --enable-qt5 The partial build support is split into a 2nd patch. Change-Id: Iafc95752fae9e88095f54a21f1e30a4f080815e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126790 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-01-11Mysql/MariaDB: add column(s) + table(s) (almost) skeleton partJulien Nabet
Change-Id: I9447d7220faeb7a8147e649f0cca57ae15d3e9aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128301 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-11Mysql/MariaDB: add catalog+indexes+keys+user(s) skeleton partJulien Nabet
+ sort objects in Library_mysqlc.mk Change-Id: Ide8ea46424b034c109670ee5514b0afebfa376aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128176 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-10use less SvStream::Flush()Noel Grandin
Flush() turns into a sync() on the device, which is pretty slow. Most of the time all we actually want to do is to flush the internal buffers from the SvStream. So expose the FlushBuffer method and use that where possible. And also means we don't need the mbDontFlushOnClose flag on SvStream any more. Change-Id: Ibe089b88b325f0fdc565200a97ce72cd26b7fcfb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128214 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-07Mysql/MariaDb direct connector: don't show system schemasJulien Nabet
Let's do like MYSQL JDBC where no system schemas appear and let's remove: - information_schema - performance_schema - mysql Remove all the crufts about information_schema then. Also, Mysql 5.1 has been released in 2008 and 5.0 beta was in 2005 (no production date indicated in Wikipedia for 5.0) So we can consider there's no need in 2022 to test if Mysql > 49999 Change-Id: I49715bb5aa21681b687bab0e75603e4bd0c422de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128062 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-04tdf#146432: fix crash with REGEXP_REPLACE() executed in query editor to MariaDBJulien Nabet
See bt here: https://bugs.documentfoundation.org/attachment.cgi?id=177292 Noticing: warn:legacy.osl:7697:7697:connectivity/source/drivers/mysqlc/mysqlc_general.cxx:188: mysqlToOOOType: unhandled case, falling back to VARCHAR I found REGEXP_REPLACE returned a MYSQL_TYPE_LONG_BLOB and some locations should be taught about it. Also, let's also deal with MYSQL_TYPE_TINY_BLOB and MYSQL_TYPE_MEDIUM_BLOB Change-Id: Ib7fd6ef747ce1b1851c788d2bb5a1d4ec673aee1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127919 Reviewed-by: Lionel Mamane <lionel@mamane.lu> Tested-by: Jenkins
2021-12-31tdf#134982: use the right protocol for Mysql/MariadbKrzysztof Hałasa
Thank you Krzysztof Hałasa for the patch! Change-Id: Ib7532a716b7e0fa73f309e0a4f9af9e663e0d3df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127673 Reviewed-by: Lionel Mamane <lionel@mamane.lu> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Jenkins
2021-12-30tdf#146471: Firebird: impossible to delete an external tableJulien Nabet
See https://bugs.documentfoundation.org/show_bug.cgi?id=146471#c1 for full explanations Change-Id: Ie75669cf951429654ff8e6c28508b9fee2ee03bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127715 Tested-by: Jenkins Reviewed-by: Lionel Mamane <lionel@mamane.lu> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-12-28Drop FIREBIRD_SQL_DIALECT constant and use SQL_DIALECT_CURRENTJulien Nabet
Change-Id: I6731ad4c49066b197ffc5b4e5d2c482bd7ca169e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127615 Reviewed-by: Lionel Mamane <lionel@mamane.lu> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2021-12-27tdf#130595: Parameter query with :parameter IS NULL doesn't workJulien Nabet
Problematic SQL here: SELECT * FROM "Table1" WHERE "Name" = :name OR :name IS NULL Firebird considers there are 2 parameters. When providing an empty string, no pb, OPreparedStatement::setNull is called which is ok for both parameters When providing a non empty string, we go to OPreparedStatement::setString. For first param no pb but for second param, sql type is SQL_NULL so it must be taken into account See https://www.firebirdsql.org/file/documentation/html/en/refdocs/fblangref25/firebird-25-language-reference.html#fblangref25-datatypes-special-sqlnull for full details Change-Id: I80dff259d85957e8547c098e4c48b642cce26804 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127593 Reviewed-by: Lionel Mamane <lionel@mamane.lu> Tested-by: Jenkins
2021-12-27Related tdf#130595: SQL_NULL means pVar->sqldata = nullptrJulien Nabet
Fix this assertion: 0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49 1 0x00007fcc7f2b2536 in __GI_abort () at abort.c:79 2 0x00007fcc7f2b241f in __assert_fail_base (fmt=0x7fcc7f418998 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x7fcc614a5de7 "false", file=0x7fcc614b3542 "/home/julien/lo/libreoffice/connectivity/source/drivers/firebird/Util.cxx", line=346, function=<optimized out>) at assert.c:92 3 0x00007fcc7f2c1212 in __GI___assert_fail (assertion=0x7fcc614a5de7 "false", file=0x7fcc614b3542 "/home/julien/lo/libreoffice/connectivity/source/drivers/firebird/Util.cxx", line=346, function=0x7fcc614b3865 "void connectivity::firebird::mallocSQLVAR(XSQLDA *)") at assert.c:101 4 0x00007fcc6149c715 in connectivity::firebird::mallocSQLVAR(XSQLDA*) (pSqlda=0x5bca950) at connectivity/source/drivers/firebird/Util.cxx:346 5 0x00007fcc61470722 in connectivity::firebird::OPreparedStatement::ensurePrepared() (this=0x5bc6a10) at connectivity/source/drivers/firebird/PreparedStatement.cxx:110 6 0x00007fcc614714df in connectivity::firebird::OPreparedStatement::getMetaData() (this=0x5bc6a10) at connectivity/source/drivers/firebird/PreparedStatement.cxx:147 7 0x00007fcc6147165d in non-virtual thunk to connectivity::firebird::OPreparedStatement::getMetaData() () at connectivity/source/drivers/firebird/PreparedStatement.cxx:154 8 0x00007fcc66694776 in dbaccess::OPreparedStatement::getMetaData() (this=0x5bc6cc0) at dbaccess/source/core/api/preparedstatement.cxx:178 9 0x00007fcc6669480d in non-virtual thunk to dbaccess::OPreparedStatement::getMetaData() () at dbaccess/source/core/api/preparedstatement.cxx:179 10 0x00007fcc667711bd in dbaccess::OSingleSelectQueryComposer::getColumns() (this=0x5bb99f0) at dbaccess/source/core/api/SingleSelectQueryComposer.cxx:824 Change-Id: I285c9bcd0b1fd059994d339ae4d419dec516f220 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127551 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-12-26can use OUStringLiteral hereNoel Grandin
Change-Id: I1e71a35c2ce6bc7ef3081054e51494411d9a29ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127491 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-25oss-fuzz: fix some compiler warningsJan-Marek Glogowski
Some unused functions and variables and many missing HAVE_FEATURE_NSS warnings, because the native-code.py stubs were missing the config_crypto.h header. Change-Id: I88ff7d8f96e7382027a21f205db982fd797bd6af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127392 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-21Fix typos in mdrivermanager.cxx (connectivity)Julien Nabet
Change-Id: Ib5c115faf0dcff61be806b538c4f93bc16b9928b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127230 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-12-21loplugin:flatten in canvas..cuiNoel Grandin
Change-Id: I208767eaa60d913fe2882403f1f9351eb08256f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127224 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-21Use sal::systools::COMReference in connectivity/adoMike Kaganski
Change-Id: Ic3c59f70cf0e1ed0020bf4f11d7dee14c69f2119 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127189 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-19Merge getColumnRows in getColumns (evoab2/OEvoabDatabaseMetaData)Julien Nabet
Change-Id: Ia8177290b604413d9b4d5c0d703719b502277492 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127093 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-12-19use more cppu::BaseMutexNoel Grandin
Change-Id: Ida8eb69bb90a2ce53a9a783595b1dc0b0c9f334c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127076 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-19use more cppu::BaseMutexNoel Grandin
Change-Id: Iddd7438161ead93b27cf8e8058ca5b1eae3d8001 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-18tdf#146295: fix Base linked to txt or csv files crashes on filter dialogJulien Nabet
Regression from e01786898406130aa81eadc32f7bc2fad65c5344 author Julien Nabet <serval2412@yahoo.fr> 2021-05-14 18:46:57 +0200 committer Julien Nabet <serval2412@yahoo.fr> 2021-05-14 23:09:11 +0200 commit e01786898406130aa81eadc32f7bc2fad65c5344 (patch) tree 6852a41ac21a081114f51f5c0272249eb5f962d6 parent be96aa21aed3069775609780566541b3631cbbe1 (diff) Directly initialize vector in connectivity (part 3) Change-Id: Ib4097b3425e07de73abbc47ffefebb06b1458308 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127086 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-12-17loplugin:unusedvariablecheck improveNoel Grandin
to find unused smart pointer variables Change-Id: I200bdd8949032a0e061de61f7903a156651793e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127006 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-16tdf#38235: fix sort failure for EvolutionJulien Nabet
Several issues to deal with: 1) The initial pb: "Error setting the source criteria. The column XXX must be visible as a column. SQL status: 01000, Error code 1000." => OEvoabResultSetMetaData::getColumnLabel was returning the nickname of the column with g_param_spec_get_nick we just want the column name to display and to use 2) SQL parsing in OCommonStatement::orderByAnalysis 2 "sub-issues": a) ENSURE_OR_THROW was testing SQL_ISRULE( pAscDesc, opt_asc_desc ) opt_asc_desc is defined in connectivity/source/parse/sqlbison.y with: opt_asc_desc: {$$ = SQL_NEW_RULE;} | SQL_TOKEN_ASC | SQL_TOKEN_DESC ; not sure if it should be kept but for DESC I had to use this: SQL_ISTOKEN(pAscDesc, DESC) b) Retrieve of ascending By default ascending is at true but then we tested the node with: if ( ( pAscDesc->count() == 1 ) && SQL_ISTOKEN( pAscDesc->getChild( 0 ), DESC ) But when we use DESC, it's directly a TOKEN so just this should suffice: bool bAscending = !SQL_ISTOKEN(pAscDesc, DESC); 3) CompareContacts wasn't taking into account bAscending since we use comparison function for g_slist_sort_with_data, I only used int nOrder = 1; // if descending sort, reverse order if (!sortCol.bAscending) nOrder = -1; and multiply the result with this to have the ad hoc order Change-Id: I3c360a5ef9cf0dc737a7ce4a138d2d2586abdca9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126698 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-12-16tdf#137101: fix e_book_client_connect_direct_sync signature in EvolutionJulien Nabet
since it changed in 2015, see all details from tdf#137101 Thank you to krumelmonster for having spotted this! + some cleanup to remove all eds_check_version calls and dependencies Change-Id: Iaf2437f8f5c04ab9674a380dac1dfb16ec8c7201 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126898 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-11Fix regression in connectivity/evoab2Julien Nabet
Regression from 46d3e84d7a131f7c72cb536ab2f314cb55ffc155 Directly initialize vector in connectivity (part 2) Pinpointed thanks to this log: warn:dbaccess:612118:612118:dbaccess/source/core/dataaccess/connection.cxx:344: DBG_UNHANDLED_EXCEPTION in OConnection exception: com.sun.star.sdbc.SQLException message: Invalid descriptor index. /home/julien/lo/libreoffice/connectivity/source/commontools/dbexception.cxx:365 SQLState: 07009 ErrorCode: 0 wrapped: void message: /home/julien/lo/libreoffice/tools/source/debug/debug.cxx:104 when launching Base then connecting to Evolution local. Change-Id: Id4cb0fc322b0df24ed2b2d89a5595f4841db1845 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126664 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-12-10Generally determine Rdb content from gb_*_set_componentfile callsStephan Bergmann
...instead of by listing the content somewhat redundantly in the Rdb_*.mk files, to avoid duplication of logic for components that are only built conditionally (and thus should only be included conditionally in the corresponding Rdb). To achieve that, add an "rdb" parameter to gb_ComponentTarget_ComponentTarget (and to the gb_*_set_componentfile macros that internally call gb_ComponentTarget_ComponentTarget), which is used to make the appropriate gb_Rdb_add_component call internally from within gb_ComponentTarget_ComponentTarget. (As a special case, gb_CppunitTest_set_componentfile shall not call gb_Rdb_add_component, as that has already been done by the corresponding gb_Library_set_componentfile call, so allow the gb_ComponentTarget_ComponentTarget "rdb" parameter to be empty to support that special case.) Most Rdb_*.mk files are thus mostly empty now. One exception is i18npool/Rdb_saxparser.mk, which duplicates some of the Rdb_services content as needed during the build in CustomTarget_i18npool/localedata. 1c9a40299d328c78c035ca63ccdf22c5c669a03b "gbuild: create services.rdb from built components" had already tried to do something similar (in addition to other things) under a new --enable-services-rdb-from-build option. However, that approach had four drawbacks that this approach here addresses (and which thus partly reverts 1c9a40299d328c78c035ca63ccdf22c5c669a03b): 1 Rdb_services shall not contain the component files of all libraries that are built. While that commit filtered out the component files that go into Rdb_ure/services (ure/Rdb_ure.mk), it failed to filter out the component files that go into others like Rdb_postgresql-sdbc (connectivity/Rdb_postgresql-sdbc.mk). 2 The code added by that commit to Makefile.gbuild codified the knowledge that there is an Rdb_services, which is brittle. 3 The code added by that commit to solenv/gbuild/Rdb.mk codified the knowledge (for gb_Rdb__URECOMPONENTS) that there is an Rdb_ure/services, which is brittle. 4 Introducing an --enable-services-rdb-from-build option needlessly provided two different ways how the content of Rdb_services is assembled. The changes done here would leave --enable-services-rdb-from-build as a misnomer, as it no longer controls how Rdb_services is assembled. I thus renamed it to --enable-customtarget-components, as that is apparently what it still does now. Change-Id: Ia5e8df4b640146c77421fcec6daa11a9cd260265 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126577 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-07loplugin:unusedfieldsNoel Grandin
Change-Id: Id39c3f484a364fb5163444febe99aee79daf1a76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126418 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-30fix mysqlc test after Sequence::operator[] changeNoel Grandin
Change-Id: I247aeceaa4100295beec8107385d2ae28765dde8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126054 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-27use more OInterfaceContainerHelper3 in connectivity::sdbcx::OCollectionNoel Grandin
Change-Id: Idf3313b374eae05c4a65c101e1e7ce91c743b420 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125928 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-27use more OInterfaceContainerHelper3 in dbtools::ParameterManagerNoel Grandin
Change-Id: Ice607fb67468484e98c94e4f41c3e249639e1edb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125922 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-25stldebug assert in bad sort of postgresql schemasCaolán McNamara
/usr/bin/../lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/debug/safe_iterator.h:305: In function: __gnu_debug::_Safe_iterator::reference __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<rtl::OUString *, std::__cxx1998::vector<rtl::OUString>>, std::vector<rtl::OUString>, std::forward_iterator_tag>::operator*() const [_Iterator = __gnu_cxx::__normal_iterator<rtl::OUString *, std::__cxx1998::vector<rtl::OUString>>, _Sequence = std::vector<rtl::OUString>, _Category = std::forward_iterator_tag] Error: attempt to dereference a past-the-end iterator. Objects involved in the operation: iterator "this" @ 0x0x7fffffff75a8 { type = __gnu_cxx::__normal_iterator<rtl::OUString*, std::__cxx1998::vector<rtl::OUString, std::allocator<rtl::OUString> > > (mutable iterator); state = past-the-end; references sequence with type 'std::__debug::vector<rtl::OUString, std::allocator<rtl::OUString> >' @ 0x0x7fffffff7d10 } Thread 1 "soffice.bin" received signal SIGABRT, Aborted. a problem since... commit 5cbb6631e6d4c1000bff936712b4bd4aafbe04d5 Date: Fri Mar 4 13:01:57 2016 +0100 pgsql-sdbc: factorise common code Change-Id: I7f7794e93224dfa946a7b5970c458fc3030fab73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125799 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-24loplugin:stringliteraldefine in connectivityNoel Grandin
Change-Id: I6b2528c684fe56a114959a1d26101a882eee2106 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125759 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-23tdf#114441 Change use of sal_uInt32 to sal_Int32Henrik Palomäki
This patch fixes my previous commit. It changes use of sal_uInt32 to sal_Int32 as it suits better here. Change-Id: Ia92e5eee70dbf00009321481e8be8ddd7c9b138e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125737 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-23tdf#114441 Convert use of sal_uLong to sal_uInt32Henrik Palomäki
The suitable type for variable nIndex is determined by knowing that the return type of the detectNumberFormat() is sal_uInt32, and the second parameter for the getNumberFormatType() is also sal_uInt32. Change-Id: I6578eba05f151ee31eb8eb8142d70f8f5c7c702b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125696 Tested-by: Hossein <hossein@libreoffice.org> Reviewed-by: Hossein <hossein@libreoffice.org>
2021-11-23O[U]String::replaceAt overloads that take string_viewNoel Grandin
which results in lots of nice string_view improvements picked up by the plugins Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-23remove ORowSetValue implicit conversion methodsNoel Grandin
in favour of the existing get*() methods. The get*() methods 0 or false or empty in the case of "null", which is exactly the same behaviour as the conversion methods. These implicit conversion methods cause lookup problems when combined with some upcoming OUString changes. And the code looks cleaner this way too, and has less magic when calling methods. Change-Id: Ieb4756bf693e83b996a32667fc1b955f89193496 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125690 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-20tdf#145714: teach "mediumblob" to Mysql/MariaDB part in LOJulien Nabet
also teach about: TINYBLOB + LONGBLOB + TINYTEXT + MEDIUMTEXT + YEAR + BIT Taking a look at libmariadb, I see in libmariadb/mariadb_stmt.c: 535 case MYSQL_TYPE_SHORT: 536 case MYSQL_TYPE_YEAR: 537 int2store(*p, (*(short *)buf)); 538 (*p) += 2; 539 break; 1208 case MYSQL_TYPE_SHORT: 1209 case MYSQL_TYPE_YEAR: 1210 stmt->params[i].buffer_length= 2; 1211 break; 1313 case MYSQL_TYPE_SHORT: 1314 case MYSQL_TYPE_YEAR: 1315 *stmt->bind[i].length= stmt->bind[i].length_value= 2; 1316 break; Change-Id: Id72056429d5d2f2741063ee28b2d2e3c75e378a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125472 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-18tdf#145205: Mysql/MariaDB, display BIT instead of DATE when its a BIT fieldJulien Nabet
Beware, we just want to display the right info here, BIT management in Mysql/MariaDB needs some work There are 2 parts in this patch: 1) - if (sType.equalsIgnoreAsciiCase("bit") || sType.equalsIgnoreAsciiCase("bool") - || sType.equalsIgnoreAsciiCase("boolean")) + if (sType.equalsIgnoreAsciiCase("bit")) + return css::sdbc::DataType::BIT; + if (sType.equalsIgnoreAsciiCase("bool") || sType.equalsIgnoreAsciiCase("boolean")) allows to display BIT instead of DATE when editing the table 2) - return css::sdbc::DataType::VARCHAR; + return css::sdbc::DataType::BIT; allows to show a checkbox instead of a field where you can type anything when opening the table Change-Id: Id50882bfab97cc43a1904bfc6eb7256904732bba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125429 Tested-by: Jenkins Reviewed-by: Lionel Mamane <lionel@mamane.lu>
2021-11-14Replace GET_PARAM in ado/ACallableStatement.cxx (connectivity)Julien Nabet
Change-Id: I01b7992a5e53dff324208353d8a5196bd16ab0ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125194 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-14Replace VISIT_PARAMETER in commontools/parameters.cxx (connectivity)Julien Nabet
Change-Id: I4d6bcac319a318623837994ec7942ea49ffa125a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125195 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-14Replace SYM_MAP in evoab2/EApi.cxx (connectivity)Julien Nabet
Change-Id: I4df5e2db1c94e5cd29b11d960e3f37dfac3b7ac2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125193 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-12Replace REGISTER_PROP in connectivity/evoab2Julien Nabet
Change-Id: Icdadadcaa4c6ee9bdaeb6105a33cf1891279781f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125107 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-02Drop char*-based API from NamedValueCollectionMike Kaganski
Change-Id: I87f339b348580e256a8d65470ad15cbdabf2c9dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124609 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-29Prepare for removal of non-const operator[] from Sequence in connectivityMike Kaganski
Change-Id: If92f9af5e248f4b066359fe043adf221102e8561 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124353 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-25loplugin:indentation (macOS)Stephan Bergmann
Change-Id: I7a180a79dff11816e1504bdd1803102325aa365d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124149 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-20loplugin:indentation check for indent inside blockNoel Grandin
look for places where the statements inside a block are not indented Change-Id: I0cbfa7e0b6fb194b2aff6fa7e070fb907d70ca2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123885 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-19tdf#145203: FIREBIRD cannot create a tableJulien Nabet
Regression from: https://cgit.freedesktop.org/libreoffice/core/commit/?id=1cf57765dd9a66982ecf9cd33687005a70c70c3f 2021-10-08 loplugin:moveparam in connectivity Change-Id: Iec0fa1597e63d42ee3a905bf55eff798b3f46177 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123787 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-19Use MsLangId::getConfiguredSystemLanguage()Eike Rathke
Change-Id: I298f762ac7f3298aa9cb9621ad1f8cae50527b24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123790 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-10-15Simplify vector initialization in connectivityJulien Nabet
Change-Id: I4eb3ca5b1a45e585f076c7e11f616be4614d972a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123662 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>