696 Commits
Author SHA1 Message Date
Neil Roberts e6176fc4f0 sqliterator: Use rtl::Reference::get() instead of &*
Using &* can be problematic if the pointer is null. In this case it
doesn’t matter, but using Reference::get() is probably easier to
understand anyway. This also paves the way for a later compiler plugin
to check for this.

Change-Id: I2361761496648eaaa1e245912ac19aa130b38863
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211842
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-10-07 19:14:54 +02:00
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
Vissarion Fisikopoulos 67b51abd65 tdf#42713: maintain SQL comments in design view
When an SQL query has comments then those were deleted
when switching to design view. This is fixed and the comments
are maintained. In the case the query is edited in design
view then the comments are inevitably lost.

Change-Id: Ibcf6e36fce88a526c7340d352aca9859b1b3714e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205441
Tested-by: Jenkins
Reviewed-by: Vissarion Fisikopoulos <vfisikop@libreoffice.org>
2026-06-09 16:11:29 +02:00
Simon Chenery e91a6e9b9f tdf#158237 Use C++20 contains() in PColumn.cxx
Change-Id: Ic4853b8baa691eaa3027605bd6e9278fbd767fef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199362
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2026-02-19 18:55:29 +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
Noel Grandin ec3a22ca67 reduce warning spam in connectivity
Change-Id: Iba03e3e18586b8d40775c11ec0156a522fa5dac8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191118
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-09-18 15:22:04 +02:00
Noel Grandin 02a5df653f use more concrete UNO in connectivity
Change-Id: I3842706a0b28c3bf78c8f359ca2d2226ed5f1b07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182769
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-03-12 06:48:08 +01:00
Julien Nabet 1137a2f025 Revert "tdf#159588: Query-GUI: LOWER isnt supported in Query-GUI if ...
This causes regression, see tdf#165458

This reverts commit 9530664d07.

Change-Id: Ic2be6ea3a41e1a22c9443a2fe8a0cae188bc6eb6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182314
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2025-02-27 16:49:28 +01:00
Mike Kaganski 94636bc764 tdf#130672: handle Rule::factor explicitly
When representing a signed number, the rule may consist of two subnodes:
a punctuation bearing "+" or "-", and then the following digits (see
'factor:' in connectivity/source/parse/sqlbison.y). After punctuation
was added to the string buffer, the following number is passed to
parseLeaf, where it checks if the buffer is not empty, and then adds
a space between the preceding sign and the digits.

This change handles the 'factor' rule explicitly.

Change-Id: I0c929418ad88c5bf653a4e820f45b7d627b07da7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180917
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-01-29 21:19:55 +01:00
Noel Grandin f2fc901be9 clang-tidy: performance-unnecessary-copy-initialization in connectivity
Change-Id: Ibb485324c71b78ff569cb15b6cf6f7f3889e1dc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176376
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-11 10:58:45 +01:00
Noel Grandin 5de73f04f3 new loplugin:staticconstexpr
Change-Id: Ida1996dfffa106bf95fd064e8191b8033b4002f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175336
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-04 08:51:00 +01:00
Caolán McNamara 7bbe74b2be cid#1555789 COPY_INSTEAD_OF_MOVE
and

