Age | Commit message (Collapse) | Author |
|
It generated requests like:
CHAR CHARACTER SET OCTETS (100)
instead of:
CHAR(100) CHARACTER SET OCTETS
Change-Id: If32723a99d1ca40c765d89b527ec633cc17cf72b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105157
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
In Firebird, BLOB and CLOB are both "BLOB" types but can be distinguished with SUB_TYPE
- BINARY for BLOB
- TEXT for CLOB ("C" = "Character" -> Text)
To deal with this, the enum "BlobSubtype" has been created in connectivity/source/drivers/firebird/Util.hxx
it contains:
- Blob = 0
- Clob = 1
but also
- Image = -9546
This last one is to deal with LONGVARBINARY which doesn't exist in Firebird
It has been added with:
see https://cgit.freedesktop.org/libreoffice/core/commit/?id=0217031a98508731f15df9d361a6e5b584db5716)
When creating a table, Tables::createStandardColumnPart was adding SUB_TYPE part in request part but only when creating table
not when altering table.
So let's deal with subtypes in the 2 mappings:
- ODatabaseMetaData::getTypeInfo from DatabaseMetaData.cxx
- ColumnTypeInfo::getColumnTypeName from Utils.cxx
and let's remove the SUB_TYPE wrong management part from Tables::createStandardColumnPart
Also, BINARY and VARBINARY were wrongly mapped since they should be respectively:
- CHAR CHARACTER SET OCTETS
- VARCHAR CHARACTER SET OCTETS
It also showed that DataType::VARBINARY was missing in ColumnTypeInfo::getColumnTypeName() change from my previous commit
see: https://cgit.freedesktop.org/libreoffice/core/commit/?id=5b33b1a6b0f251202e89cef436efd4719c3fc0c4
Change-Id: I5589fd4f781671076f534865cfe9d30943738fd2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105107
Reviewed-by: Lionel Mamane <lionel@mamane.lu>
Tested-by: Jenkins
|
|
OTableController::alterColumns() from dbaccess/source/ui/tabledesign/TableController.cxx
checks if a column changes with:
if((nType != pField->GetType() ||
sTypeName != pField->GetTypeName() ||
etc
See https://opengrok.libreoffice.org/xref/core/dbaccess/source/ui/tabledesign/TableController.cxx?r=585cefd1#1002
So for example for "BLOB" field, LO was comparing "SQL_BLOB" from "sTypeName" with "BLOB" from "pField->GetTypeName()"
In the same way, LO was comparing "SQL_LONG" from "sTypeName" with "INTEGER" from "pField->GetTypeName()"
or "SQL_VARYING" from "sTypeName" with "VARCHAR" from "pField->GetTypeName()"
Change-Id: I3632f3ee5845b4f07d606fddd586951a3deea67f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104979
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: Ia66e31a0ad71dde1a6c1caa911d6083e1fb9eb61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104538
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
|
|
Change-Id: I65167999c6049038f8f5d530a0c5cb0552ab0e06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104609
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...after 1ebeacb20ad0165e399629fcfd7795ad0da3edf8 "Extend loplugin:cstylecast to
certain function-style casts"
Change-Id: I99bd383f5b3bee861d442d2e1be6ecd356b78315
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104523
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...in Windows-only code, after c927aab29ebfff1ce3ac0b2f27ae343025a9890c "Make
the OUString ctors taking raw sal_Unicode pointer/non-const array explicit".
Interestingly, these occurrences were accepted by MSVC and only cause errors
with clang-cl, so happened to go unnoticed until now.
Change-Id: I33e7653e28a21541ef793b4b0750abb6037752db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104314
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Id83c478af5d04ad548c7cf4239fe2fb3ee154dc9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103861
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I8b5cde993c13e0b7c8c830b1ff698933a6b7cfd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103863
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I0572af758a98f2b417b35960403778c8cb2edcaf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103857
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ia70d4963fb892120cc8f79597b46a8fe67b540a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103762
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ie49207b659214163f2f57051ac8f9de02fab36c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103735
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
since vector is used with:
line 59: typedef std::vector< FieldSort > SortDescriptor;
Change-Id: If6b6bfe4d4a162f5993522cf72fedb5da89e8457
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103518
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: Ib4a334ad929a410d6a19d1f832b202d61cd29336
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103384
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
do more like
commit 121771e37f7e2de41cd5643475861062bf25627b
Date: Mon Sep 21 09:17:54 2020 +0200
Make some OUStringLiteral vars constexpr
cause coverity can live with that
Change-Id: I9efd7f848289c4865997a44c6780373068422227
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103147
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I41a204fbc5e2c9b819fb948c5288f8d7b4195489
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103117
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
...from which an OUString can cheaply be instantiated. This is the OUString
equivalent of 4b9e440c51be3e40326bc90c33ae69885bfb51e4 "Turn OStringLiteral into
a consteval'ed, static-refcound rtl_String". Most remarks about that commit
apply here too (this commit is just substantially bigger and a bit more
complicated because there were so much more uses of OUStringLiteral than of
OStringLiteral):
The one downside is that OUStringLiteral now needs to be a template abstracting
over the string length. But any uses for which that is a problem (e.g., as the
element type of a container that would no longer be homogeneous, or in the
signature of a function that shall not be turned into a template for one reason
or another) can be replaced with std::u16string_view, without loss of efficiency
compared to the original OUStringLiteral, and without loss of expressivity.
The new OUStringLiteral ctor code would probably not be very efficient if it
were ever executed at runtime, but it is intended to be only executed at compile
time. Where available, C++20 "consteval" is used to statically ensure that.
The intended use of the new OUStringLiteral is in all cases where an
object that shall itself not be an OUString (e.g., because it shall be a
global static variable for which the OUString ctor/dtor would be detrimental at
library load/unload) must be converted to an OUString instance in at least one
place. Other string literal abstractions could use std::u16string_view (or just
plain char16_t const[N]), but interestingly OUStringLiteral might be more
efficient than constexpr std::u16string_view even for such cases, as it should
not need any relocations at library load time. For now, no existing uses of
OUStringLiteral have been changed to some other abstraction (unless technically
necessary as discussed above), and no additional places that would benefit from
OUStringLiteral have been changed to use it.
Global constexpr OUStringLiteral variables defined in an included file would be
somewhat suboptimal, as each translation unit that uses them would create its
own, unshared instance. The envisioned solution is to turn them into static
data members of some class (and there may be a loplugin coming to find and fix
affected places). Another approach that has been taken here in a few cases
where such variables were only used in one .cxx anyway is to move their
definitions from the .hxx into that one .cxx (in turn causing some files to
become empty and get removed completely)---which also silenced some GCC
-Werror=unused-variable if a variable from a .hxx was not used in some .cxx
including it.
To keep individual commits reasonably manageable, some consumers of
OUStringLiteral in rtl/ustrbuf.hxx and rtl/ustring.hxx are left in a somewhat
odd state for now, where they don't take advantage of OUStringLiteral's
equivalence to rtl_uString, but just keep extracting its contents and copy it
elsewhere. In follow-up commits, those consumers should be changed
appropriately, making them treat OUStringLiteral like an rtl_uString or
dropping the OUStringLiteral overload in favor of an existing (and cheap to use
now) OUString overload, etc.
In a similar vein, comparison operators between OUString and std::u16string_view
have been added to the existing plethora of comparison operator overloads. It
would be nice to eventually consolidate them, esp. with the overloads taking
OUStringLiteral and/or char16_t const[N] string literals, but that appears
tricky to get right without introducing new ambiguities. Also, a handful of
places across the code base use comparisons between OUString and OUStringNumber,
which are now ambiguous (converting the OUStringNumber to either OUString or
std::u16string_view). For simplicity, those few places have manually been fixed
for now by adding explicit conversion to std::u16string_view.
Also some compilerplugins code needed to be adapted, and some of the
compilerplugins/test cases have become irrelevant (and have been removed), as
the tested code would no longer compile in the first place.
sal/qa/rtl/strings/test_oustring_concat.cxx documents a workaround for GCC bug
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96878> "Failed class template
argument deduction in unevaluated, parenthesized context". That place, as well
as uses of OUStringLiteral in extensions/source/abpilot/fieldmappingimpl.cxx and
i18npool/source/localedata/localedata.cxx, which have been replaced with
OUString::Concat (and which is arguably a better choice, anyway), also caused
failures with at least Clang 5.0.2 (but would not have caused failures with at
least recent Clang 12 trunk, so appear to be bugs in Clang that have meanwhile
been fixed).
Change-Id: I34174462a28f2000cfeb2d219ffd533a767920b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102222
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...assuming they were not chosen deliberately to cut of the input string at a
potential embedded NUL (or for whatever other arcane reason).
(This change is a prerequisite for making the OUString ctor taking a raw pointer
explicit.)
Change-Id: I0f029ac8c7851e3722ec2e9e2e003c22d3453e6a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102078
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Iaab26ade1109daf732e58a2f3741cc43243e374c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102023
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: If51bf7143116721e8f16272cf8aff797651d5ed1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101880
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
O[U]StringView had an odd mixture of uses. For one, it was used like
std::[u16]string_view, for which directly using the latter std types is clearly
the better alternative. For another, it was used in concatenation sequences,
when neither of the two leading terms were of our rtl string-related types.
For that second use case introduce O[U]String::Concat (as std::[u16]string_view
can obviously not be used, those not being one of our rtl string-related types).
Also, O[U]StringLiteral is occasionally used for this, but the planned changes
outlined in the 33ecd0d5c4fff9511a8436513936a3f7044a775a "Change OUStringLiteral
from char[] to char16_t[]" commit message will make that no longer work, so
O[U]String::Concat will be the preferred solution in such use cases going
forward, too.
O[U]StringView was also occasionally used to include O[U]StringBuffer values in
concatenation sequences, for which a more obvious alternative is to make
O[U]StringBuffer participate directly in the ToStringHelper/O[U]StringConcat
machinery.
Change-Id: I1f0e8d836796c9ae01c45f32c518be5f52976622
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101586
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
It passed "make check" on Linux
Change-Id: Id0ebc90cf8029efc543344615333c522a7c0fc4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101621
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
It passed "make check" on Linux
Change-Id: Ia3674e3b3a979223bb88a7828c372cf666978c04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101609
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...instead of OUString::getStr followed by implicit
OUString(sal_Unicode const *) ctor
Change-Id: I54e29e8adc3548a8d070fec813fea478fe3f6bf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101574
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
This is a prerequisite for making conversion from OUStringLiteral to OUString
more efficient at least for C++20 (by replacing its internals with a constexpr-
generated sal_uString-compatible layout with a SAL_STRING_STATIC_FLAG refCount,
conditionally for C++20 for now).
For a configure-wise bare-bones build on Linux, size reported by `du -bs
instdir` grew by 118792 bytes from 1155636636 to 1155755428.
In most places just a u"..." string literal prefix had to be added. In some
places
char const a[] = "...";
variables have been changed to char16_t, and a few places required even further
changes to code (which prompted the addition of include/o3tl/string_view.hxx
helper function o3tl::equalsIgnoreAsciiCase and the additional
OUString::createFromAscii overload).
For all uses of macros expanding to string literals, the relevant uses have been
rewritten as
u"" MACRO
instead of changing the macro definitions. It should be possible to change at
least some of those macro definitions (and drop the u"" from their call sites)
in follow-up commits.
Change-Id: Iec4ef1a057d412d22443312d40c6a8a290dc6144
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101483
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I786548bef39fa711aabcff32b592b3fdc4a6f9fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101486
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I9385704bea54ff504457f7ac1ec39ed98cfdaf97
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101276
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I40897e88fba67ea845578e0db7782c20a4f17806
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101196
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
...in those places that used some code conditional on ENABLE_LTO to work around
(non-)unreachability wranings. This removes all uses of the ENABLE_LTO C/C++
macro, so it can go completely.
Change-Id: I67544986cb2d3fcd8051caf87c5129bd1086408c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101087
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I6a300169d33bdc36e4c7e720a7afc336a86eea68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100962
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I683175c1e788a2a4cfec9504dc8dc3ebfee7c5de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100858
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
look for expressions like
!(a && !b)
which can be expanded out
Change-Id: I72515a9638762b050f9a258c08da39ebfa2ef8e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100579
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iea6b931b1f2328886354f70ad81a3e07367db717
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100669
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: I6745f281924573140b02c5f7e5b7174cd9661134
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100631
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I6b3b6ef1530a192f4b6bf87aa9688687063683ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100591
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I6560756eb63856a22b43e3e65a7b7843cd2d5376
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100447
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
"bitwise operation between different enumeration types ('CommandTypeEnum' and
'ExecuteOptionEnum')", but where <https://docs.microsoft.com/en-us/sql/ado/
reference/ado-api/execute-method-ado-connection?view=sql-server-ver15> documents
parameter Options as "A Long [...] Can be a bitmask of one or more
CommandTypeEnum or ExecuteOptionEnum values."
Change-Id: If000490127e7215863ea750a3f9f30e69916978e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100070
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
with expressions like !(a && b)
Change-Id: Id2acec2a8d0eaaa8e5e37dbd2cae7281be36572e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100040
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
See tdf#74608 for motivation
Change-Id: I707b0e506aa152ec104e677dc09968c2dc1ac9fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98422
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I2e915762aca653acb7f9e1b322459f83297a997f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99786
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I9af7e2fa0a450ebe396c0f049831a20100dbdc9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99659
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
See tdf#74608 for motivation.
Change-Id: I7cc971c7a99950a05804ae73f132c68e0c5a0625
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99186
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
See tdf#74608 for motivation.
Change-Id: I27bfc55d401fb1a9b9c33309f4b1f00ec13a92fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99212
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I337a1da87aaacc82240622de4bd0090f87c72298
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98999
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
|
|
Change-Id: I4f7999672ba15d9f453ded9accb3991b8150c32d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98905
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ibc1ec64cba8eb083aaff28848a42337cc597ea19
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98857
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
See tdf#74608 for motivation.
Change-Id: Ib621b48f9c542a8cdeea6d7627770784abbd44fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98689
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
See tdf#74608 for motivation.
Change-Id: Ibac6bae417b664f9132ddc7d6dd539a85da28674
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98686
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
See tdf#74608 for motivation.
Change-Id: I80d9c854640073038d1a4d79997111912d924f69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98685
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
See tdf#74608 for motivation.
Change-Id: Id268f9780400e5d0940f378cd8ee91f86662bf55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98684
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|