summaryrefslogtreecommitdiff
path: root/include/connectivity
AgeCommit message (Collapse)AuthorFilesLines
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel1-1/+1
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>
2020-11-12New loplugin:stringviewparamStephan Bergmann1-3/+7
...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>
2020-07-18compact namespace: connectivityNoel Grandin12-111/+68
Change-Id: I4f7999672ba15d9f453ded9accb3991b8150c32d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98905 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-13tdf#42949 Fix IWYU warnings in include/[a-r]*/*hxxGabor Kelemen3-2/+1
Recheck after 7-0 branchoff Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I7f5c35474b671facbda85a9538462dd4291add91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97655 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-05-13use std::optional for this error fieldNoel Grandin1-3/+4
otherwise when I add source/line to the uno::Exception in an upcoming change, the message becomes non-empty, and hasErrors() return true. I note that we throw SQLException in lots of places without a message, so it is possible that this change will cause us to notice errors we previously missed. Change-Id: Idf7c5b5143e20c992d8d7550043aa2ed875c78b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94108 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-05tdf#122408 make StatementComposer apply HAVING clauseLionel Elie Mamane1-0/+1
Change-Id: I381c918e8cac2800367bc586f8c230d46bcd71e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93448 Tested-by: Jenkins Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2020-05-03use more compact namespace syntax in /includeNoel Grandin1-2/+2
excluding the UDK headers of course Change-Id: Iac7ab83d60265f7d362c860776f1de9d5e444ec0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93268 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-25Typo: *Comparsion* -> *Comparison* in dbaccess/connectivityJulien Nabet1-1/+1
Change-Id: I9dfe37b290dbb83b1dfb2f92669ae254898ee72e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92898 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-03-23make more classes private in mergedlibs modeNoel Grandin2-2/+4
Change-Id: I486922d0652f26fa7ee56f5fe308e19fe5ff137e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90856 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-18simplify ORefVector codeNoel Grandin2-18/+13
by making it extend std::vector - it wants to be a ref-counted vector, so let it be, and we can simplify the usage sites Change-Id: I93ff6ee1522da965e16223dca171401d36fd67b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90664 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-21Drop o3tl::optional wrapperStephan Bergmann1-7/+7
...now that macOS builds are guaranteed to have std::optional since 358146bbbd1b9775c12770fb5e497b6ec5adfc51 "Bump macOS build baseline to Xcode 11.3 and macOS 10.14.4". The change is done mostly mechanically with > for i in $(git grep -Fl optional); do > sed -i -e 's:<o3tl/optional\.hxx>\|\"o3tl/optional\.hxx\":<optional>:' \ > -e 's/\<o3tl::optional\>/std::optional/g' \ > -e 's/\<o3tl::make_optional\>/std::make_optional/g' "$i" > done > for i in $(git grep -Flw o3tl::nullopt); do > sed -i -e 's/\<o3tl::nullopt\>/std::nullopt/g' "$i" > done (though that causes some of the resulting #include <optional> to appear at different places relative to other includes than if they had been added manually), plus a few manual modifications: * adapt bin/find-unneeded-includes * adapt desktop/IwyuFilter_desktop.yaml * remove include/o3tl/optional.hxx * quote resulting "<"/">" as "&lt;"/"&gt;" in officecfg/registry/cppheader.xsl * and then solenv/clang-format/reformat-formatted-files Change-Id: I68833d9f7945e57aa2bc703349cbc5a56b342273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89165 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-10-Werror,-Wnon-c-typedef-for-linkageStephan Bergmann1-2/+2
...with recent Clant trunk, see <https://github.com/llvm/llvm-project/commit/ 7ae1b4a0ce9c7f269cf3069e41496a78e3f28d49> " Implement P1766R1: diagnose giving non-C-compatible classes a typedef name for linkage purposes." Change-Id: Ida0bbe8f4be7845b8663ea3c86e1faf1db7f55a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88349 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-10move some headers inside connectivityNoel Grandin17-993/+3
Change-Id: I9a72a9d59db4f198c2261d41143e3b8344845285 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88202 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-18sal_Char->char in connectivityNoel Grandin5-6/+6
Change-Id: Ie32cbef9b03d69044c401f79bc737cde6dd0ed5d Reviewed-on: https://gerrit.libreoffice.org/85396 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-13loplugin:unusedmethodsNoel Grandin1-19/+0
Change-Id: I8ad75d1251df4d6f8097aaa68e4ec92331e38ad4 Reviewed-on: https://gerrit.libreoffice.org/85077 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-02Simplify SQLError::ParamValue to just o3tl::optional<OUString>Stephan Bergmann1-6/+6
Change-Id: Ib4878218fd758c6462de1841fb98b3ae8839d1ed Reviewed-on: https://gerrit.libreoffice.org/84217 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-01Introduce o3tl::optional as an alias for std::optionalStephan Bergmann1-4/+4
...with a boost::optional fallback for Xcode < 10 (as std::optional is only available starting with Xcode 10 according to <https://en.cppreference.com/w/cpp/compiler_support>, and our baseline for iOS and macOS is still Xcode 9.3 according to README.md). And mechanically rewrite all code to use o3tl::optional instead of boost::optional. One immediate benefit is that disabling -Wmaybe-uninitialized for GCC as per fed7c3deb3f4ec81f78967c2d7f3c4554398cb9d "Slience bogus -Werror=maybe-uninitialized" should no longer be necessary (and whose check happened to no longer trigger for GCC 10 trunk, even though that compiler would still emit bogus -Wmaybe-uninitialized for uses of boost::optional under --enable-optimized, which made me ponder whether this switch from boost::optional to std::optional would be a useful thing to do; I keep that configure.ac check for now, though, and will only remove it in a follow up commit). Another longer-term benefit is that the code is now already in good shape for an eventual switch to std::optional (a switch we would have done anyway once we no longer need to support Xcode < 10). Only desktop/qa/desktop_lib/test_desktop_lib.cxx heavily uses boost::property_tree::ptree::get_child_optional returning boost::optional, so let it keep using boost::optional for now. After a number of preceding commits have paved the way for this change, this commit is completely mechanical, done with > git ls-files -z | grep -vz -e '^bin/find-unneeded-includes$' -e '^configure.ac$' -e '^desktop/qa/desktop_lib/test_desktop_lib.cxx$' -e '^dictionaries$' -e '^external/' -e '^helpcontent2$' -e '^include/IwyuFilter_include.yaml$' -e '^sc/IwyuFilter_sc.yaml$' -e '^solenv/gdb/boost/optional.py$' -e '^solenv/vs/LibreOffice.natvis$' -e '^translations$' -e '\.svg$' | xargs -0 sed -i -E -e 's|\<boost(/optional)?/optional\.hpp\>|o3tl/optional.hxx|g' -e 's/\<boost(\s*)::(\s*)(make_)?optional\>/o3tl\1::\2\3optional/g' -e 's/\<boost(\s*)::(\s*)none\>/o3tl\1::\2nullopt/g' (before committing include/o3tl/optional.hxx, and relying on some GNU features). It excludes some files where mention of boost::optional et al should apparently not be changed (and the sub-repo directory stubs). It turned out that all uses of boost::none across the code base were in combination with boost::optional, so had all to be rewritten as o3tl::nullopt. Change-Id: Ibfd9f4b3d5a8aee6e6eed310b988c4e5ffd8b11b Reviewed-on: https://gerrit.libreoffice.org/84128 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-30Rewrite ParamValue::isStephan Bergmann1-1/+1
...without using boost::optional<>::operator! (in preparation for replacing boost::optional with std::optional, which doesn't have an operator! using is_initialized() would not be helpful, as std::optional doesn't have it either; using has_value() would arguably be even cleaner, but boost::optional only has it since Boost 1.68, so some --with-system-boost builds might not have it) Change-Id: Iee3c71c8e6ea93fb25221768880442f42f410b83 Reviewed-on: https://gerrit.libreoffice.org/84115 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-15make some classes module-privateNoel Grandin11-11/+11
Change-Id: I95845d7217fc5e77e3f8e205030e9cd761ad0cc5 Reviewed-on: https://gerrit.libreoffice.org/82116 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-29loplugin:finalclasses in connectivityNoel Grandin11-24/+17
Change-Id: I8f85331338247d4b144c5d5487c2fb59c5237dff Reviewed-on: https://gerrit.libreoffice.org/81637 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-09Resolve FIXME Decimal Separator should be OUString (connectivity/dbaccess/svx)Julien Nabet1-5/+5
instead of a sal_Char Change-Id: I14fd983dac7ceb83a788c26dd4ea9d1c87444c9a Reviewed-on: https://gerrit.libreoffice.org/80493 Tested-by: Jenkins Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-09-06tdf#39593 use isUnoTunnelIdArkadiy Illarionov1-1/+1
Adapt getUnoTunnelId methods where required: rename or make public. Change-Id: I0fd2120bf9f0ff1aa690329a65ff64a154c89315 Reviewed-on: https://gerrit.libreoffice.org/78680 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-23Mark move ctors/assignments noexceptMike Kaganski2-6/+6
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 Grandin1-1/+1
Change-Id: Idd81089279b23d93276107d84446c77e49d42b77 Reviewed-on: https://gerrit.libreoffice.org/77933 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-17tdf#125340 transport preferred dialog parent down the migration dialogCaolán McNamara1-4/+8
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-16Fix typosAndrea Gelmini1-1/+1
Change-Id: I488908096aac319daf30875aee1e46b914cc4759 Reviewed-on: https://gerrit.libreoffice.org/77608 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-10Fix typosAndrea Gelmini1-1/+1
Information is always singular Change-Id: I55275d7c2fd76c3ec0ae4a98aa952777feb90460 Reviewed-on: https://gerrit.libreoffice.org/75645 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-08-09Fix typosAndrea Gelmini1-1/+1
Change-Id: I994f656b0828c9c7ea1463b86cd692f847d01e7e Reviewed-on: https://gerrit.libreoffice.org/77126 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-05tdf#39593 Drop connectivity::sdbcx::ODescriptor::getImplementationArkadiy Illarionov1-2/+1
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-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): connectivityStephan Bergmann1-1/+1
Change-Id: I80dab66757b1f541d448a642a5ecddc876f55c7b Reviewed-on: https://gerrit.libreoffice.org/76689 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-03Fix typoAndrea Gelmini1-2/+2
Change-Id: I3c7f3d8af44ab003ca1d421716f6df21c1e93eef Reviewed-on: https://gerrit.libreoffice.org/75020 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-03Fix typoAndrea Gelmini1-1/+1
Change-Id: I7f23790e11a674693ab5a10fba0eba801f0b4636 Reviewed-on: https://gerrit.libreoffice.org/75017 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-03Fix typoAndrea Gelmini1-1/+1
Change-Id: Ie42676093d67751bcc52cd27638505493e59012b Reviewed-on: https://gerrit.libreoffice.org/75018 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-03Fix typoAndrea Gelmini1-2/+2
Change-Id: I1aa00b948d76ee3a5b7b1fcd7968ceb0946dab2f Reviewed-on: https://gerrit.libreoffice.org/75019 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-02Fix typoAndrea Gelmini1-1/+1
Change-Id: I8319b83bd2688d8e115270fcfab5ab3d59c528dd Reviewed-on: https://gerrit.libreoffice.org/74979 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-02Fix typoAndrea Gelmini1-3/+3
Change-Id: Ie1d91c8c9e8024b0f94b099f46953f1417366dc7 Reviewed-on: https://gerrit.libreoffice.org/74978 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-02Fix typoAndrea Gelmini1-3/+3
Change-Id: Ieb97944779daac68a18ca1f5ef1c563f0f96f344 Reviewed-on: https://gerrit.libreoffice.org/74975 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-02Fix typoAndrea Gelmini1-1/+1
Change-Id: Ib607da003e57e06a952cac8333cade3b8551ee91 Reviewed-on: https://gerrit.libreoffice.org/74977 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-31connectivity: fix memory leaks caused by OConnection::acquire()Michael Stahl4-4/+8
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-03-12tdf#42949 Fix IWYU warnings in include/connectivity/*Gabor Kelemen44-136/+114
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I02f75be483529ba1f7a6e460e34c4752b4265221 Reviewed-on: https://gerrit.libreoffice.org/68893 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-27loplugin:unusedfields look for classes where we can make all the..Noel Grandin2-2/+2
fields private Change-Id: Id3c6b123f06ab5dcf87628de4c347626110d2d27 Reviewed-on: https://gerrit.libreoffice.org/68302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-06store originating exception when re-throwingNoel Grandin1-1/+2
Change-Id: I26959d3604a581f1528e575239970ab364c7fd50 Reviewed-on: https://gerrit.libreoffice.org/67413 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-21pass OSQLParseNode around by unique_ptrNoel Grandin2-5/+5
Change-Id: I8ffb9e04614472c3645d24bebdc88f91059d12ad Reviewed-on: https://gerrit.libreoffice.org/65436 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-21new loplugin:methodcyclesNoel Grandin1-5/+0
look for closed cycles of methods i.e. unused code that would not otherwise be found by the unusedmethods loplugin Change-Id: I3fb052132d97aabca573bb8e9fc424201b1e2042 Reviewed-on: https://gerrit.libreoffice.org/60875 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-11loplugin:constantparamNoel Grandin1-6/+1
Change-Id: Ia11bf93768d5f722b7fe62df15f24809cb7e7f04 Reviewed-on: https://gerrit.libreoffice.org/60280 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-29loplugin:constantparam (1)Noel Grandin1-4/+1
Change-Id: I25077e391ecca1b678062d261a83d88daadf0a58 Reviewed-on: https://gerrit.libreoffice.org/59701 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-6/+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-06-05tdf#42949 remove unused compheler includes ..Jochen Nitschke2-2/+0
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-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-04-17remove no longer necessary operator new/delete overridesNoel Grandin3-27/+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>