cid#1556865 COPY_INSTEAD_OF_MOVE
cid#1556871 COPY_INSTEAD_OF_MOVE
cid#1556939 COPY_INSTEAD_OF_MOVE
cid#1556951 COPY_INSTEAD_OF_MOVE
cid#1556964 COPY_INSTEAD_OF_MOVE
cid#1556966 COPY_INSTEAD_OF_MOVE
cid#1556968 COPY_INSTEAD_OF_MOVE
cid#1556971 COPY_INSTEAD_OF_MOVE
cid#1556989 COPY_INSTEAD_OF_MOVE
cid#1557001 COPY_INSTEAD_OF_MOVE
cid#1557011 COPY_INSTEAD_OF_MOVE
cid#1557032 COPY_INSTEAD_OF_MOVE
cid#1557038 COPY_INSTEAD_OF_MOVE
cid#1557041 COPY_INSTEAD_OF_MOVE
cid#1557055 COPY_INSTEAD_OF_MOVE
cid#1557056 COPY_INSTEAD_OF_MOVE
cid#1557057 COPY_INSTEAD_OF_MOVE
cid#1557065 COPY_INSTEAD_OF_MOVE
cid#1557068 COPY_INSTEAD_OF_MOVE
cid#1557087 COPY_INSTEAD_OF_MOVE
cid#1557090 COPY_INSTEAD_OF_MOVE
cid#1557093 COPY_INSTEAD_OF_MOVE
cid#1557113 COPY_INSTEAD_OF_MOVE
cid#1557122 COPY_INSTEAD_OF_MOVE
cid#1557126 COPY_INSTEAD_OF_MOVE
cid#1557145 COPY_INSTEAD_OF_MOVE
cid#1557151 COPY_INSTEAD_OF_MOVE
cid#1557152 COPY_INSTEAD_OF_MOVE
cid#1557197 COPY_INSTEAD_OF_MOVE
cid#1557216 COPY_INSTEAD_OF_MOVE
cid#1557245 COPY_INSTEAD_OF_MOVE
cid#1557272 COPY_INSTEAD_OF_MOVE
cid#1557310 COPY_INSTEAD_OF_MOVE
cid#1557314 COPY_INSTEAD_OF_MOVE
cid#1557318 COPY_INSTEAD_OF_MOVE
cid#1557333 COPY_INSTEAD_OF_MOVE
cid#1557340 COPY_INSTEAD_OF_MOVE
cid#1557358 COPY_INSTEAD_OF_MOVE
cid#1557359 COPY_INSTEAD_OF_MOVE
cid#1557365 COPY_INSTEAD_OF_MOVE
cid#1557367 COPY_INSTEAD_OF_MOVE
cid#1557395 COPY_INSTEAD_OF_MOVE
cid#1557418 COPY_INSTEAD_OF_MOVE
cid#1557488 COPY_INSTEAD_OF_MOVE
cid#1557493 COPY_INSTEAD_OF_MOVE
cid#1557506 COPY_INSTEAD_OF_MOVE
cid#1557514 COPY_INSTEAD_OF_MOVE
cid#1557528 COPY_INSTEAD_OF_MOVE
cid#1557534 COPY_INSTEAD_OF_MOVE
cid#1557537 COPY_INSTEAD_OF_MOVE
cid#1557562 COPY_INSTEAD_OF_MOVE
cid#1557563 COPY_INSTEAD_OF_MOVE
cid#1557592 COPY_INSTEAD_OF_MOVE
cid#1557608 COPY_INSTEAD_OF_MOVE
cid#1557615 COPY_INSTEAD_OF_MOVE
cid#1557619 COPY_INSTEAD_OF_MOVE
cid#1557637 COPY_INSTEAD_OF_MOVE
cid#1557648 COPY_INSTEAD_OF_MOVE
cid#1557712 COPY_INSTEAD_OF_MOVE
cid#1557750 COPY_INSTEAD_OF_MOVE
cid#1557762 COPY_INSTEAD_OF_MOVE
cid#1557765 COPY_INSTEAD_OF_MOVE

