Commit Graph
284 Commits
Author SHA1 Message Date
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
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 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
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
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
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 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
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 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
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
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 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
Caolán McNamara 42ca32d7a3 cid#1500397 silence Resource leak
this reverts

commit 1142dc2398
Date:   Sun Feb 27 14:14:18 2022 +0100

    cid#1500397: Resource leak

with an alternative that hopefully silences coverity and helps show
better what is going on

Change-Id: Ifb117d65789e80e66419911dbb6b327bdf7ed948
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130707
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-28 17:00:32 +01:00
Julien Nabet 1142dc2398 cid#1500397: Resource leak
Change-Id: I765df1eef9ccf447cdd0a80497c1ca6f22bb9e42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130625
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-02-27 16:01:26 +01:00
Julien Nabet 4202ea2c93 cid#1500693 Resource leak
Change-Id: Ic560c2079be0b04ce382350390e03e0ec2d8abcc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130303
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-02-21 23:19:05 +01:00
Eike Rathke 0d6ab8d4ea Resolves: tdf#146757 Use correct format index keys instead of wrong hack
The hack worked by accident as long as the internal index
constants didn't change. Which was the case with

    commit f7d0c6b42a
    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-17 18:54:40 +01:00
Noel Grandin 16506994ec can use OUStringLiteral here
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-26 11:43:15 +01:00
Noel Grandin 25298930bc loplugin:flatten in canvas..cui
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-21 15:55:46 +01:00
Noel Grandin ec1c4c4930 O[U]String::replaceAt overloads that take string_view
which results in lots of nice string_view improvements picked up by the
plugins

Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-23 14:00:08 +01:00
Stephan Bergmann 4f5b3e4bd5 In O[U]StringBuffer, make string_view params replacements for OUString ones
...for LIBO_INTERNAL_ONLY, instead of having them as additional overloads.  That
way, loplugin:bufferadd and loplugin:stringviewparam found many further
opportunities for simplification (all addressed here).  Some notes:

* There is no longer an implicit conversion from O[U]String to O[U]StringBuffer
(as that goes via user-defined conversions through string_view now), which was
most noticeable in copy initializations like

  OStringBuffer buf = someStr;

that had to be changed to direct initialization,

  OStringBuffer buf(someStr);

But then again, it wasn't too many places that were affected and I think we can
live with that.

* I made the O[U]StringBuffer ctors taking string_view non-explicit, mainly to
get them in line with their counterparts taking O[U]String.

* I added an OUStringBuffer::lastIndexOf string_view overload that was missing
(relative to OUStringBuffer::indexOf).

* loplugin:stringconstant needed some addition to keep the
compilerplugins/clang/test/stringconstant.cxx checks related to
OStringBuffer::append and OStringBuffer::insert working.

* loplugin:stringviewparam no longer needs the special O[U]StringBuffer-related
code that had been introduced in 1250aecd71
"loplugin:stringviewparam extend to new.."

Change-Id: Ib1bb8c4632d99b744e742605a9fef6eae959fd72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122904
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-11 14:22:22 +02:00
Stephan Bergmann ad1557f5d7 A more lightweight O[U]StringConcatenation
...compared to a full-blown O[U]String, for temporary objects holding an
O[U]StringConcat result that can then be used as a std::[u16]string_view.

It's instructive to see how some invocations of operator ==, operator !=, and
O[U]StringBuffer::insert with an O[U]StringConcat argument required implicit
materialization of an O[U]String temporary, and how that expensive operation has
now been made explicit with the explicit O[U]StringConcatenation ctor.

(The additional operator == and operator != overloads are necessary because the
overloads taking two std::[u16]string_view parameters wouldn't even be found
here with ADL.  And the OUString-related ones would cause ambiguities in at
least sal/qa/rtl/strings/test_oustring_stringliterals.cxx built with
RTL_STRING_UNITTEST, so have simply been disabled for that special test-code
case.)

Change-Id: Id29799fa8da21a09ff9794cbc7cc9b366e6803b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122890
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-03 19:50:44 +02:00
Noel Grandin bfc1600c6a loplugin:indentation improve checks for brace alignment
Change-Id: I333100fda7e181f68f36b03279b3fbb8cb768310
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117615
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-28 10:47:34 +02:00
Noel Grandin 335de1a221 no need makeStringAndClear() when appending to buffer
it just creates an unnecessary temporary

Change-Id: Ide3cd99b2ac4f2a621e5d55ce4bdc95d05430709
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114467
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-22 12:37:39 +02:00
Mike Kaganski 654c527229 Use ContainerType().swap and avoid local variables
Change-Id: I773555180758a97aff37f9bc27de83c355d71521
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109761
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-01-24 08:36:24 +01:00
Stephan Bergmann 042033f1e6 loplugin:stringviewparam: operator +
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-29 16:42:33 +01:00
Stephan Bergmann 35e471bb4d Adapt the remaining OUString functions to std string_view
...for LIBO_INTERNAL_ONLY.  These had been missed by
1b43cceaea "Make many OUString functions take
std::u16string_view parameters" because they did not match the multi-overload
pattern that was addressed there, but they nevertheless benefit from being
changed just as well (witness e.g. the various resulting changes from copy() to
subView()).

