343 Commits
Author SHA1 Message Date
Vissarion Fisikopoulos 68bed36a97 tdf#153057, tdf#173589 enable Base to filter date and time values
This patch implements and fixes cases for filtering. In particular
the cases for form-based and dialogue-based filtering in forms for
data and time. Additionally, the cases for time values in Table
Data View.

A specific limitation comes from firebird which accepts only 4 digits
for nanoseconds in time values. The data are rounded to that digit
for firebird while still support full precision (up to 9 digits)
for other engines. This is implemented using the driver's metadata
functions.

Unit tests are added.

Change-Id: I89435da239c898f3c782fcc9f78f98caf4223f62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211298
Reviewed-by: Vissarion Fisikopoulos <vfisikop@libreoffice.org>
Tested-by: Jenkins
2026-09-22 15:54:40 +02:00
Julien Nabet 296b49f581 Related tdf#150928: replace character set by encoding (sc/part 3+connectivity)
Change-Id: I78d3c989be9e02e39d646b3c1eb672e3f37bd43c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209380
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-07 10:15:23 +02:00
Andrea Gelmini 9c704826bb Fix typos
Change-Id: Ief7455c1b1955c292022f6a6e3b8c601a34bd8a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210442
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-03 08:53:27 +02:00
Andrea Gelmini 4f86cfa577 Fix typos
Change-Id: Ic09e8f2877a7106eb074586662d1733828d85197
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209422
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2026-08-21 14:19:46 +02:00
Stephan Bergmann 1a52b9141e Missing include
Change-Id: I0c9b387dc946e8eee8bb800184d95b138d897f32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194157
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2025-11-18 15:51:23 +01:00
praweshm be49c60b2a tdf#143148 Use pragma once instead of include guards in connectivity
Change-Id: I337b16463f15c42469133bb0eb4620ca1133fd42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193968
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2025-11-16 11:10:50 +01:00
Gabor Kelemen fd2e467ba3 tdf#146619 Run IWYU in fw decl mode on include/[a-c]*
After recent commit 851fb75779
recheck these directories in include/ again
to test drive the new --headersfwd mode of bin/find-unneeded-includes

Change-Id: I0ede437c4f9958cd98210ed1760a5b98ea8bd1ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192377
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2025-11-08 09:37:19 +01:00
prrvchr 3081701aa8 tdf#156776 Base need to save new table with unique name
In Base if you create a new table with:

- Insert -> Table Design...

when saving this new table with:

- File -> Save As

If the underlying database supports catalogs and/or schemas, it will always be proposed as a table name: Table1

It is necessary to propose a table name that does not yet exist in the pre-selected catalog and/or schema.

Change-Id: I4ca8cb8013f34e1c92211040c7ab0558d94c4243
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190289
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-09-28 13:53:44 +02:00
Mike Kaganski c23a560f4b Fix comment after 5b808448dc
Change-Id: Id10811fc5eedc2983eb0445827ffa7882fce2180
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188105
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-07-21 13:59:59 +02:00
Michael Weghorn f93e0514c5 connectivity: Drop dbtools::getDataSourceSetting taking const char*
Switch all callers to use the other variant that
takes const OUString&, which the now dropped variant
was also calling internally.

Change-Id: If7d2861dc570744444f25b8124cc04781d7772d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185536
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-05-19 23:32:22 +02:00
Stephan Bergmann 887804deb5 New Clang 21 trunk -Werror,-Wunnecessary-virtual-specifier
...warning about non-overriding virtual dtors in final classes.  Every single
one of these might or might not be suspicious (e.g., in some cases it might be
better to have a virtual dtor in a derived-from class).  Also, for some of the
virtual dtors, making them non-virtual then caused

> error: unnecessary user-declared destructor [loplugin:unnecessaryoverride]

so those were removed completely.

Change-Id: If0ee71645a347d6096b65988c56f627c42fe54b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185223
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-05-12 23:11:05 +02:00
Noel Grandin f4ba2e1c5a trim excessive leading whitespace in connectivity
Change-Id: I5629ca3ac7503c1cab848f65fcd25d15a1e3dcaa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182580
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
Reviewed-by: Lionel Mamane <lionel@mamane.lu>
2025-03-07 16:14:01 +01:00
Noel Grandin 2df7a51f6e expand the ObjectType typedef
in preparation for making some of the code more typesafe

Change-Id: I7c8a4b30cd1144feaaa2e31fce67cd6545065a38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182425
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-03-03 14:53:27 +01:00
Gabor Kelemen de8b935e16 Drop unneeded forward declarations from include/ even harder
test drive the new bin/find-unneeded-includes --fwdecl mode
with iwyu 0.23 instead of 0.21, this seems to find more unneeded
fw declarations