Change-Id: I10db1910627e04a26e25836c05ad5c2707abd18b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175696
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-27 20:19:12 +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
Noel Grandin 7f5a7ef638 make UStringLess single-arg constructor explicit
Change-Id: I0fb4723fa878f8ebdbe5ac0fe080559ffd4736dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170679
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-07-18 15:34:13 +02:00
Andrea Gelmini aa80eaeeab Fix "lets see" -> "let's see"
Change-Id: I7aa939681720bc0dc81c8f114a3608a8cdfb4f60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169722
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-06-28 22:24:50 +02:00
Noel Grandin 4d97239b7a loplugin:ostr in connectivity
Change-Id: Ice633719b05240ab5a052b62ca4eafe89f97e12f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167238
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-07 08:46:13 +02:00
Caolán McNamara e6981b99ac WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: Ic2c2e227a50994298377485e9e807cd9142cc386
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166949
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-05-01 10:50:11 +02:00
Mike Kaganski 8755c80018 Drop uses of css::uno::Sequence::getConstArray in canvas .. connectivity
where it was obsoleted by commits 2484de6728
(Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and
fb3c04bd19 (Drop non-const Sequence::operator[]
in internal code 2021-11-05).

Change-Id: I9467028fd1a7eeafad7f0dd776a91a9a40770b48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166816
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-29 23:15:33 +02:00
Julien Nabet 9530664d07 tdf#159588: Query-GUI: LOWER isnt supported in Query-GUI if condition is LIKE
Let's consider "SQL_TOKEN_LOWER" and "SQL_TOKEN_UPPER" as "string_function_1Argument"
like "SQL_TOKEN_LCASE" and "SQL_TOKEN_UCASE"

Change-Id: I288fd5f3d9e3d104345c73a060ba11d9701500a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163099
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-02-10 12:50:46 +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
Julien Nabet 20fdec77eb Use emplace_back instead of push_back (connectivity)
Change-Id: Ie90901832dafbaab56d3ac22bdb1cf91e3564fd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161181
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-12-22 18:13:54 +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
Stephan Bergmann 5c374284b7 Extended loplugin:ostr: connectivity
Change-Id: I284c896777c4f62499eb6b7c0a9883d9abf8d1f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159721
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-20 09:40:37 +01:00
Stephan Bergmann 4f66ce572b Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: connectivity
Change-Id: I8220cf4e83a59aa55394d01f29a6af108dcc0619
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158149
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-19 14:25:14 +02:00
Henry Castro 6896c46567 connectiviy: fix to detect column data type
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-01 21:39:57 +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
Henry Castro 50f36b75ce connectivity: fix return column type "DataType::SQLNULL"
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-09-01 19:09:12 +02:00
jucasaca ccf30787a7 tdf#156534 Add Firebird's DATEADD function to SQL parser
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-18 08:23:18 +02:00
jucasaca 42364fbfaf tdf#104918 Add Firebird's DATEDIFF syntax to the sql parser
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-08-07 23:38:50 +02:00
jucasaca f8a3126178 fixing a typo in sqlbison.y
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-22 21:48:13 +02:00
Julien Nabet 007ef352c2 Revert "tdf#155431: SQL Editor does not recognize UNSIGNED"
This reverts commit 408a51a964.

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-18 11:26:46 +02:00
Julien Nabet 408a51a964 tdf#155431: SQL Editor does not recognize UNSIGNED
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-18 10:04:49 +02:00
Julien Nabet 77a2fe5a64 tdf#118817: add WEEK, WEEKDAY, YEARDAY AND MILLISECOND for EXTRACT
Change-Id: I912e9c2f8394f487dc3753d653f5a9ba19d7f416
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154524
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-07-17 19:54:28 +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
Julien Nabet bf770e8603 Typo: nCurentPos->nCurrentPos (connectivity/sqliterator)
Change-Id: I6580e81a8a792ff98e1b8594ed79bd77b684b719
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150684
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-04-20 15:16:34 +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 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
Mike Kaganski 3d236177be Deduplicate O(U)StringConcatenation
And use an overloaded helper function with a better (?) unified name
to show that the result is not an O(U)String.

Change-Id: I8956338b05d02bf46a6185828130ea8ef145d46b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141203
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-11 12:46:01 +02: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
Caolán McNamara bb1f2894e4 OSL_ENSURE->assert where we would crash if not true
Change-Id: I1544573ea9f57b5ca732c9b05acae9b4f91f53ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140080
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-16 22:07:28 +02:00
Julien Nabet 4182f3cda4 Simplify by using replace instead of replaceAt in loop in connectivity (4)
Change-Id: Iab92f1ee2be1e5b9ab3fa005890acfe9acbf3732
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139460
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-09-08 18:56:52 +02:00
jsala 9e7e95a57b tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro
Change associated for by std::find_if in sqlbison.y
Also change some integer by std::size_t

Change-Id: I0d2100fbd7c22729da6ce0462c6cc093e0767fb4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136263
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-09-04 20:04:23 +02:00
Stephan Bergmann 91ba9654ba Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxx
...so that its TOOLS_WARN_EXCEPTION can be used in
comphelper/source/misc/logging.cxx in a follow-up commit.  (And while at it,
rename from diangose_ex.h to the more appropriate diagnose_ex.hxx.  The
comphelper module is sufficiently low-level for this immediate use case, so use
that at least for now; o3tl might be even more suitable but doesn't have a
Library until now.  Also, for the immediate use case it would have sufficed to
only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION,
TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of
include/tools/diagnose_ex.h into an additional new
include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move
the complete include file as is.)

Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-18 17:10:19 +02:00
Caolán McNamara f6e24b10c9 cid#1500536 silence Resource leak
Change-Id: Ibd626a90136f89af731dc2bfa684d99609d44b90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138481
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-18 16:05:53 +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
Stephan Bergmann 5060c50158 Use o3tl::make_unsigned in some places
...where a signed and an unsigned value are compared, and the signed value has
just been proven to be non-negative here

Change-Id: I20600d61a5d59d739bc1bee838c0038e4611aec2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134875
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-24 16:50:03 +02:00
Pragat Pandya 6abc09926c tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro
Change-Id: I54257e87da0cd66da59d820c7960c3e4b020fda3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134027
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Tested-by: Jenkins
2022-05-09 20:42:03 +02:00
Noel Grandin 9e57e16484 loplugin:unusedvariableplus
Change-Id: Id93086be1224b6f6bf0bdaa1d50b4f289099027e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133876
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-05 17:35:08 +02:00
Stephan Bergmann 1f110bf567 Just use Any ctor instead of makeAny in connectivity
Change-Id: I68e7354f094ee0e673d105dd8770a658810703d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133838
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-04 22:29:41 +02:00