summaryrefslogtreecommitdiff
path: root/connectivity/source
AgeCommit message (Collapse)Author
2022-05-27ofz#46526 AbrtCaolán McNamara
Change-Id: Iaec536b0989c4ec11b39b1534c7798e46715d7a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132710 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-01-17Missing includes for libstdc++ 12Stephan Bergmann
(for std::unique_ptr, with recent libstdc++ 12 trunk) Change-Id: I61b7823dd740ea7cdfe0d7403a50ac73b24d1c4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120229 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 43542cc07ee110abe25a1e176238fd6d921d593b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128447 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-01-10tdf#146432: fix crash with REGEXP_REPLACE() executed in query editor to MariaDBJulien Nabet
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 Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128220
2021-12-27tdf#130595: Parameter query with :parameter IS NULL doesn't workJulien Nabet
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/+/127572 Reviewed-by: Lionel Mamane <lionel@mamane.lu> Tested-by: Jenkins
2021-12-27Related tdf#130595: SQL_NULL means pVar->sqldata = nullptrJulien Nabet
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/+/127568 Reviewed-by: Lionel Mamane <lionel@mamane.lu>
2021-12-19Regression from e01786898406130aa81eadc32f7bc2fad65c5344Julien Nabet
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/+/127054 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-17tdf#137101: fix e_book_client_connect_direct_sync signature in EvolutionJulien Nabet
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/+/126920
2021-12-13Fix regression in connectivity/evoab2Julien Nabet
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> (cherry picked from commit 80eb86b7e697751d24ca12310e6b6e23a1bb54cf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126682
2021-11-26stldebug assert in bad sort of postgresql schemasCaolán McNamara
/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/+/125726 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-09-27do some sanity checks on the number of records claimedCaolán McNamara
while retaining the fix of #i83401# to recovered a broken case Change-Id: I283c45b10aaa24004a34bfe6faee517d4a443b98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122543 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit cea0753e18171bf9bcdd857535b20e6ed02222f5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122445 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-09-27ofz#39304 short timestamp recordCaolán McNamara
Change-Id: I8f783473dd5d4679846c7c866cd1853ef7d919fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122633 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-09-27ofz#39301 month has to be in range [1-12]Caolán McNamara
Change-Id: I5a4ca534b24098342d8f465a32bc1887f40f5b63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122635 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-09-24EOF isn't an error from SvStream::GetError perspectiveCaolán McNamara
Change-Id: Ib2bc2c35d78d92728d592676def300e28a8b9e2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122442 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-09-24check if headersize is greater than available dataCaolán McNamara
Change-Id: I5d78da49436c7dfbe7cfb50e52549b61abc00ee9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122444 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-09-24check claimed number of records against max possible with available dataCaolán McNamara
Change-Id: I50d9354da00137c64c83970eb66792b37d7e545a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122443 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-09-15Adapt to Bison 3.8 internal yyn -> yyrule renameStephan Bergmann
see <https://git.savannah.gnu.org/cgit/bison.git/commit/?id=f30067ed51f23802fc91761ede1506dfa72b2865> "glr2.cc: log the execution of deferred actions" including "Rename argument yyn as yyrule for clarity." YYBISON was defined as 1 rather than as a representation of the Bison version prior to <https://git.savannah.gnu.org/cgit/bison.git/commit/?id=21c147b6e5372563b7c4741deadaddb9354f4b09> "yacc.c: provide the Bison version as an integral macro", which shouldn't be a problem here. And YYBISON is apparently completely undefined with /usr/bin/bison on macOS. (The preceding comment always mentioned "yyi" and "yyrmap" in apparent mismatch with the actually used "yyn" and "yyr1" ever since c25ec0608a167bcf1d891043f02273761c351701 "initial import", so just leave it untouched.) Change-Id: I4f901407aa21ed4abec84e661d813ee7599f02f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122082 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 45227d9b79dc4f2a2aa6874cd4e3c02b7934b197) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122069 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-09-14tdf#117842: use XUnoTunnel to get wrapped connection reliablyMike Kaganski
XDataDefinitionSupplier::getDataDefinitionByConnection may take not only direct reference to expected connection type, but also connectivity::OConnectionWeakWrapper wrapping it. Change-Id: I88925f9403b51f0cf13f02b5f00d3765a242230e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121890 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit ccc6c846eb7f6d334d0ab2e6b50c188c434caa19) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121986 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-09-13tdf#115547: Fix DB path handlingMike Kaganski
1. The code used wrong procedure to convert file URLs to local paths. It assumed that it's enough to just strip the leading 'file://', which is only sometimes true on Unix-like systems; on Windows, this converts a valid 'file:///C:/path/file.ext' to '/C:/path/file.ext', where the leading slash is then treated as a network path, resulting in errors. 2. It is incorrect to assume the same length for UTF-16 and UTF-8 encoded URLs coming from untrusted source (like user file). It may contain non-ASCII characters (be an IRL), and then the assumption would fail. Change-Id: Ie2ea6c8cb9a690975db956fa025bf926a8010984 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121885 Reviewed-by: Lionel Mamane <lionel@mamane.lu> Tested-by: Jenkins (cherry picked from commit 51269c4d28c04ebd2c0047772b7373e0bebec219) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121983 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-09-10tdf#120129: don't forget to update buffer size to actual lengthMike Kaganski
Otherwise extra bytes get written to the resulting string from the too long buffer. Change-Id: Iccde16b8002f214df6f86f484f288ec464c6b674 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121872 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 541ddf4580cac8c3f9590be26a487f5fc8e2553c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121874 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-09-02tdf#144230: sanitize string length embedded in SQL_VARYING dataMike Kaganski
It is unclear why the length may be wrong; but at least be safe to avoid buffer overruns. Wrt the validity of sqllen here: see SQLDAMetadata::scatterData in firebird's src/yvalve/why.cpp. Change-Id: Icc24c1cc0db66c20732188ab0621cde53c1ba5c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121458 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 2e5dad443a30055d93dbcb3bf9cac906e80b2e25) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121462 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-08-16Related tdf#143895: Mysql MEDIUMINT is DataType::INTEGER not DataType::SMALLINTJulien Nabet
Change-Id: I324b18cc164cb2f38b7b8411c557c6c208e8d69d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120536 Reviewed-by: Lionel Mamane <lionel@mamane.lu> Tested-by: Jenkins (cherry picked from commit 997ff7166ceca0a5af80297a0e789af2ff0c6617) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120447
2021-06-11Simplify vector initializationsJulien Nabet
Change-Id: Icf8972be204799e9b3b3824ab18d8584911fe1c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117061 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-06-10update firebird modelinesCaolán McNamara
with solenv/bin/add-modelines -p connectivity/source/drivers/firebird because a bunch are missing the trailing ones Change-Id: I168c22586744cd666e6c18a569e143b6caccd421 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116963 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-09-Werror,-Wunused-but-set-variable (Clang 13 trunk)Stephan Bergmann
...ever since the code's introduction in c25ec0608a167bcf1d891043f02273761c351701 "initial import". Lets assume that the accompanying comment, also present since the "initial import", describes what was actually intended, and augment it with a "TODO". Change-Id: If94a3b72533459d02b1155653b5093c32f034e27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116834 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-06-09-Werror,-Wunused-but-set-variable (Clang 13 trunk)Stephan Bergmann
The only read of aParamterName in the OOperandParam ctor had been commented out and marked "todo" ever since at least 8b1efd34bf563a1a8de9d7e78e52cdab8086cb38 "moved from ..\..\parse", so lets clean all of that effectively dead code away completely for now, and just leave a comment for later. Change-Id: Ia5ee51cd6c45e8bc50bdd4e892ed0a4dfdc690a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116839 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-06-08Simplify Sequences initializations (comphelper+connectivity)Julien Nabet
Change-Id: I8a91f4bd2a1117acb571f1058af18071bc058c9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116815 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-06-03Simplify some initializations in connectivity (2)Julien Nabet
Change-Id: Iacbd1ccc58ebe6ef0a434e7334bc393d3457f889 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116638 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-05-28no need to allocate these on the heapNoel Grandin
Change-Id: Ic1a1577ed837d3fa2b7b99474f4cee30300628f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116290 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-27VisualStudio 16.10 doesn't like this constructionNoel Grandin
Change-Id: Idfef618b43735c48c9132d2fb932bc3bcb2ffe9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116250 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-26Fix DISABLE_DYNLOADING unused variableJan-Marek Glogowski
Change-Id: Ie8305364971f324bd834ae6bec851637ca60b9e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116118 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-05-19loplugin:noexcept (clang-cl)Stephan Bergmann
Change-Id: Ife669f959358992b547b408ab5d1f6bf1c1d14bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115744 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-17Simplify some initializations in connectivityJulien Nabet
Change-Id: I980b59f06fb6004ba23279c8364cb0587e7ac8fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115679 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-05-17Directly initialize maps in ADatabaseMetaDataResultSet.cxxJulien Nabet
Change-Id: I40d88f6b538c1c38589b8cadc8c174ffa6754940 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115599 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-05-14Directly initialize vector in connectivity (part 3)Julien Nabet
Change-Id: Ie7f74a3f0fa865994057575b3dfac2bc209c6793 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115631 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-05-14Directly initialize vector in connectivity (part 2)Julien Nabet
Change-Id: I4dc9862a30fc584e600d2952d1110a1ebbcd160d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115611 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-05-14Directly initialize vector in connectivity (part 1)Julien Nabet
Change-Id: I3b0bf1ca710aba58d7d649687b5d791374be8d6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115610 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-05-14Directly initialize ODatabaseMetaDataResultSet in CDatabaseMetaData.cxxJulien Nabet
Change-Id: I32af6d9c699689b688d996c56fd5f64c5ed2f71d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115608 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-05-04loplugin:noexcept (macOS)Stephan Bergmann
Change-Id: Ib8951e9590d70ffecf8fd6af3070ef9c6d4ae151 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115044 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-29loplugin:stringadd simplify some *StringBuffer operationsNoel Grandin
pulled from a larger patch which I created with a more permissive variant of this plugin Change-Id: I7abf1f3f09e84703b6e0e52fe9587dff691b2187 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114875 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-28use string_view in INetURLObject::encodeNoel Grandin
Change-Id: Ib686c6872388b02c8939d3b65f6bd25cda348bc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114754 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-27loplugin:stringadd convert chained append to +Noel Grandin
which can use the more efficient *StringConcat Also fix a crash in stringview plugin which started happening while I working on this. Change-Id: I91a5b9b7707d1594d27d80b73930f5afac8ae608 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114568 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-22no need to create temporaries when appending number to O[U]StringBufferNoel Grandin
Change-Id: I36d82423b5f75010552696a66cec7e53ee265ce4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114395 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-22no need makeStringAndClear() when appending to bufferNoel Grandin
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-20use OUString::Concat here, not OUStringLiteralNoel Grandin
Change-Id: Ia2172bcab60f32c9d9d4f6ca0230484343eef69b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114321 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-15loplugin:stringliteralvar look for assignmentsNoel Grandin
to O[U]String from char array literals, we can convert the char literals to O[U]StringLiteral and avoid a runtime allocation Change-Id: I15d8dddb2cd428b90740e39f20daf98e0941aa6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-08lok: remove event listener when disposingHenry Castro
In order to prevent that the event listener holds the object reference count when removed, ensure they are removed when disposing the object. Change-Id: I7cb4cb7d87acfc9610c2498760ade531456fe22e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113493 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2021-04-02Simplify some static variable initializationsMike Kaganski
Change-Id: I6cdd44aa66b9597ccc51fc3fd69b57485ccb3230 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113515 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-27tdf#141115 semi-userfriendly message on UNION query on file driverLionel Elie Mamane
Rather than silently returning only the first (left) part of the UNION, error out. Change-Id: I6ed1eba55ad33f149d9010933a3c7a835fce0451 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113207 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Lionel Mamane <lionel@mamane.lu> Tested-by: Jenkins
2021-03-27tdf#141115: correctly find the ORDER BY clause of a UNIONLionel Elie Mamane
instead of blindly assuming a SELECT is not a UNION, leading to an out-of-bounds array access when it is. Change-Id: I8f904ae65acba8d8ee23b95299058207af68c0ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113189 Reviewed-by: Lionel Mamane <lionel@mamane.lu> Tested-by: Jenkins