Age | Commit message (Collapse) | Author |
|
Change-Id: I5a25e8b7bdbb4de411d5aa5313d409a4c0beb24b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106839
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
|
|
Change-Id: I6800e23ead2767d245d5da71d2d40e0f8a6d7e1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106859
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I0d20cf793df61c4d893ddb2c732118f1d36cfd29
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106894
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I9f37f6abfe7d923f8ca0a2d4fd5b699d7034f9f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106901
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
bt here:
https://bugs.documentfoundation.org/attachment.cgi?id=166782
some explanations here:
https://bugs.documentfoundation.org/show_bug.cgi?id=137745#c8
Change-Id: I1d9dc8d2e3ad7e3e36c4687cb9b2c5990f2d2c8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106715
Tested-by: Jenkins
Reviewed-by: Lionel Mamane <lionel@mamane.lu>
|
|
Change-Id: If973cc337e0674462cfe2a15e347881a861a761f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106697
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ieddc3cc1913e57f51d270cead97b1eadaa81fc6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106507
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I6fc8b3b550c113b7b0f807bedbfc0e02b59cd719
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106506
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I20e4bdefdf8f05bbe1ac547a16e8d5e06e3303eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106501
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
which means that some call sites have to change to use
unicode string literals i.e. u"foo" instead of "foo"
Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Idf412dc5f235230512160cb4fb7e1a00baa1cfa7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106085
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
xBlob->length() returns sal_Int64 not sal_Int32
so deal with it in:
- OResultSet::getBytes
- ODatabaseMetaData::getColumns
and warn if blob is more than SAL_MAX_INT32
also rename xDescriptionBlob into xBlob
Change-Id: Ib79930c4c8fb00b1682c9a9530a3dee9b040e7ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106029
Tested-by: Jenkins
Reviewed-by: Lionel Mamane <lionel@mamane.lu>
|
|
with Form or Report image controls.
Implements getBytes at least when LONGVARBINARY corresponds to a BLOB
Change-Id: I7e4e99b537333558d5c3dcd172dc54e73472553b
Change-Id: I86c20310235fb4902633fab058066a1f2d62a600
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105899
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I2c2f170c19663002637c702e9168c19c067ebbc2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105656
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
|
|
...to "Find functions that take rtl::O[U]String parameters that can be
generalized to take std::[u16]string_view instead." (Which in turn can avoid
costly O[U]String constructions, see e.g. loplugin:stringview and subView.)
Some of those functions' call sites, passing plain char string literals, needed
to be adapted when converting them.
Change-Id: I644ab546d7a0ce9e470ab9b3196e3e60d1e812bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105622
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Add new methods "subView" to O(U)String to return substring views
of the underlying data.
Add a clang plugin to warn when replacing existing calls to copy()
would be better to use subView().
Change-Id: I03a5732431ce60808946f2ce2c923b22845689ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105420
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
found by grepping and changed by hand.
Change-Id: I3c720859dba430fde3abc76c6c5cb58269efaf4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105512
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
In addition, deal too with:
- SQL_INT64
- SQL_FLOAT
- SQL_BOOLEAN
Change-Id: I542fbedcb01f1967a4d5d482cbb2edf7ed3bf757
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105434
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I7552b65022b725c6e87fef61478dc6e9c4322559
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105376
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: Iac1e7802dbe1efa01c2befdd10406231788d4fc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105315
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
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>
|