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>
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
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>
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>
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
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
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>
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>
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>
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>
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>
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>
...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>
...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>