summaryrefslogtreecommitdiff
path: root/connectivity
AgeCommit message (Collapse)Author
2023-10-27Various -Werror,-Wvla-cxx-extensionStephan Bergmann
...as enabled by default now in recent Clang 18 trunk Change-Id: I59f9bbdf2ce064f170df01e6d7ec2341884ab5e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158563 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-24loplugin:ostr (macOS)Stephan Bergmann
Change-Id: Id40ce74db71f685cc1c459ea2a5b174f3f8862f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158369 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-23Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]StringStephan Bergmann
...in include files. This is a mix of automatic rewriting in include files and manual fixups (mostly addressing loplugin:redundantfcast) in source files that include those. Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-19Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: connectivityStephan Bergmann
Change-Id: I8220cf4e83a59aa55394d01f29a6af108dcc0619 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158149 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-18loplugin:stringstaticStephan Bergmann
Change-Id: I008c48a315841a2fb642410f210d770bd14bfef5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158121 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-15Repurpose loplugin:stringstatic for O[U]String vars that can be constexprStephan Bergmann
...now that warning about O[U]String vars that could be O[U]StringLiteral is no longer useful Change-Id: I389e72038171f28482049b41f6224257dd11f452 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157992 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-14Use exception ctors, instead of setting members laterMike Kaganski
Avoids overwriting source location in message Change-Id: Ia0290c7dd1ab3ea1357712a27ecab75c7b583dd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157893 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-12Make NC_ constexpr-friendlyStephan Bergmann
...by moving the char8_t -> char reinterpret_cast out of any potential constexpr paths into a new TranslateId::getId. And demonstrate constexpr'ability by making the aCategories var in OApplicationIconControl::Fill (dbaccess/source/ui/app/AppIconControl.cxx) constexpr. (And there might be more such cases that could now be made constexpr.) Change-Id: I0b4e3292faf8f6b901f9b9e934e1aa6bf0f583ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157862 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-07loplugin:ostr: automatic rewriteStephan Bergmann
Change-Id: I2d09b2b83e1b50493ec88d0b2c323a83c0c86395 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157647 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2023-10-04Replace useless throwNoSuchElementException functionJulien Nabet
by its straightforward and short content. Change-Id: Ic847f12923e71addf00b7b16546c8168cf3952f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157552 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2023-09-21Revert "tdf#117118 - Saves data automatically in Firebird embedded database"Juan C. Sanz
This reverts commit 9227fbabe0a33134f56aefdd8ec16024f006a659. Reason for revert: This patch generate a new bug, so I revert it until further investigation Change-Id: I4d613db8cef5363c6b276b8646147443871c312a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157116 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-09-19The name is macOS since 2016Andras Timar
Change-Id: I9f2011e1f9619652b4ed417f135451d8ccfe90bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157033 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2023-09-10using decls should come after #includeNoel Grandin
Change-Id: I058551e87bca42adede860f6f299b0f7ae2af3b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156798 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-01connectiviy: fix to detect column data typeHenry Castro
if Base SQL query: SELECT COUNT("test"."id") from Test If changed to Spanish UI, detect the column type from a neutral context parser. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I1faa8ff8417a0fc4996b289bd2ce0baad52fc00c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156298 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156425 Tested-by: Jenkins
2023-09-01connectivity: add neutral context parserHenry Castro
Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I12b0fe811d141873aaa64af5b6c457051c3356b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156297 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156424 Tested-by: Jenkins
2023-09-01connectivity: fix return column type "DataType::SQLNULL"Henry Castro
The Base SQL query: SELECT COUNT( "Test"."id" ) FROM "Test" And the UI language is set to Spanish, the function "getFunctionReturnType" returns misleading column type. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I2b57d1dfc005711374d7ae0de66b412f4f551d89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156295 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156422 Tested-by: Jenkins
2023-08-31tdf#156816 Base handles scale on SQL type TIME as with TIMESTAMPPierre
Generally import new DataType identification constants from OpenJDK's java.sql.Types Use same values for compatibility. Change-Id: I6e3eb986dc34e8a5e2af75669363177785ff56e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155866 Reviewed-by: Lionel Mamane <lionel@mamane.lu> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2023-08-18tdf#156534 Add Firebird's DATEADD function to SQL parserjucasaca
Add DATEADD function to SQL parser, so the function can be used in Query's Design and can produce editable queries Change-Id: I14f9d88f6a96021b0f9199fd79df18c8f4bb5ea3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155071 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-08-07tdf#104918 Add Firebird's DATEDIFF syntax to the sql parserjucasaca
Add one of the Firebird's DATEDIFF syntax to the parser so now it is possible to execute DATEDIFF(unit, datetime, datetime) in the Base Query designer and don't need to execute it in SQL direct anymore Change-Id: I0514542785c47a2a4693cba26de1815c96ee1b9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155027 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-07-22fixing a typo in sqlbison.yjucasaca
schema_glement_list is not registered, son can't be used. schema_element_list is registered and defined and seems to be the correct Change-Id: I7661532707ce6ddb32b95629192e9ba9847f21df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154766 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Lionel Mamane <lionel@mamane.lu> Tested-by: Lionel Mamane <lionel@mamane.lu>
2023-07-22tdf#146584: FB Setting default with ALTER TABLE works but gives useless messageJulien Nabet
ALTER is a DDL (DATA DEFINITION LANGAGE) instruction, no count row is expected. Change-Id: I3d5bfe240b85c5b79392c92fdd870bc045e1eb46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154755 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2023-07-18Revert "tdf#155431: SQL Editor does not recognize UNSIGNED"Julien Nabet
This reverts commit 408a51a964d06e86c12d3a938c1295c75eecea63. Reason for revert: I gave a new try, it indeed doesn't work, I must have missed something. Change-Id: Ibf3318374cf68eaf093b9fa140b79beef2ddbd3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154546 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-07-18tdf#155431: SQL Editor does not recognize UNSIGNEDJulien Nabet
Change-Id: I2d618b27a92e1a85a6b7730aca3341f5259c4037 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152128 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-07-17tdf#118817: add WEEK, WEEKDAY, YEARDAY AND MILLISECOND for EXTRACTJulien Nabet
Change-Id: I912e9c2f8394f487dc3753d653f5a9ba19d7f416 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154524 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-06-26new loplugin:constexprliteralNoel Grandin
OUStringLiteral should be declared constexpr, to enforce that it is initialised at compile-time and not runtime. This seems to make a different at least on Visual Studio Change-Id: I1698f5fa22ddb480347c2f4d444530c2e0e88d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153499 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-21openldap: upgrade to release 2.6.4Taichi Haradaguchi
Because NSS support has been removed in release 2.5, switch TLS/SSL module used by OpenLDAP to OpenSSL. Add -pthread flag to openldap_LDFLAGS when building on Linux. This avoids errors that occur in libcrypto.a (libcrypto-lib-threads_pthread.o). Change-Id: I4779ce40233d144d930f20e85db7b4ba08f91ea1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143646 Tested-by: Taichi Haradaguchi <20001722@ymail.ne.jp> Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2023-06-15wrap OSQLParser::s_xLocaleData in vcl::DeleteOnDeinitNoel Grandin
since my adaption of i18npool to use OUStringLiteral, this data structure might get torn down after the i18npool data is has pointers to. Change-Id: If83d232d5bfb003ed4dbfb70d47f707a73d2bcc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153121 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-04Use getXWeak in connectivityMike Kaganski
Change-Id: Id301a9321f77e5ccc1269a3b677e9faeb19a4011 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150841 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-05-31do not throw DisposedException when inside a dispose() methodNoel Grandin
There is no need to do this, as the documentation of css.lang.XComponent::dispose at udkapi/com/sun/star/lang/XComponent.idl states: After this method has been called, the object should behave as passive as possible, thus it should ignore all calls Otherwise, the effect of throwing here is mostly to disturb the flow of logic in caller code, preventing other parts of teardown from proceeding smoothly. Change-Id: I30e6d1b35f85b727debf4405a995fdc0a4fccde6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152450 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-28Typo: aCatlog->aCatalogJulien Nabet
Change-Id: I875e94e47d44101a840b711de174f38ad4b85b4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152357 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2023-05-25merge some stringaddsNoel Grandin
found with a lightly tweaked version of the loplugin:stringadd and some hand-holding. Change-Id: I146aadcaf665e98fea89a9cad2df4dc3935622f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152275 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-25Related tdf#155443: MySQL/MariaDB direct connect, use more of the new functionJulien Nabet
...getAlterTableColumnPart(). getName() and getTableName() don't deal with database/schema prefix + backticks Change-Id: I31cc9dc98de0449dfe2f6f24305290d4edb9ecb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152276 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2023-05-25tdf#155443: MySQL/MariaDB direct connect: pb to change fieldname in tableJulien Nabet
Copy and simplify "getAlterTableColumnPart" from Mysql JDBC part which seems to do the right job with table name. Change-Id: I94d20b002a60f2ce1ea4d7e4de8040a9cbf04994 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152247 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2023-04-30Firebird: add info FDB/FBK use on READMEJulien Nabet
Thank you again Mike for this info! Change-Id: Iab02f486035de48636d84148a045e86b24307a95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151218 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-04-25Add script to find unused using declarationsGabor Kelemen
As a complementer to clang-tidy-12 --checks="-*,misc-unused-using-decls" Pros: - simple, fast! - finds some more unused declarations, somehow - works on non-linux specific parts of the code - clang-tidy (for me) trips on files with external headers, this does not Change-Id: If2db989114ac5c2841ed2e89ff7bd7a9e419f567 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150612 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-04-24loplugin:unnecessarygetstr extend to more std::string checkingNoel Grandin
suggested by mike kaganski Change-Id: I5f5f254142767aca45a6101abdd84a0163ca6a34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150936 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-24tdf#117118 - Saves data automatically in Firebird embedded databasejucasaca
Saves data when dispossing connection regardless of whether or not the save button is pressed Change-Id: I501fbc3d89ff52695f42196b2627e26c2011f75b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148368 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-24loplugin:unnecessarygetstr extend to createFromAsciiNoel Grandin
idea from mike kaganski Change-Id: I0ecb9cad091d7a048d2ddae73165bf22748f3872 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-23use more TOOLS_WARN_EXCEPTIONNoel Grandin
so we get more complete information when something goes wrong Change-Id: Ia73623f748b0779cf80b0086bd8258791590e9ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150754 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-20Typo: nCurentPos->nCurrentPos (connectivity/sqliterator)Julien Nabet
Change-Id: I6580e81a8a792ff98e1b8594ed79bd77b684b719 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150684 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-04-20Run clang-tidy with misc-unused-using-decls on modules [a-c]*Gabor Kelemen
To remove unneeded using declarations. Via the simple script: for i in $(find $dirname -name "*cxx" -o -name "*hxx" ); do clang-tidy-12 --checks="-*,misc-unused-using-decls" "$i"; done Change-Id: I95871cc0ae6f22a9684bae9d14ef0475aea17abb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150608 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-04-17Remove some unused includesMiklos Vajna
Mostly com/sun/star/frame/Desktop.hpp is unused after inheriting from UnoApiTest. Change-Id: I71b75fa5c880337ff294583b96af09c90b5059c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150514 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-04-17loplugin:stringviewparamStephan Bergmann
Change-Id: I4358852758782bc104f1af2c34ce4542e26e1edc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150475 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-04-14loplugin:stringviewparam improvementsNoel Grandin
improve the check by checking for methods that exclude using string_view, rather than checking for methods that __can__ use string_view, which leads to exposing some holes in our o3tl/string_view.hxx coverage. Change-Id: Ic9dd60441c671f502692f9cd2a1bb67301c4b960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150277 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-12loplugin:stringview whitelist getLength and isEmptyNoel Grandin
Change-Id: I38f3410c0b25ff579879b9de1f266af4d8fd51e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150256 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-12OUString::intern is a relicNoel Grandin
and a pessimisation. Remove usage thereof. Change-Id: I98f6197aa375349b909a7ef1403ec06ca37890d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150269 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-10Use of O(U)StringNumber for float/double is actually a pessimisationMike Kaganski
They use rtl_(u)str_valueOf(Float|Double), to fill the buffer, and the latter use doubleToString, which creates an rtl_(u)String, copies to the buffer, and releases the rtl_(u)String. So instead just use the rtl_(u)String from rtl_math_doubleTo(U)String directly. Even when the end result is not needed as O(U)String, this would avoid an extra copy step. Also, this avoids separate LIBO_INTERNAL_ONLY implementations. Change-Id: Ib1d9ecebd7876dfff7dc758f89ee4c1536647a50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150150 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-09new loplugin:unnecessarygetstrNoel Grandin
which prevents constructing unnecessary temporaries via getStr() Change-Id: I9ca70893a10e954b5ee0e6ad6098660ee24c2bef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150170 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-09use more OUStringToOStringNoel Grandin
which makes it easier to pass around string_view in a few places. Change-Id: Icbbb7f56494986582f1c3272404775bd98031240 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150129 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-24loplugin:stringadd in c*Noel Grandin
after my patch to merge the bufferadd loplugin into stringadd Change-Id: I66f4ce2fd87c1e12eefb14406e0e17212f68ceff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149497 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>