Change-Id: I451e571c70eb74f46c799753e3c5a53c0110da36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179707
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2025-01-06 09:28:27 +01:00
Caolán McNamara f0c49bd155 cid#1633781 Initialization or destruction ordering is unspecified
and

cid#1633780 Initialization or destruction ordering is unspecified
cid#1633778 Initialization or destruction ordering is unspecified
cid#1633777 Initialization or destruction ordering is unspecified
cid#1633776 Initialization or destruction ordering is unspecified

Change-Id: I8ae7cbede6df2ad747fe57d0ac2800e1b6a31038
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175576
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-25 09:22:55 +02:00
Noel Grandin 19bc8856c4 move vcl::DeleteOnDeinit to tools
so we can fix a shutdown use-after-free in sot.

Change-Id: I32f83bd94627d72d7bee7ea2ebd6ab77a7f78435
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175335
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-22 08:01:19 +02:00
Mike Kaganski 1091e04fbd Simplify use of connectivity::OConnectionWrapper
Make it use cppu::WeakComponentImplHelper, because all its derived
classes used that template. In the derived classes, switch to use
of cppu::ImplInheritanceHelper. That simplifies the hierarchy, and
doesn't require to re-implement many basic methods.

Change-Id: I40ec05a471af4437098586d20540f9a815677952
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173370
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-09-15 06:27:30 +02:00
Mike Kaganski ed2d890d69 Refactor ODBC functions code for clarity
Change-Id: I5f3de97fc178b11c82655f65435c637fdff65e99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171080
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-07-26 23:20:12 +02:00
Caolán McNamara e756c168c2 use [[noreturn]] for these throw helpers
Change-Id: Ia50d6f2be91e830201689cc428e55203eeb41eb0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167035
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-05-05 20:03:10 +02:00
Noel Grandin cd35a509ef reduce symbol visibility in --enable-mergelibs=more mode
Change-Id: If811c9ec336543227db73c990248b9113846cf2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164657
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-13 08:14:38 +01:00
Noel Grandin 3ba92b5f1e hide more symbols
using the bin/find-can-be-private-symbols.py script
to find classes with large numbers of exported symbols
that can hidden.

before
exported       = 58104
imported       = 30810
unused_exports = 35433

after
exported       = 55094
imported       = 31073
unused_exports = 32423

Change-Id: Idd0a70ee3740afd5ca1a86771e0e2ff8090d102d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163456
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-19 09:09:06 +01:00
Caolán McNamara fe25701ae9 cid#1545421 COPY_INSTEAD_OF_MOVE
and

cid#1545403 COPY_INSTEAD_OF_MOVE
cid#1545397 COPY_INSTEAD_OF_MOVE
cid#1545376 COPY_INSTEAD_OF_MOVE
cid#1545339 COPY_INSTEAD_OF_MOVE
cid#1545288 COPY_INSTEAD_OF_MOVE

Change-Id: I0e24a3fc7148d0b7ff8126debe3cddbb4fbdd713
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161453
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-30 22:07:47 +01:00
Gabor Kelemen 0b600862ae tdf#146619 Recheck include/ with find-unneeded-includes --noexclude
to see if some exclusions became obsolete

Change-Id: Id88351f5448511b35994c58c6cb749784da3b45e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156993
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
2023-12-24 12:14:14 +01:00
Caolán McNamara abd967ed31 cid#1546453 COPY_INSTEAD_OF_MOVE
a sample commit

Change-Id: I226569c5d3b066a5c328b67a36c17df57b5a668d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160215
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-03 20:20:05 +01:00
Gabor Kelemen 2f85eb7a2d tdf#146619 Recheck include/c* with IWYU
Change-Id: I0cf6f675483bddf82e7347b484a874c71963bfd7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156984
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
2023-09-22 09:33:13 +02:00
Henry Castro 3d910abdaa connectivity: add neutral context parser
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-01 21:39:46 +02:00
Noel Grandin e469a17183 wrap OSQLParser::s_xLocaleData in vcl::DeleteOnDeinit
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-15 18:39:31 +02:00
Noel Grandin bc2101646b loplugin:stringviewparam improvements
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-14 07:54:28 +02:00
Noel Grandin 3fbadf2801 use more OUStringToOString
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-04-09 16:28:13 +02:00
Noel Grandin b6977dad45 osl::Mutex->std::mutex in OSQLParser
Change-Id: Ibc56fee796914a6dd39970f7a7879d5b5b2c219f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148660
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-11 05:54:16 +00:00
Noel Grandin 5caa11ea3b osl::Mutex->std::mutex in ParameterWrapperContainer
Change-Id: I5beb5981d40e970e8bdc68d7bd61f1adb502246d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148440
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-08 07:51:44 +00:00
Noel Grandin a60fcb1504 osl::Mutex->std::mutex in OSQLParseNodesContainer
Change-Id: Ie47589a454799494bc150eec1e135c8948eb7fbf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147420
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-22 09:16:10 +00:00
Andras Timar cc584681ca set visibility of classes in mergelib+asan case
Change-Id: I2eb80d0b3002f174deea0d8657cb0cdbdec5be8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147144
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2023-02-16 09:49:56 +00:00
Noel Grandin 83fffbbd5e new comphelper::SingletonRef
to replace salhelper::SingletonRef, but using a std::mutex instead of an
osl::Mutex