This showed a conversion from OStringChar to std::string_view to be missing
(while the corresponding conversion form OUStringChar to std::u16string_view was
already present).

The improvement to loplugin:stringadd became necessary to fix

> [CPT] compilerplugins/clang/test/stringadd.cxx
> error: 'error' diagnostics expected but not seen:
>   File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd]
>   File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd]
> 2 errors generated.

Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-11 21:25:10 +01:00
Noel Grandin 2d0bdcc586 loplugin:flatten connectivity
Change-Id: Ic1d9eb84b64ebde99e15704a10b27f21447df4d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92469
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-18 20:35:49 +02:00
Noel Grandin e5cfe9c050 loplugin:makeshared in connectivity..cppuhelper
Change-Id: Id8064e961a64bb03bc0fb61e375cdcf769b340cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87276
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-24 07:18:44 +01:00
Noel Grandin 386bb99bf6 sal_Char->char in connectivity
Change-Id: Ie32cbef9b03d69044c401f79bc737cde6dd0ed5d
Reviewed-on: https://gerrit.libreoffice.org/85396
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-18 20:38:03 +01:00
Julien Nabet 8e0c45246a Resolve FIXME Decimal Separator should be OUString (connectivity/dbaccess/svx)
instead of a sal_Char

Change-Id: I14fd983dac7ceb83a788c26dd4ea9d1c87444c9a
Reviewed-on: https://gerrit.libreoffice.org/80493
Tested-by: Jenkins
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-10-09 14:09:22 +02:00
Noel Grandin 727200b81d loplugin:stringadd in basctl..cui
Change-Id: I2fdeb7eb3ead3512ad6d3fe793305038ab3aa7ae
Reviewed-on: https://gerrit.libreoffice.org/79886
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-01 09:22:23 +02:00
Noel Grandin 6d024a6916 tdf#126588 crash in saving view
regression from
    commit d425658bd9
    Date:   Wed Dec 19 16:10:51 2018 +0200
    pass OSQLParseNode around by unique_ptr

We have a OSQLNode being deleted at
connectivity::OSQLParseNodesContainer::clearAndDelete() at
connectivity/source/parse/sqlnode.cxx:2781
connectivity::OSQLParser::parseTree(rtl::OUString&, rtl::OUString
const&, bool)
(this=0x38eba90, rErrorMessage="syntax error, unexpected UNION,
expecting $end", rStatement="CREATE VIEW \"View1\" AS SELECT
\"Tab1\".\"Name\" AS \"Name1\", \"Tab1\".\"Geburtsdatum\" AS
\"Geburtsdatum1\", 1 AS \"MonatZahl1\",
COALESCE(\"Tab1\".\"MonatZaehler\",999) AS \"MonatZaehler1\", 'Januar'
AS \"Monat1\", \"Tab2"..., bInternational=false)
    at workdir/YaccTarget/connectivity/source/parse/sqlbison.cxx:10914
namespace)::parseStatement_throwError(connectivity::OSQLParser&,
rtl::OUString const&,
com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&)
(_rParser=..., _rStatement="CREATE VIEW \"View1\" AS SELECT
\"Tab1\".\"Name\" AS \"Name1\", \"Tab1\".\"Geburtsdatum\" AS
\"Geburtsdatum1\", 1 AS \"MonatZahl1\",
COALESCE(\"Tab1\".\"MonatZaehler\",999) AS \"MonatZaehler1\", 'Januar'
AS \"Monat1\", \"Tab2"..., _rxContext=uno::Reference to
(dbaccess::OSingleSelectQueryComposer *) 0x38eb8d0)
    at dbaccess/source/core/api/SingleSelectQueryComposer.cxx:106

and then again at
std::unique_ptr<connectivity::OSQLParseNode,
std::default_delete<connectivity::OSQLParseNode>
>::operator=(decltype(nullptr))
(this=0x38eba90) at connectivity/source/parse/sqlnode.cxx:1500

Change-Id: I292627a06369208e0010743063c7eb5a38921a19
Reviewed-on: https://gerrit.libreoffice.org/77106
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-07 20:12:52 +02:00
Andrea Gelmini 05ed7654f8 Slight reformatting
Change-Id: I0f372656e58338f5292938576f40822061338e70
Reviewed-on: https://gerrit.libreoffice.org/71631
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-02 08:06:19 +02:00
Arkadiy Illarionov 31f96c3e0d Simplify containers iterations in connectivity
Use range-based loop or replace with STL functions

Change-Id: I1f7c1ea19cdc8d450b7ed88a663ba9ccb3249304
Reviewed-on: https://gerrit.libreoffice.org/68974
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-09 18:31:12 +01:00
Noel Grandin d425658bd9 pass OSQLParseNode around by unique_ptr
Change-Id: I8ffb9e04614472c3645d24bebdc88f91059d12ad
Reviewed-on: https://gerrit.libreoffice.org/65436
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-21 08:26:15 +01:00