summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers
AgeCommit message (Collapse)Author
2024-02-23Fix warning C4312 when building with MSVC without -Wv:18Mike Kaganski
Discovered by https://gerrit.libreoffice.org/c/core/+/163717 Like these: C:/lo/core/sw/source/ui/dbui/addresslistdialog.cxx(426): warning C4312: 'reinterpret_cast': conversion from 'int' to 'void *' of greater size Change-Id: Idbfbe8add89c8e219bdabcf28b741e2e31a5e345 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163781 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-01tdf#117118 - Saves data automatically in Firebird embedded databaseJuan c. Sanz
Saves data when disposing connection regardless of whether or not the save button is pressed. Solve Linux problems reported after previous patch (commit 9227fbabe0a33134f56aefdd8ec16024f006a659) was reverted. Change-Id: Idc02930c894560dfdb40265c253ee7c5557fe18b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159019 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-19cid#1545244 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1546433 COPY_INSTEAD_OF_MOVE cid#1546428 COPY_INSTEAD_OF_MOVE cid#1546175 COPY_INSTEAD_OF_MOVE cid#1545866 COPY_INSTEAD_OF_MOVE Change-Id: I1d1e684faa422654fd90513cf459cde58d3d8914 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162298 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-30move IsFuzzing to comphelperCaolán McNamara
and try something a bit more generic Change-Id: I1d8256576cd02f0a589df350ba7b53059dd586a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161250 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-29Use emplace_back instead of push_back (connectivity/mysqlc)Julien Nabet
Change-Id: I27b77455919efed2bf8fbc7c063a8e9221ea2816 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161406 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-12-22Use emplace_back instead of push_back (connectivity)Julien Nabet
Change-Id: Ie90901832dafbaab56d3ac22bdb1cf91e3564fd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161181 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-12-22Simplify initialization by avoiding push_backJulien Nabet
Change-Id: I62a2986dd21f37df71653c94223a3dce5d50dff0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161180 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-12-04-Werror,-Wunused-private-fieldStephan Bergmann
Change-Id: I45e52154cede5a4ea3cc1007fa8f1bbf74c4dd3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160291 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-12-03Mysql/Mariadb: implement Users::appendObject to allow users creationJulien Nabet
Change-Id: I49d4b08470a741bfb15d5d473ba6ccf19c55c964 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160266 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2023-12-03Mysql/Mariadb: implement Users::dropObject (so you can remove a user from UI)Julien Nabet
Change-Id: Ic8fee60e1182303469b5c74598d0ff6ec24667a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160259 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2023-12-03Mysql/Mariadb: implement changePasswordJulien Nabet
Change-Id: I565bd96324044bb30b1e096c56e845766663ded1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160258 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2023-12-02Mysql/Mariadb: implement User and ODatabaseMetaData privileges methodsJulien Nabet
User::getPrivileges User::getGrantablePrivileges + create ancillary User::findPrivilegesAndGrantPrivileges ODatabaseMetaData::getTablePrivileges Change-Id: Ib189aa121a3096aab412be68c76a3edaa11af1ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160247 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2023-12-02Mysql/Mariadb: implement refreshUsers so get access to users admin pageJulien Nabet
There's still work to do: - retrieve privileges of each table since it's empty for the moment - make the checkboxes editable (it seems read only) - make the user management work (creating one doesn't work for example) Change-Id: Ia1d9c4db7faae16ec1903c5d7aa5e679ce5e944a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160244 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-12-01tdf#158452: FB: impossible to change field to "entry required" in GUIJulien Nabet
... after table has been saved. There was an hack due to the fact that before FB 3.0, it wasn't possible to use ALTER TABLE to change nullable. See https://bugs.documentfoundation.org/show_bug.cgi?id=158452#c1 Since the hack doesn't work and since FB 3.0 since several years, let's remove the hack and use ALTER TABLE command. Change-Id: I145077bb4c4874f5fe31e375cfb64176a1293575 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160220 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2023-11-29Extended loplugin:ostr: connectivityStephan Bergmann
Change-Id: Ibbfb8945754713721c4e9ab9d8015c111c1307be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160125 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-11-23tdf#158072 Fails to apply AutoFilter in Mail Merge dialogNoel Grandin
regression from commit 66b0bc55854ba13b92b6c39b95f3f2d4ef76bf20 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Fri Mar 10 10:35:33 2023 +0200 simplify initialisation in *DatabaseMetaData where I failed to notice that the supposedly static data was being std::move'd Change-Id: I6238fa8e20ee6ca9fe31c29a7e05262dc1e3bede Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159851 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-20Extended loplugin:ostr: connectivityStephan Bergmann
Change-Id: I284c896777c4f62499eb6b7c0a9883d9abf8d1f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159721 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
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-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-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-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-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-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-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-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-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-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-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-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-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-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>
2023-03-14elide some temporary OStringsNoel Grandin
where we can pass a string_view into OStringToOUString Change-Id: If7803ba49aa15f6e9c7bd386d32fb84003155390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148844 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-10improve loplugin:unnecessarylockingNoel Grandin
to find more locking we can remove Change-Id: Ief7bc5ec2a1ff31f22a0ad366910b7fcc4725818 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148599 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-10simplify initialisation in *DatabaseMetaDataNoel Grandin
Change-Id: I1d7e107e22a98489e4d1013e14bb780e20d87c40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148594 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-28Drop 'using namespace ::std' in Windows-specific filesGabor Kelemen
Change-Id: Id66d42f2139fbcac0fed56fe534107f65d198f02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147877 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-02-15Drop 'using namespace ::std' in dirs b* c*Gabor Kelemen
Change-Id: I59392ee7aa71c219e475a09da67a868cfdd14b41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147074 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins