summaryrefslogtreecommitdiff
path: root/connectivity
AgeCommit message (Collapse)Author
2022-01-27tdf#126960, tdf#131330: FB make views editable+refresh auto after creationJulien Nabet
Change-Id: I78783056659a26cc8139d74eefc225de1a11ca7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129011 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-27Mysql/MariaDB: remove obsolete comment in viewsJulien Nabet
Obsolete after eb69767d7c1bb8e6e780fd9503f08c9d7f5ecb45 Mysql/MariaDB: after creating a view then refresh, make it appear as a view For this, I took example on hsqldb part this time (instead of Firebird which is uncomplete). Also, deleting a brand new created table works now. Of course, there are still pb with schema containing special characters like "`" In fact, the description of the previous commit was wrong since renaming a view still shows the table icon instead of view icon. You must reopen the file so the icon is ok. Change-Id: I2d27107db672e02af74e34a692309844ac310004 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129035 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-25Mysql/MariaDB: after creating a view then refresh, make it appear as a viewJulien Nabet
For this, I took example on hsqldb part this time (instead of Firebird which is uncomplete). Also, deleting a brand new created table works now. Of course, there are still pb with schema containing special characters like "`" Change-Id: I4849f412ed5b3c2f35fbb4caaf06577828cc255a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128943 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-23Mysql/MariaDB: Fix slight bug in Tables::createObject:Julien Nabet
unescape scatalog before converting it in aCatalog In Views, remove connectivity::mysqlc::Views::disposing which seems more cargo cult Remove useless XConnection.hpp in tables (how come I didn't spot it in cleaning process?) Change-Id: I28863dcd93baae923877dbd431b6807226c0a548 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128799 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-22Mysql/MariaDB: Clean mysqlc_keys + remove usingJulien Nabet
Change-Id: Idd7d0ce4ffd18fec95102c41372c83fb7df11168 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128757 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-22Mysql/MariaDB: Clean mysqlc_catalog + remove usingJulien Nabet
Change-Id: Ia9cd6dc9a6389ea1764a85c5f35a65f7d6ac40a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128755 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-22Mysql/MariaDB: Clean mysqlc_column + remove usingJulien Nabet
Change-Id: I10e3cc1fb2b66d7bebbaa33d7eb0b2099658e3af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128759 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-22Mysql/MariaDB: Clean mysqlc_views + remove usingJulien Nabet
Change-Id: I11e1284f9e7589cf4770d723e36c91a84b9b36b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128761 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-22Mysql/MariaDB: Clean mysqlc_view + remove usingJulien Nabet
Change-Id: I6fcb2f2c4346e6293a1e40e6f143ef6e8a68ee8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128760 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-22Mysql/MariaDB: Clean mysqlc_table + remove usingJulien Nabet
Change-Id: Iae0c8d4f12644bee15f78311b86d367f179a4fbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128754 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-22Mysql/MariaDB: Clean mysqlc_columns + remove usingJulien Nabet
Change-Id: I6d29d594ed423efa25f063fd3107718b0f8b5b18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128758 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-22Mysql/MariaDB: Clean mysqlc_indexes + remove usingJulien Nabet
Change-Id: I893dc2d858a90b45b92b2866129527567bdb45e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128756 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-21Mysql/MariaDB: Clean mysqlc_tables + remove usingJulien Nabet
So it allows to make the variable types far more explicit. It may help to differentiate the global mechanism from the specific mechanism Change-Id: I655824b97dbef5eab610d3b1535307b108245f53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128699 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-20Mysql/MariaDB: allow View renamingJulien Nabet
Strange bug the renamed view appears like a table but when closing and reopening the file, the view is indeed there as a view (and not as a table) and renamed Change-Id: I0f26fca66ffb0785ece6223df623845c5e015c93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128707 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2022-01-20Mysql/MariaDB: deal a bit better schema/table with existing functionsJulien Nabet
In "Tables::appendObject": - Simplify code by relying on :dbtools::createSqlCreateTableStatement - Call "createObject" with "sComposedName" instead of awkward "sSchema + "." + rName" and since "createObject" decomposes its parameter with ::dbtools::qualifiedNameComponents we can also get rid of the ugly "CONCAT(TABLE_SCHEMA, '.', TABLE_NAME)" and just use "TABLE_NAME" In ODatabaseMetaData::getTables, we must remove "`" since it seems incompatible with LIKE (or missed how to make it compatible) Also remove useless Keys::dropObject. It seems we can rely on general mechanism since adding/removing primary key works and so remove m_pTable which also become useless bonus: avoid "using namespace dbtools" in mysqlc_views.cxx for 2 uses only Change-Id: Ic24ec84c61dea7d419fc3a05ded6545bf20455bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128579 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-17Mysql/MariaDB: copypasta from Firebird part, no pb for table renaming hereJulien Nabet
Change-Id: I58cb94376e8cf7f06cd825ee7019fb5e9726fc9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128516 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-17Resolves: tdf#146757 Use correct format index keys instead of wrong hackEike Rathke
The hack worked by accident as long as the internal index constants didn't change. Which was the case with commit f7d0c6b42a0a5ec98876006cd5048589219be741 CommitDate: Thu Sep 23 20:28:42 2021 +0200 Sort ZF_STANDARD_NEWEXTENDED_DATE_... into ZF_STANDARD_DATE category convertDateString() Standard + 36 == old ZF_STANDARD_DATE + 6 => DATE_SYS_DDMMYYYY unchanged convertDateTimeString() Standard + 51 == old ZF_STANDARD_DATETIME + 1 => DATETIME_SYS_DDMMYYYY_HHMMSS became wrong nothing (no format assigned, empty DATE slot) convertTimeString() Standard + 41 == old ZF_STANDARD_TIME + 1 => TIME_HHMMSS became wrong ZF_STANDARD_DATE_SYS_DMMMMYYYY (DATE_SYS_DMMMMYYYY) So time 08:00 double 0.33333... was converted to string "30 December 1899" which then numeric was 0. Change-Id: I642e0a977d4e167f78537d20624e86721e518c54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128507 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-01-16Mysql/MariaDB: implement edit VIEW with GUI or SQLJulien Nabet
Delete View works (and the list is updated) Modifying View works But, there are at least 2 things to fix: - adding a view still works but the list isn't updated without manual refresh) - renaming view doesn't work (a popup error message appear) Change-Id: I48ffb322910ca64d51a161424f265de387bdd7ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128483 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-16Firebird: missing space in DROP commandJulien Nabet
It's more to have something clean. Indeed there wasn't impact on Firebird since the table name is surrounded by quotes, eg: DROP TABLE"TableTest" Change-Id: Iad525ccb912347798c6780fd1a5bac12ee85333f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128488 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-15Mysql/MariaDB: make rename table workJulien Nabet
by just letting general mechanism deal with it Change-Id: Iac70137c94419b719266f31222205d651d18b43b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128468 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-15Mysql/MariaDB: related:tdf#81430, fix regression refresh tables/views manuallyJulien Nabet
Change-Id: Ia17a396a8d55e38ac8ad42fab90c50bfaf96809e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128459 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-15Mysql/MariaDB: related:tdf#81430, fix regression create tableJulien Nabet
Change-Id: I8f2983c1d08026ad0cbe796f73e0ff44f917de17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128458 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-15Mysql/MariaDB: related:tdf#81430, fix regression drop tableJulien Nabet
Change-Id: I4b021847cfe855061b862006fbdc4ac36797ee09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128455 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-14Mysql/MariaDB: tdf#81430 make tables editable (with or without PK)Julien Nabet
Change-Id: I7df464107e692817ef80d887a4addea618d6cc72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128356 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-14Firebird: no need to override getTypes in TableJulien Nabet
Change-Id: I0af49eef735f5191f956f9ef9ae8e39c1eb7651a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128375 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
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>