summaryrefslogtreecommitdiff
path: root/connectivity
AgeCommit message (Collapse)Author
2019-08-25Fix build on big-endian platforms with clangMike Kaganski
Reportedly, this builds OK with gcc, but not with clang (rightfully). /tmp/usr/ports/editors/libreoffice/work/libreoffice-6.3.0.4/connectivity/source/drivers/odbc/OTools.cxx:148:21: error: arithmetic on a pointer to void _pValue += _nSize - properSize; ~~~~~~~ ^ 1 error generated. The pointer arithmetics on void* was introduced in 2012 in commit 63b6b1d6120d82c4baf5cb679d75dcc5427dbbc3. Change-Id: I78beddeda8bc516e45dd2a99dba8c7b8b1cf9255 Reviewed-on: https://gerrit.libreoffice.org/78076 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-08-24loplugin:returnconstval in connectivity..cuiNoel Grandin
Change-Id: Ie6444713088c14d1821640f6eb219cee3d6ee542 Reviewed-on: https://gerrit.libreoffice.org/78056 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-23Mark move ctors/assignments noexceptMike Kaganski
This should enable using move semantics where possible e.g. in standard containers. According to https://en.cppreference.com/w/cpp/language/move_constructor: To make strong exception guarantee possible, user-defined move constructors should not throw exceptions. For example, std::vector relies on std::move_if_noexcept to choose between move and copy when the elements need to be relocated. Change-Id: I6e1e1cdd5cd430b139ffa2fa7031fb0bb625decb Reviewed-on: https://gerrit.libreoffice.org/77957 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-08-22loplugin:constmethod in connectivityNoel Grandin
Change-Id: Idd81089279b23d93276107d84446c77e49d42b77 Reviewed-on: https://gerrit.libreoffice.org/77933 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-20Fix typosAndrea Gelmini
Change-Id: Iac38284daf0196d6a7f29aaa6e2103c1d76d7cc4 Reviewed-on: https://gerrit.libreoffice.org/77755 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-19loplugin:constvars in chart2..connectivityNoel Grandin
Change-Id: I35d450b022af870df4e57714363892554a4ae917 Reviewed-on: https://gerrit.libreoffice.org/77722 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-17tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorJulien Nabet
in connectivity Change-Id: I00eeffd9a13cfad6bbf84ea2d4ab720eb8c45ed8 Reviewed-on: https://gerrit.libreoffice.org/77635 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-17tdf#125340 transport preferred dialog parent down the migration dialogCaolán McNamara
Change-Id: Icb7bab35eac3ae08fb82d73f559ef161dd1820c3 Reviewed-on: https://gerrit.libreoffice.org/77606 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-16use more TOOLS_WARN_EXCEPTIONNoel Grandin
Change-Id: Ic21ea11ff106e0732bb8fa600ef39a549d7bda86 Reviewed-on: https://gerrit.libreoffice.org/77569 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-15loplugin:sequenceloop in basic..cuiNoel Grandin
Change-Id: I15d825de3201808d188b461415f78a4d81b64127 Reviewed-on: https://gerrit.libreoffice.org/77494 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-15replace ".get->" with "->"Noel Grandin
Change-Id: I327a6fda1fe0170da33e06b735f09a39421c8a58 Reviewed-on: https://gerrit.libreoffice.org/77469 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-10loplugin:stringconstant (macOS)Stephan Bergmann
Change-Id: Icb9d9e1cd21e2506e36fe40a3b93b6a2521a868c Reviewed-on: https://gerrit.libreoffice.org/77239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-07tdf#126588 crash in saving viewNoel Grandin
regression from commit d425658bd9fd8e315e4931afb544bc845da0360e Date: Wed Dec 19 16:10:51 2018 +0200 pass OSQLParseNode around by unique_ptr We have a OSQLNode being deleted at connectivity::OSQLParseNodesContainer::clearAndDelete() at connectivity/source/parse/sqlnode.cxx:2781 connectivity::OSQLParser::parseTree(rtl::OUString&, rtl::OUString const&, bool) (this=0x38eba90, rErrorMessage="syntax error, unexpected UNION, expecting $end", rStatement="CREATE VIEW \"View1\" AS SELECT \"Tab1\".\"Name\" AS \"Name1\", \"Tab1\".\"Geburtsdatum\" AS \"Geburtsdatum1\", 1 AS \"MonatZahl1\", COALESCE(\"Tab1\".\"MonatZaehler\",999) AS \"MonatZaehler1\", 'Januar' AS \"Monat1\", \"Tab2"..., bInternational=false) at workdir/YaccTarget/connectivity/source/parse/sqlbison.cxx:10914 namespace)::parseStatement_throwError(connectivity::OSQLParser&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&) (_rParser=..., _rStatement="CREATE VIEW \"View1\" AS SELECT \"Tab1\".\"Name\" AS \"Name1\", \"Tab1\".\"Geburtsdatum\" AS \"Geburtsdatum1\", 1 AS \"MonatZahl1\", COALESCE(\"Tab1\".\"MonatZaehler\",999) AS \"MonatZaehler1\", 'Januar' AS \"Monat1\", \"Tab2"..., _rxContext=uno::Reference to (dbaccess::OSingleSelectQueryComposer *) 0x38eb8d0) at dbaccess/source/core/api/SingleSelectQueryComposer.cxx:106 and then again at std::unique_ptr<connectivity::OSQLParseNode, std::default_delete<connectivity::OSQLParseNode> >::operator=(decltype(nullptr)) (this=0x38eba90) at connectivity/source/parse/sqlnode.cxx:1500 Change-Id: I292627a06369208e0010743063c7eb5a38921a19 Reviewed-on: https://gerrit.libreoffice.org/77106 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-05tdf#39593 Drop connectivity::sdbcx::ODescriptor::getImplementationArkadiy Illarionov
Replace with comphelper::getUnoTunnelImplementation. Change-Id: Ia08561c11872a4ede9077863f81040633c30aebc Reviewed-on: https://gerrit.libreoffice.org/76914 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-01mysqlc: Add test for textual blob typesTamas Bunth
Test setting and querying the following data types: TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT Test them using prepared statements. Change-Id: I43387034ad8c32c3731cde70a22cc8b3dd652b78 Reviewed-on: https://gerrit.libreoffice.org/76747 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2019-07-31mysqlc: getTablePrivileges not implemented, so..Tamas Bunth
it should throw an exception. Reviewed-on: https://gerrit.libreoffice.org/60460 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 19f8ea668833a4dc90244792cbf91881b0ca9a07) Change-Id: I32b0b5dde0bcfd8cc59d0814a9f35d43c0f58ae1 Reviewed-on: https://gerrit.libreoffice.org/76750 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-31Fix typosAndrea Gelmini
Change-Id: I3a877a8eb0babb9d04ac9750494576869481c8db Reviewed-on: https://gerrit.libreoffice.org/76763 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): connectivityStephan Bergmann
Change-Id: I80dab66757b1f541d448a642a5ecddc876f55c7b Reviewed-on: https://gerrit.libreoffice.org/76689 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-31mysqlc: Support reading blob as stringTamas Bunth
Change-Id: I1ef0c3817bc255e7f0c38aca73c475b19d5d7d9b Reviewed-on: https://gerrit.libreoffice.org/76600 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2019-07-31tdf#123591: truncate and round to 'scale' number of decimal placesXisco Fauli
otherwise the number will be incorrectly converted to OUString if scale < number of decimals See https://bugs.documentfoundation.org/show_bug.cgi?id=123591#c25 Change-Id: Ie32c9c6ab339d6907e9a4e2645d6f19bad9e67c8 Reviewed-on: https://gerrit.libreoffice.org/75727 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-07-29mysqlc: Fix query of cursor position in result setTamas Bunth
Fix queries like "IsAfterLast" in result sets of prepared statements in the mysql driver. Cursor position is stored in the driver, since the mysql C driver does not support the query of the cursor position. The cursor position works the following way: - 0 means the cursor is on "BeforeFirst". In that state calling of getXXX() methods is user error. - 1 means the first row is already fetched. - n means the last fow is fetched, where n is the total number of rows in the result set. - Everything bigger than n is "AfterLast" Change-Id: I131f2042606897019cc0f868dbc4151faf4850ac Reviewed-on: https://gerrit.libreoffice.org/76549 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2019-07-25Fix typosAndrea Gelmini
Change-Id: I1efccb8b926e4aa10e9ccee7e8e36919e38c05fc Reviewed-on: https://gerrit.libreoffice.org/76339 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-07-24cid#1448360 Assignment of overlapping memoryCaolán McNamara
Change-Id: Ifefa007ff7534e65cc35cdbcb4983012b36ed6e0 Reviewed-on: https://gerrit.libreoffice.org/76248 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-20Fix typosAndrea Gelmini
Change-Id: Icefd5a9e2a8bd929caa486c4cf3283925237d707 Reviewed-on: https://gerrit.libreoffice.org/75980 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-07-19loplugin:referencecasting in comphelper..connectivityNoel Grandin
Change-Id: I21896885c29e9ab58ebab17b59f1480c6a06fb38 Reviewed-on: https://gerrit.libreoffice.org/75936 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-19cid#1448480 Uncaught exceptionCaolán McNamara
Change-Id: Ied9ff9ea5d8b40c52e20c10f709836a193d5e940 Reviewed-on: https://gerrit.libreoffice.org/75896 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-13tdf#123150: Firebird: set UTF-8 client connectionTamas Bunth
There are two options related to character sets when attaching or creating a database with the C API: - isc_dpb_lc_ctype: Sets the character set of the connection between the Firebird server and the Client (which is the sdbc driver in that case). That is required in order to pass UTF 8 literals correctly. - isc_dpb_set_db_charset: Sets the default character set of the database itself. It has the same effect as the following SQL statement: ALTER DATABASE SET DEFAULT CHARACTER SET <Charset> We need to set both of them to UTF-8. Change-Id: Ia9e5a4b87a3997c084be8abb68c2de813fbd631b Reviewed-on: https://gerrit.libreoffice.org/75557 Reviewed-by: Tamás Bunth <btomi96@gmail.com> Tested-by: Tamás Bunth <btomi96@gmail.com>
2019-07-13tdf#123591: Firebird: Fix setting double valuesTamas Bunth
Handle numerical and decimal values separately. In order to do that we have to indentify the exact type first. That can be achieved using sqltype and sqlsubtype in Firebird API. Change-Id: Ie664dead51bae5522ee53009cda1cddbe0d64b16 Reviewed-on: https://gerrit.libreoffice.org/75525 Reviewed-by: Tamás Bunth <btomi96@gmail.com> Tested-by: Tamás Bunth <btomi96@gmail.com>
2019-07-10tdf#121528: Firebird stores scale as a negative numberXisco Fauli
Change-Id: Ic301952aeef93d3035b04442e70705d08f45f95d Reviewed-on: https://gerrit.libreoffice.org/75357 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Jenkins
2019-07-10tdf#123591: Firebird: take decimal places into account...Xisco Fauli
when copying values from Calc to Base Change-Id: I5dc645e3e9b153f71f2027a205815aaf83c1d6d3 Reviewed-on: https://gerrit.libreoffice.org/75346 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Jenkins
2019-07-02Slight reformattingAndrea Gelmini
Change-Id: I0f372656e58338f5292938576f40822061338e70 Reviewed-on: https://gerrit.libreoffice.org/71631 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-25improve loplugin:simplifyconstructNoel Grandin
Change-Id: If863d28c6db470faa0d22273020888d4219e069e Reviewed-on: https://gerrit.libreoffice.org/74559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-24tdf#39593 Change comphelper::getImplementation signatureArkadiy Illarionov
To merge with comphelper::getUnoTunnelImplementation Change-Id: I976d768d7fb159d50fa90e27ec36f2bea91ea2cb Reviewed-on: https://gerrit.libreoffice.org/74542 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-19connectivity, oox: remove some unused includesMiklos Vajna
Change-Id: I8b39caafc157e309e638eec1a66d9302f1a11a73 Reviewed-on: https://gerrit.libreoffice.org/74307 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-06-18loplugin:passstuffbyrefNoel Grandin
Change-Id: Icb7c22cf4ac95eab54d04e79312fb471ca27bceb Reviewed-on: https://gerrit.libreoffice.org/74246 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-14loplugin:logexceptionnicely in configmgr..connectivityNoel Grandin
Change-Id: I1cf8250dba63b744f882e54e9eb572884f292975 Reviewed-on: https://gerrit.libreoffice.org/74020 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-12Resolves: tdf#125878 correct calculation of H:M:S from timestampEike Rathke
This apparently has been wrong since the beginning in 2009. It's a somewhat odd algorithm anyway, first calculating the time in seconds, minutes and hours, but maybe there's a reason regarding rounding, so not changing that. Change-Id: I855d2c96094b4edb1095d20bcdfebdea6d6d943a Reviewed-on: https://gerrit.libreoffice.org/73893 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-06-11Fix typoAndrea Gelmini
Change-Id: I2ad6228e21dd51be90a289cc438cf640d453d8d7 Reviewed-on: https://gerrit.libreoffice.org/73788 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-10Use hasElements to check Sequence emptiness in chart2..connectivityArkadiy Illarionov
Similar to clang-tidy readability-container-size-empty Change-Id: I41824e8a4ef38d6a35a0ac4421cffcbcd17308e1 Reviewed-on: https://gerrit.libreoffice.org/71802 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-03mysqlc: Add support for mysql type INT24Tamas Bunth
Which is mapped to sal_Int32. Change-Id: Ibf12e92a20034440fa990ed0c6f1196f4ca3f40f Reviewed-on: https://gerrit.libreoffice.org/73217 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-06-01tdf#43157 Clean up OSL_VERIFY (replace with SAL_WARN)Jens Carl
Replace OSL_VERIFY with if-statement and SAL_WARN. Change-Id: Iccc7e079d9f8778060bbebba3f8e9204fc351d8e Reviewed-on: https://gerrit.libreoffice.org/73289 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-05-31connectivity: fix memory leaks caused by OConnection::acquire()Michael Stahl
Followup to 58f121ef2e680697e10453add43bab9b771d153a; OConnection must not be held by rtl::Reference as that creates a cycle. (regression from 497e40ad03c27837978551ba15491c3fb2a0bf53) Change-Id: Ibd56d335e3e2631c5a57ea435f1035e89868a5a6 Reviewed-on: https://gerrit.libreoffice.org/73155 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-05-29tdf#43157 Clean up OSL_VERIFY (replace with SAL_WARN)Jens Carl
Replace OSL_VERIFY with if-statement and SAL_WARN. Change-Id: Ib5459a365231514efa0e8a33a880857378cd239e Reviewed-on: https://gerrit.libreoffice.org/73121 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-22New loplugin:dataStephan Bergmann
...following up on 1453c2c8f13bac64ecd1981af7cebf1c421808ac "prefer vector::data to &vector[0]" Change-Id: I7c113747d92d144a521d49b89384dd8bf1215c01 Reviewed-on: https://gerrit.libreoffice.org/72765 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-22tdf#122538: add index appendix for hsqldbJulien Nabet
Regression from https://cgit.freedesktop.org/libreoffice/core/commit/?id=3208fcb3a36d75d6290d9c548430682f153b09db Change-Id: I8f85f0a5838df87671ecb9bdb5751b7ec43c09ea Reviewed-on: https://gerrit.libreoffice.org/72701 Tested-by: Jenkins Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2019-05-14tdf#43157 Clean up OSL_VERIFY (replace with SAL_WARN)Jens Carl
Replace OSL_VERIFY with if-statement and SAL_WARN. Change-Id: Icf6a0b81aca489b25520c9f6837d1b482179cad5 Reviewed-on: https://gerrit.libreoffice.org/72155 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-13fix wrong SET/QUERY flags passed to uno::ReferenceNoel Grandin
By creating deleted methods for the wrong calls. Avoids the compiler needing to construct a temporary Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a Reviewed-on: https://gerrit.libreoffice.org/72103 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-12regenerate PCH headersLuboš Luňák
Change-Id: I4894023e42cbfa32916ee3ddfb2cfb5426cfc69f Reviewed-on: https://gerrit.libreoffice.org/72195 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-05-10an is used before a vowel soundCaolán McNamara
not before vowels with a consonant sound so its a url not an url Change-Id: Ic27ff3bee67469284d460c31ced6f63cb3633db2 Reviewed-on: https://gerrit.libreoffice.org/72062 Reviewed-by: Jens Carl <j.carl43@gmx.de> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-09Clean up makefile (remove some cargo-cult copied stuff)Jens Carl
Change-Id: Iafbb69a405a3c9ee8d0ae7dbe8a24a75d237519d Reviewed-on: https://gerrit.libreoffice.org/71924 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>