Age | Commit message (Collapse) | Author |
|
Since HSQLDB already worked, just do the same.
Change-Id: I44929cf36179cc3cdff6e61f05899c9a913c78b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131442
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131447
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Change-Id: I150cd0f021aeb1aefe411f19dfcac111ac35b295
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130555
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
Change-Id: Iddd7438161ead93b27cf8e8058ca5b1eae3d8001
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127075
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia794fd97bb70b1e33385517971a174430d11cab7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126117
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Change-Id: I047d2366ad80eca701924cb0f66b6b1bcfdcac5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129565
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
|
|
Change-Id: I78783056659a26cc8139d74eefc225de1a11ca7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129011
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
(cherry picked from commit 0adff3f2476f797843fb62d6810de90bfb333e10)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129067
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
The hack worked by accident as long as the internal index
constants didn't change. Which was the case with
commit f7d0c6b42a0a5ec98876006cd5048589219be741
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
(cherry picked from commit 0d6ab8d4ea7226db53d07dc158e176fe962fd8d9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128527
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Lionel Mamane <lionel@mamane.lu>
|
|
Several issues to deal with:
1) The initial pb:
"Error setting the source criteria. The column XXX must be visible as a column. SQL status: 01000, Error code 1000."
=>
OEvoabResultSetMetaData::getColumnLabel was returning the nickname of the column with g_param_spec_get_nick
we just want the column name to display and to use
2) SQL parsing in OCommonStatement::orderByAnalysis
2 "sub-issues":
a) ENSURE_OR_THROW was testing SQL_ISRULE( pAscDesc, opt_asc_desc )
opt_asc_desc is defined in connectivity/source/parse/sqlbison.y with:
opt_asc_desc:
{$$ = SQL_NEW_RULE;}
| SQL_TOKEN_ASC
| SQL_TOKEN_DESC
;
not sure if it should be kept but for DESC I had to use this:
SQL_ISTOKEN(pAscDesc, DESC)
b) Retrieve of ascending
By default ascending is at true but then we tested the node with:
if ( ( pAscDesc->count() == 1 ) && SQL_ISTOKEN( pAscDesc->getChild( 0 ), DESC )
But when we use DESC, it's directly a TOKEN so just this should suffice:
bool bAscending = !SQL_ISTOKEN(pAscDesc, DESC);
3) CompareContacts wasn't taking into account bAscending
since we use comparison function for g_slist_sort_with_data, I only used
int nOrder = 1;
// if descending sort, reverse order
if (!sortCol.bAscending)
nOrder = -1;
and multiply the result with this to have the ad hoc order
Change-Id: I3c360a5ef9cf0dc737a7ce4a138d2d2586abdca9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126698
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
(cherry picked from commit ab864bd178a44208c98a2fd1b1248df5f1db1fc9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126967
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
|
|
See https://bugs.documentfoundation.org/show_bug.cgi?id=146471#c1
for full explanations
Change-Id: Ie75669cf951429654ff8e6c28508b9fee2ee03bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127715
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
(cherry picked from commit 13de0ade50bec34be612ba4a3196c2efd9ce3b4e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127584
Reviewed-by: Lionel Mamane <lionel@mamane.lu>
Tested-by: Jenkins
|
|
See bt here:
https://bugs.documentfoundation.org/attachment.cgi?id=177292
Noticing:
warn:legacy.osl:7697:7697:connectivity/source/drivers/mysqlc/mysqlc_general.cxx:188: mysqlToOOOType: unhandled case, falling back to VARCHAR
I found REGEXP_REPLACE returned a MYSQL_TYPE_LONG_BLOB and some locations should be taught about it.
Also, let's also deal with MYSQL_TYPE_TINY_BLOB and MYSQL_TYPE_MEDIUM_BLOB
Change-Id: Ib7fd6ef747ce1b1851c788d2bb5a1d4ec673aee1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127919
(cherry picked from commit e43573aae0fa07d170fb042b7184156c851c1f77)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127952
Reviewed-by: Lionel Mamane <lionel@mamane.lu>
Tested-by: Jenkins
|
|
Thank you Krzysztof Hałasa for the patch!
Change-Id: Ib7532a716b7e0fa73f309e0a4f9af9e663e0d3df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127673
Reviewed-by: Lionel Mamane <lionel@mamane.lu>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Jenkins
(cherry picked from commit 0143ec4d3d56eeee7edf16371c1d3c3981890b71)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127786
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Problematic SQL here:
SELECT * FROM "Table1" WHERE "Name" = :name OR :name IS NULL
Firebird considers there are 2 parameters.
When providing an empty string, no pb, OPreparedStatement::setNull is called which is ok for both parameters
When providing a non empty string, we go to OPreparedStatement::setString. For first param no pb
but for second param, sql type is SQL_NULL so it must be taken into account
See https://www.firebirdsql.org/file/documentation/html/en/refdocs/fblangref25/firebird-25-language-reference.html#fblangref25-datatypes-special-sqlnull
for full details
Change-Id: I80dff259d85957e8547c098e4c48b642cce26804
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127571
Reviewed-by: Lionel Mamane <lionel@mamane.lu>
Tested-by: Jenkins
|
|
Fix this assertion:
0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
1 0x00007fcc7f2b2536 in __GI_abort () at abort.c:79
2 0x00007fcc7f2b241f in __assert_fail_base
(fmt=0x7fcc7f418998 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x7fcc614a5de7 "false", file=0x7fcc614b3542 "/home/julien/lo/libreoffice/connectivity/source/drivers/firebird/Util.cxx", line=346, function=<optimized out>) at assert.c:92
3 0x00007fcc7f2c1212 in __GI___assert_fail
(assertion=0x7fcc614a5de7 "false", file=0x7fcc614b3542 "/home/julien/lo/libreoffice/connectivity/source/drivers/firebird/Util.cxx", line=346, function=0x7fcc614b3865 "void connectivity::firebird::mallocSQLVAR(XSQLDA *)") at assert.c:101
4 0x00007fcc6149c715 in connectivity::firebird::mallocSQLVAR(XSQLDA*) (pSqlda=0x5bca950) at connectivity/source/drivers/firebird/Util.cxx:346
5 0x00007fcc61470722 in connectivity::firebird::OPreparedStatement::ensurePrepared() (this=0x5bc6a10) at connectivity/source/drivers/firebird/PreparedStatement.cxx:110
6 0x00007fcc614714df in connectivity::firebird::OPreparedStatement::getMetaData() (this=0x5bc6a10) at connectivity/source/drivers/firebird/PreparedStatement.cxx:147
7 0x00007fcc6147165d in non-virtual thunk to connectivity::firebird::OPreparedStatement::getMetaData() () at connectivity/source/drivers/firebird/PreparedStatement.cxx:154
8 0x00007fcc66694776 in dbaccess::OPreparedStatement::getMetaData() (this=0x5bc6cc0) at dbaccess/source/core/api/preparedstatement.cxx:178
9 0x00007fcc6669480d in non-virtual thunk to dbaccess::OPreparedStatement::getMetaData() () at dbaccess/source/core/api/preparedstatement.cxx:179
10 0x00007fcc667711bd in dbaccess::OSingleSelectQueryComposer::getColumns() (this=0x5bb99f0) at dbaccess/source/core/api/SingleSelectQueryComposer.cxx:824
Change-Id: I285c9bcd0b1fd059994d339ae4d419dec516f220
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127551
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
(cherry picked from commit abaf2b4ac7faada914885d95c49b554f576d7cee)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127567
Reviewed-by: Lionel Mamane <lionel@mamane.lu>
|
|
author Julien Nabet <serval2412@yahoo.fr> 2021-05-14 18:46:57 +0200
committer Julien Nabet <serval2412@yahoo.fr> 2021-05-14 23:09:11 +0200
commit e01786898406130aa81eadc32f7bc2fad65c5344 (patch)
tree 6852a41ac21a081114f51f5c0272249eb5f962d6
parent be96aa21aed3069775609780566541b3631cbbe1 (diff)
Directly initialize vector in connectivity (part 3)
Change-Id: Ib4097b3425e07de73abbc47ffefebb06b1458308
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127053
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
since it changed in 2015, see all details from tdf#137101
Thank you to krumelmonster for having spotted this!
+ some cleanup to remove all eds_check_version calls
and dependencies
Change-Id: Iaf2437f8f5c04ab9674a380dac1dfb16ec8c7201
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126898
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 0661c796c767802c114441ad9a17fd0979d72ef4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126929
|
|
Regression from 46d3e84d7a131f7c72cb536ab2f314cb55ffc155
Directly initialize vector in connectivity (part 2)
Pinpointed thanks to this log:
warn:dbaccess:612118:612118:dbaccess/source/core/dataaccess/connection.cxx:344: DBG_UNHANDLED_EXCEPTION in OConnection exception: com.sun.star.sdbc.SQLException message: Invalid descriptor index. /home/julien/lo/libreoffice/connectivity/source/commontools/dbexception.cxx:365 SQLState: 07009 ErrorCode: 0
wrapped: void message: /home/julien/lo/libreoffice/tools/source/debug/debug.cxx:104
when launching Base then connecting to Evolution local.
Change-Id: Id4cb0fc322b0df24ed2b2d89a5595f4841db1845
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126672
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Change-Id: I247aeceaa4100295beec8107385d2ae28765dde8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126054
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 7e79b8c933516daed62382d0d60c34653ebedc4d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126094
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
/usr/bin/../lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/debug/safe_iterator.h:305:
In function:
__gnu_debug::_Safe_iterator::reference
__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<rtl::OUString
*, std::__cxx1998::vector<rtl::OUString>>, std::vector<rtl::OUString>,
std::forward_iterator_tag>::operator*() const [_Iterator =
__gnu_cxx::__normal_iterator<rtl::OUString *,
std::__cxx1998::vector<rtl::OUString>>, _Sequence =
std::vector<rtl::OUString>, _Category = std::forward_iterator_tag]
Error: attempt to dereference a past-the-end iterator.
Objects involved in the operation:
iterator "this" @ 0x0x7fffffff75a8 {
type = __gnu_cxx::__normal_iterator<rtl::OUString*, std::__cxx1998::vector<rtl::OUString, std::allocator<rtl::OUString> > > (mutable iterator);
state = past-the-end;
references sequence with type 'std::__debug::vector<rtl::OUString, std::allocator<rtl::OUString> >' @ 0x0x7fffffff7d10
}
Thread 1 "soffice.bin" received signal SIGABRT, Aborted.
a problem since...
commit 5cbb6631e6d4c1000bff936712b4bd4aafbe04d5
Date: Fri Mar 4 13:01:57 2016 +0100
pgsql-sdbc: factorise common code
Change-Id: I7f7794e93224dfa946a7b5970c458fc3030fab73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125799
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I6b2528c684fe56a114959a1d26101a882eee2106
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125759
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
This patch fixes my previous commit. It changes use of sal_uInt32 to
sal_Int32 as it suits better here.
Change-Id: Ia92e5eee70dbf00009321481e8be8ddd7c9b138e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125737
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
The suitable type for variable nIndex is determined by knowing that
the return type of the detectNumberFormat() is sal_uInt32, and the
second parameter for the getNumberFormatType() is also sal_uInt32.
Change-Id: I6578eba05f151ee31eb8eb8142d70f8f5c7c702b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125696
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
|
|
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>
|
|
in favour of the existing get*() methods.
The get*() methods 0 or false or empty in the case of "null", which
is exactly the same behaviour as the conversion methods.
These implicit conversion methods cause lookup problems when combined
with some upcoming OUString changes.
And the code looks cleaner this way too, and has less magic when calling
methods.
Change-Id: Ieb4756bf693e83b996a32667fc1b955f89193496
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125690
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
also teach about:
TINYBLOB + LONGBLOB + TINYTEXT + MEDIUMTEXT + YEAR + BIT
Taking a look at libmariadb, I see in libmariadb/mariadb_stmt.c:
535 case MYSQL_TYPE_SHORT:
536 case MYSQL_TYPE_YEAR:
537 int2store(*p, (*(short *)buf));
538 (*p) += 2;
539 break;
1208 case MYSQL_TYPE_SHORT:
1209 case MYSQL_TYPE_YEAR:
1210 stmt->params[i].buffer_length= 2;
1211 break;
1313 case MYSQL_TYPE_SHORT:
1314 case MYSQL_TYPE_YEAR:
1315 *stmt->bind[i].length= stmt->bind[i].length_value= 2;
1316 break;
Change-Id: Id72056429d5d2f2741063ee28b2d2e3c75e378a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125472
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Beware, we just want to display the right info here, BIT management in Mysql/MariaDB
needs some work
There are 2 parts in this patch:
1)
- if (sType.equalsIgnoreAsciiCase("bit") || sType.equalsIgnoreAsciiCase("bool")
- || sType.equalsIgnoreAsciiCase("boolean"))
+ if (sType.equalsIgnoreAsciiCase("bit"))
+ return css::sdbc::DataType::BIT;
+ if (sType.equalsIgnoreAsciiCase("bool") || sType.equalsIgnoreAsciiCase("boolean"))
allows to display BIT instead of DATE when editing the table
2)
- return css::sdbc::DataType::VARCHAR;
+ return css::sdbc::DataType::BIT;
allows to show a checkbox instead of a field where you can type anything when opening the table
Change-Id: Id50882bfab97cc43a1904bfc6eb7256904732bba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125429
Tested-by: Jenkins
Reviewed-by: Lionel Mamane <lionel@mamane.lu>
|
|
Change-Id: I01b7992a5e53dff324208353d8a5196bd16ab0ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125194
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I4d6bcac319a318623837994ec7942ea49ffa125a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125195
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I4df5e2db1c94e5cd29b11d960e3f37dfac3b7ac2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125193
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: Icdadadcaa4c6ee9bdaeb6105a33cf1891279781f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125107
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I87f339b348580e256a8d65470ad15cbdabf2c9dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124609
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: If92f9af5e248f4b066359fe043adf221102e8561
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124353
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I7a180a79dff11816e1504bdd1803102325aa365d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124149
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
look for places where the statements inside a block are
not indented
Change-Id: I0cbfa7e0b6fb194b2aff6fa7e070fb907d70ca2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123885
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Regression from:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=1cf57765dd9a66982ecf9cd33687005a70c70c3f
2021-10-08
loplugin:moveparam in connectivity
Change-Id: Iec0fa1597e63d42ee3a905bf55eff798b3f46177
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123787
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I298f762ac7f3298aa9cb9621ad1f8cae50527b24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123790
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
|
|
Change-Id: I4eb3ca5b1a45e585f076c7e11f616be4614d972a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123662
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
... to avoid hidden cost of multiple COW checks, because they
call getArray() internally.
This obsoletes [loplugin:sequenceloop].
Also rename toNonConstRange to asNonConstRange, to reflect that
the result is a view of the sequence, not an independent object.
TODO: also drop non-const operator[], but introduce operator[]
in SequenceRange.
Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
because it will pre-allocate space and often is optimised to memcpy
Change-Id: I03ed7915f2762d3d27e378638052a47a28bbf096
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123588
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
The scenarios are:
1. Calling sequence's begin() and end() in pairs to pass to algorithms
(both calls use getArray(), which does the COW checks)
2. In addition to #1, calling end() again when checking result of find
algorithms, and/or begin() to calculate result's distance
3. Using non-const sequences in range-based for loops, which internally
do #1
4. Assigning sequence to another sequence variable, and then modifying
one of them
In many cases, the sequences could be made const, or treated as const
for the purposes of the algorithms (using std::as_const, std::cbegin,
and std::cend). Where algorithm modifies the sequence, it was changed
to only call getArray() once. For that, css::uno::toNonConstRange was
introduced, which returns a struct (sublclass of std::pair) with two
iterators [begin, end], that are calculated using one call to begin()
and one call to getLength().
To handle #4, css::uno::Sequence::swap was introduced, that swaps the
internal pointer to uno_Sequence. So when a local Sequence variable
should be assigned to another variable, and the latter will be modified
further, it's now possible to use swap instead, so the two sequences
are kept independent.
The modified places were found by temporarily removing non-const end().
Change-Id: I8fe2787f200eecb70744e8b77fbdf7a49653f628
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123542
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Ifa7c8ff2b21f63d234c29c28303d0bacd376c1e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123434
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...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 1250aecd71fabde4dba990bfceb61bbe8e06b8ea
"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>
|
|
Change-Id: Ie5c2f6ec1573ab2c47218dd4da8c9150b23bcd2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123247
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Add a new option to the database connection wizard to connect to
firebird database server
Change-Id: Ie9c75187347a8532c1d869939c72a6f0a892d861
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122073
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: Ib0c1863c5fed92622b4bd601021a1174cf6ee68d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123213
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Iaf3a64effb69fd82c6303d8fa75723ccc5ced543
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123183
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...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>
|
|
Change-Id: I8bef8e19f066883d5fc731a1c7b7cd85948ae5c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122968
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I3ed657c5c5e6840e38e3c8505505b4b372125df0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122910
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I4c0002e72703eded435bfe4985f5b0121bf8524b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122843
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...in 4c1bf9d7790ca037933c3c6825d48736572a1886 "Make loplugin:bufferadd look
through O[U]String::operator std::[u16]string_view" (thanks to Ming Hua for
spotting it)
Change-Id: I0fa18b0a5c824cb77988edda1ba8971d2ab86366
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122798
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|