summaryrefslogtreecommitdiff
path: root/connectivity
AgeCommit message (Collapse)AuthorFilesLines
2018-08-01loplugin:returnconstant in connectivityNoel Grandin12-60/+32
Change-Id: I291bebbd644095d6632841abe56c4f28b84e228d Reviewed-on: https://gerrit.libreoffice.org/58427 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-29replace double checked locking patternsJochen Nitschke1-11/+3
with thread safe static initialization Change-Id: I7b102e8a6aec64b0795f5fa915276ffc1f568d0a Reviewed-on: https://gerrit.libreoffice.org/58288 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-29remove unused variableJochen Nitschke1-2/+0
Change-Id: I22454ef597e679439f6c5b71866022c90823a690 Reviewed-on: https://gerrit.libreoffice.org/58260 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-28Restore the accidentally overwritten array value in ODatabaseMetaDataMuhammet Kara1-2/+2
Seems like there was a copy/paste/programming error in baaa43446f5661177b4900f260bba313883c4032 Change-Id: I9cb9ee816f274457d6632064bdbff926565f906d Reviewed-on: https://gerrit.libreoffice.org/57793 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr>
2018-07-28loplugin:stringloop basctl,chart2,connectivityNoel Grandin4-15/+15
Change-Id: I21353dace60705d55b3d70f1e0bc610d55b84d63 Reviewed-on: https://gerrit.libreoffice.org/58210 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-27Remove unused iterators from MQueryHelper.cxx and mork_helper.cxxMuhammet Kara2-3/+3
Leftover from 8d3d04ef588b5 Change-Id: I4ab7c7eccc8165bdfadba792f2ef8ccf1e52c1c3 Reviewed-on: https://gerrit.libreoffice.org/58138 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-27use OUStringBuffer in some loopsNoel Grandin2-6/+6
Change-Id: Ib32fb5ddc04df1c090f9d7b319e4ff9be0c285f9 Reviewed-on: https://gerrit.libreoffice.org/58007 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-27connectivity: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann3-26/+0
...by removing explicitly user-provided functions that do the same as their implicitly-defined counterparts, but may prevent implicitly declared copy functions from being defined as non-deleted in the future. (Even if such a user-provided function was declared non-inline in an include file, the apparently-used implicitly-defined copy functions are already inline, so why bother with non-inline functions.) Change-Id: Idb59d19dcf5e0873780959797daeb438cbb38ae7 Reviewed-on: https://gerrit.libreoffice.org/58072 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-26Remove unused local variable 'aResultNode'Muhammet Kara1-1/+0
Change-Id: I8a240176fb3a446a8f17efd258ef5136cc44c139 Reviewed-on: https://gerrit.libreoffice.org/57980 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr>
2018-07-26loplugin:returnconstant in tools,comphelper,unotoolsNoel Grandin1-12/+12
Change-Id: Iabc3c67b4cdcd0344a37c533bf92dd00cd4700d8 Reviewed-on: https://gerrit.libreoffice.org/57974 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-16Add missing sal/log.hxx headersGabor Kelemen59-0/+62
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from connectivity to cui Change-Id: I9903c10d0a04bbeb93d0f776d1d252b152459499 Reviewed-on: https://gerrit.libreoffice.org/57408 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-06connectivity: turn on clang-format for the Writer driverMiklos Vajna13-216/+196
I (tried to) keep this consistent locally with astyle in the past, switching to clang-format means consistency is enforced by CI. Change-Id: I1016e253c6536b207a05328e5f6f13de37889588 Reviewed-on: https://gerrit.libreoffice.org/57046 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-07-02loplugin:constantparamNoel Grandin1-3/+2
Change-Id: I9fbfa6163c1d4650c52b00dc911972f07fe7c0e5 Reviewed-on: https://gerrit.libreoffice.org/56778 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-14tdf#118112: Use ParameterNameSubstitution for MysqlJulien Nabet1-0/+15
Change-Id: Ic48aee378d0a89466c49de85baa96a3bea127d2f Reviewed-on: https://gerrit.libreoffice.org/55771 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-06-08look for unnecessary calls to Reference::is() after an UNO_QUERY_THROWNoel Grandin3-12/+7
Since the previous call would throw if there was nothing to be assigned to the value. Idea from tml. Used the following script to find places: git grep -A3 -n UNO_QUERY_THROW | grep -B3 -F 'is()' Change-Id: I36ba7b00bcd014bdf16c0455ab91056f82194969 Reviewed-on: https://gerrit.libreoffice.org/55417 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-06-05tdf#42949 remove unused compheler includes ..Jochen Nitschke53-51/+7
and fix the fallout Change-Id: I15bc5d626f4d157cbc69a87392078b41e621d14e Reviewed-on: https://gerrit.libreoffice.org/54882 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-28tdf#117446: FB mig, (VAR)BINARY, fix memory managementJulien Nabet1-1/+8
By default, 8000 bytes are allocated for VARBINARY The pb is we can need more. See https://bugs.documentfoundation.org/show_bug.cgi?id=117446#c6 Change-Id: I0ef5811dc01a587491bd9345129d1a41a4d9f095 Reviewed-on: https://gerrit.libreoffice.org/54863 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-05-28tdf#96099 Remove some trivial typedef std::vectorArkadiy Illarionov1-3/+0
Change-Id: I41fff78c10d46bde50063536d8cf1a3942dbf6af Reviewed-on: https://gerrit.libreoffice.org/54834 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2018-05-27Fix typosAndrea Gelmini1-1/+1
Change-Id: I907e5dbcd7c62344c2c76fe2fdaf1b18ecfecee1 Reviewed-on: https://gerrit.libreoffice.org/54838 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2018-05-25Improve re-throwing of UNO exceptionsNoel Grandin13-16/+57
(*) if we are already throwing a Wrapped*Exception, get the exception using cppu::getCaughtexception. (*) when catching and then immediately throwing UNO exceptions, use cppu::getCaughtException to prevent exception slicing (*) if we are going to catch an exception and then immediately throw a RuntimeException, rather throw a WrappedTargetRuntimeException and preserve the original exception information. Change-Id: Ia7a501a50ae0e6f4d05186333c8517fdcb17d558 Reviewed-on: https://gerrit.libreoffice.org/54692 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-17loplugin:redundantcast improvements for floating-integer conversionsStephan Bergmann1-2/+2
Change-Id: I63dbf18f144a792ae775fe6706da81657f790016 Reviewed-on: https://gerrit.libreoffice.org/54416 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-05-14fix typoRene Engelhard2-1/+1
the header is already ParameterSubstitution.hxx... Change-Id: I13239681fbdee6d79aae67f7b7291fe5f7ee78ee Reviewed-on: https://gerrit.libreoffice.org/54333 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Rene Engelhard <rene@debian.org>
2018-05-10move Java from config_features to already existing config_javaRene Engelhard1-1/+1
Change-Id: I085fab2bcdc5910d1386fc20768fe7063ce3e28e Reviewed-on: https://gerrit.libreoffice.org/54071 Reviewed-by: Rene Engelhard <rene@debian.org> Tested-by: Rene Engelhard <rene@debian.org>
2018-05-09Fix some IWYU warningsMiklos Vajna2-2/+27
Change-Id: Iab61e0a7cac2dc89e6b04875a62894b181aa0ff4 Reviewed-on: https://gerrit.libreoffice.org/54016 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-07loplugin:useuniqueptr in OPreparedStatementNoel Grandin2-8/+10
Change-Id: Iea0a8c92bbf7820b5f9e2ab79e7df662e8280b2d Reviewed-on: https://gerrit.libreoffice.org/53865 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-07loplugin:useuniqueptr in OResultSetNoel Grandin2-4/+4
Change-Id: I8fb228a34710b73ed387458dab882e085125925b Reviewed-on: https://gerrit.libreoffice.org/53867 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-07loplugin:useuniqueptr in OCommonStatementNoel Grandin3-5/+5
Change-Id: I79f1322dff544ae6251a5a20e4553c6a2baa6fda Reviewed-on: https://gerrit.libreoffice.org/53866 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-07loplugin:useuniqueptr in MQueryHelperNoel Grandin2-16/+9
Change-Id: Ic76213b5bfa31310d8633ac7a8db7e4cc9020710 Reviewed-on: https://gerrit.libreoffice.org/53864 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-07loplugin:useuniqueptr in OFileTableNoel Grandin3-19/+11
Change-Id: I74f21220b71703a18d1ae85f5f50397355304153 Reviewed-on: https://gerrit.libreoffice.org/53863 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-04loplugin:useuniqueptr in connectivity::OSortIndexNoel Grandin7-20/+19
Change-Id: Ie403862020e8fd1eba96d753e33e9fe5b556f949 Reviewed-on: https://gerrit.libreoffice.org/53764 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-03make createStream_simpleError return std::unique_ptrNoel Grandin7-21/+13
Change-Id: Ifb10f9806eeb3a54f8ed11ec0e65f9465cac3c5d Reviewed-on: https://gerrit.libreoffice.org/53765 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-28loplugin:countusersofdefaultparamsNoel Grandin1-1/+1
Change-Id: I84868b3115c534a8240394283cc3beedf8cb3a80 Reviewed-on: https://gerrit.libreoffice.org/53543 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-25use more thread safe static initializer in postgresql driverJochen Nitschke10-314/+168
Change-Id: Idb210207112994e1247c35e0dce1c6cd2f80f371 Reviewed-on: https://gerrit.libreoffice.org/53365 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-22Iceweasel and Icedove are dead…Adolfo Jayme Barrientos1-1/+1
… since 2016 and 2017, respectively. Change-Id: Ic4e501ceee198d9a802e7a5e7732fda3b899a8cb
2018-04-18tdf#117081: show Firebird by defaultXisco Fauli1-6/+1
Change-Id: I4247b86cdbe332bd6c529b075174e3657fbfa9e1 Reviewed-on: https://gerrit.libreoffice.org/53090 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2018-04-17remove no longer necessary operator new/delete overridesNoel Grandin8-72/+0
and use "using" statements for the places where the overrides were resolving ambiguities Change-Id: Icb1d1a41f19e00f28a19947aa2c40bd5778fff94 Reviewed-on: https://gerrit.libreoffice.org/52993 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-17loplugin:constparamsNoel Grandin2-2/+2
Change-Id: I3d1b88dbd0ff73fddc08d52f50e0efb42daab89b Reviewed-on: https://gerrit.libreoffice.org/52756 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-15remove some unused comphelper includesJochen Nitschke28-29/+0
and fix the fallout Change-Id: I5d0c2040f57a3ac354a7e277592da31d09a5f359 Reviewed-on: https://gerrit.libreoffice.org/52894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-04-14Revert HSQLDB related unit testsTamas Bunth3-214/+8
Revert changes making HSQLDB related unit tests test Firebird migration. They should still test the HSQLDB driver. It reverts part of 159dd28651788a19848eae56693ad06ed947414d Change-Id: If2b9207e95055418bd1dc1dc6e472335de311d1e Reviewed-on: https://gerrit.libreoffice.org/52873 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-04-14tdf#105075 Firebird: Support Limit of query_GUITamas Bunth1-0/+20
Firebird uses "SELECT FIRST <num> ..." format to limit the number of result row numbers instead of "SELECT ... LIMIT <num>" My first approach was to improve OSQLParser and make it understand the Firebird dialect. But it is hard because the parser has hard-coded getChild(int) calls all over the code and all the indexes should be updated. Instead of this, we recognise the LIMIT keyword with the parser, remove it and push the FIRST <num> part manually right after SELECT. All of this should happen in case of Firebird and only when using the query-GUI. Change-Id: I53f3f977f77cf98b91b25a7eaa6ebb2ee8ac0951 Reviewed-on: https://gerrit.libreoffice.org/52591 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Jenkins <ci@libreoffice.org>
2018-04-14Fix typosAndrea Gelmini1-1/+1
Change-Id: Ia9b7550d7abc703fb94d2ff5e84a6bf3d39074ec Reviewed-on: https://gerrit.libreoffice.org/52789 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-04-12Revert "Remove dead HSQLDB driver"Sophia Schröder44-2/+4246
We cannot silently convert user data or their used file formats and then await them to accept it or reinstall an older version. Let us make a soft change instead of an hard (heart) break and avoid us to been attacked with fire and forks from our users. This reverts commit 8d381ae8d6c742a7e15bf7ad9e07b65f81728ef6. Change-Id: Ia153640935e355771acb85cf652f8fe4c21fafbb Reviewed-on: https://gerrit.libreoffice.org/52731 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-04-11new loplugin:unusedvariablemoreNoel Grandin2-11/+1
collection of heuristics to look for local variables that are never read from i.e. do not contribute to the surrounding logic This is an expensive plugin, since it walks up the parent tree, so it is off by default. Change-Id: Ib8ba292241bd16adf299e8bba4502cb473513a06 Reviewed-on: https://gerrit.libreoffice.org/52450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-11Fix typosAndrea Gelmini1-1/+1
Change-Id: I7fd04d0e09fcbf6d9f2a5ec617f23e08f7bc5fa3 Reviewed-on: https://gerrit.libreoffice.org/52697 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-04-10Remove dead HSQLDB driverTamas Bunth44-4246/+2
Change-Id: Id4cfb69079f0150c9cca2626c16df7fab441d916 Reviewed-on: https://gerrit.libreoffice.org/52611 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-04-08SQL string quoting: escape "'" character also at beginning of stringLionel Elie Mamane1-1/+1
Change-Id: I51db43c1a3b6d3c93a04a3419238ea286cab987e Reviewed-on: https://gerrit.libreoffice.org/52575 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2018-04-07dbaccess: Enable hsql migration by defaultTamas Bunth6-13/+219
Also make Firebird driver not experimental anymore. With hsql migration enabled, the hsqldb related unit tests can be reused, because the underlying DBMS is transparent. To achieve that, I added firebird_sdbc component to hsqldb CppunitTest_* files. This commit also contains fixes for upcoming bugs while migrating from hsqldb to firebird, shown by hsqldb related unit tests: - null values: in case of null values, the setNull method should be used instead of nothing. (malformed string otherwise) Remove DBACCESS_HSQL_MIGRATION environment variable, since migration is default from now on. JunitTest_dbaccess_complex was based on HSQLDB. This commit replaces "if exists" hsql specific solution with firebird specific. Also disable test for queries with named parameters. Change-Id: Ieb68f5ad3a11389599c4f268ea4df82a83643b82 Reviewed-on: https://gerrit.libreoffice.org/52008 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-04-07tdf#96099: replaced trivial typedef OStringVectorkowther6-17/+16
Change-Id: Id6f9fff6b0c4c2c8cd3528d86b58ee39cee47364 Reviewed-on: https://gerrit.libreoffice.org/52524 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2018-04-03new loplugin:dbgunhandledexceptionNoel Grandin1-1/+1
enforce that DBG_UNHANDLED_EXCEPTION is called first in a catch block, otherwise it cannot do it's job properly Change-Id: I906436c6861212c44f8f21552ccbceb54f15c6e1 Reviewed-on: https://gerrit.libreoffice.org/52303 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-03coverity#1433773 Useless callCaolán McNamara1-6/+0
Change-Id: I8d9ff2495f9db573a6f3d1dc40e43dfba3ba8271 Reviewed-on: https://gerrit.libreoffice.org/52295 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>