Change-Id: Ibf88a3778f47300c08b8ec9ee58ed24eb83aed7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147046
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-15 13:31:11 +00:00
Noel Grandin f025dcc44c XUnoTunnel->dynamic_cast in connectivityy
Change-Id: Ibe5e87a1ef1bdc11451e8fe240d017f1ef60dfe6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145556
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-16 10:19:16 +00:00
Caolán McNamara 4616935555 cid#1500499 Resource leak
the only change should be to the two trailing cases in
OSQLParseNode::substituteParameterNames which do seem to leak.  The
closest I got to triggering the actual code is toggling into sqlview
mode of a query but couldn't quite construct a sql statement to trigger
it.

Change-Id: I320dc4df3b18a18b236c91ee30329c10001c9a08
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140081
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-17 10:52:40 +02:00
Noel Grandin 0f01b42e73 clang-tidy modernize-pass-by-value in connectivity
Change-Id: I1f1b609254c7f8cfba14c248167f81b51684d8e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135727
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-13 18:11:03 +02:00
Noel Grandin 9f958c076a loplugin:passstuffbyref
Change-Id: I336fd329b577b6fa141265d8bc7ce67784bd7306
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133210
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-20 15:24:34 +02:00
Noel Grandin 6fc3dfd3f1 use more string_view
found by tweaking the loplugin:stringview and making it whitelist
getLength

Change-Id: Ic41cd4e3026d93b70a76fe1279c6de3abbe6b4a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132820
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-11 17:44:46 +02:00
Noel Grandin 85c2ed8dc7 loplugin:stringview add check for getToken().toInt32
where we can convert that to
    o3tl::toInt32(o3tl::getToken(
and avoid the heap allocation of a temporary string

Change-Id: Ib11c19c6e6cdc0de3e551affd3578d181e292de4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132810
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-11 14:45:38 +02:00
Noel Grandin 1927b51993 loplugin:stringviewparam convert methods using indexOf
.. and lastIndexOf, which convert to find and rfind

Change-Id: I6c4156cf904774c0d867f85a4c2785dba7593f62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132445
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-02 13:31:19 +02:00
Yomnasalama 92ddacfaa0 tdf#143148- Use pragma once in connectivity
Change-Id: If15cf06a986e4bf6ac43b91567a7b2b1aa153d18
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132156
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-03-30 08:03:09 +02:00
mostafa-elsharnoby c03b09e502 tdf#143148: Use pragma once instead of include guards
Change-Id: Iad31b4d3d22519059d340a02868080c829ce7b98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132158
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-03-30 07:59:32 +02:00
Julien Nabet 628fedabdd Mysql/MariaDB: tdf#81430 make tables editable (with or without PK)
Change-Id: I7df464107e692817ef80d887a4addea618d6cc72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128356
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-14 21:41:31 +01:00
Gabor Kelemen b24064f2b7 Recheck include/[a-d]* with IWYU
See tdf#42949 for motivation

Change-Id: I42475b8e75951d5dcae2fe6b0ad0bca64441e7f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126837
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-12-15 15:08:10 +01:00
Noel Grandin fdae440a4d use more OInterfaceContainerHelper3 in connectivity::sdbcx::OCollection
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-27 15:26:22 +01:00
Noel Grandin 203ba801ee use more OInterfaceContainerHelper3 in dbtools::ParameterManager
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-27 08:10:17 +01:00
Noel Grandin dc4ee83823 loplugin:stringliteraldefine in connectivity
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-24 13:56:23 +01:00
Noel Grandin a9c8ac3632 remove ORowSetValue implicit conversion methods
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-23 12:28:49 +01:00
Noel Grandin 7c3990c38d loplugin:moveparam in connectivity
Change-Id: Iaf3a64effb69fd82c6303d8fa75723ccc5ced543
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123183
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-06 21:17:01 +02:00