summaryrefslogtreecommitdiff
path: root/dbaccess
AgeCommit message (Collapse)AuthorFilesLines
2018-09-27Fix typoAndrea Gelmini1-3/+3
Change-Id: I0542342f4a55bf4740fd8360b8e26dbd7e2ffa2d Reviewed-on: https://gerrit.libreoffice.org/61031 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-09-24tdf#42949 Fix IWYU warnings in include/comphelper/[a-l]*Gabor Kelemen5-0/+5
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I22ba2c8aec235e34cd7835b8a0a716bf3057db7a Reviewed-on: https://gerrit.libreoffice.org/60837 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-24loplugin:external (clang-cl)Stephan Bergmann1-3/+3
Including: * expanding STDAPI to its definition (as per <https://msdn.microsoft.com/library/ms686631(vs.85).aspx> "STDAPI"), to add __declspec(dllexport) into its middle, in extensions/source/activex/so_activex.cxx; as discussed in the comments at <https://gerrit.libreoffice.org/#/c/60691/> "Get rid of Windows .def files in setup_native, use __declspec(dllexport)", having a function both listed in a .def file EXPORTS and marking it dllexport is OK, and the latter helps the heuristics of loplugin:external; however, the relevant functions in extensions/source/activex/so_activex.cxx probably don't even need to be exported in the first place? * follow-up loplugin:salcall in sal/osl/w32/file-impl.hxx Change-Id: Ida6e17eba19cfa3d7e5c72dda57409005c0a0191 Reviewed-on: https://gerrit.libreoffice.org/60938 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-22tdf#119569 try most likely to succeed method to get column metadata _before_Lionel Elie Mamane1-16/+23
We first try to prepare the statement and get metadata information. That's fine. Some DB engines/drivers will not give column information on an unexectured prepared statement. In that case, first try to execute the statement with all parameters set to NULL, which is likely to succeed. If not, keep "execute the raw SQL indiscriminately" as a last resort. I'm not sure it will ever be useful, though. Change-Id: I76b5fd6b2059e96fabe9a611c8e3ed115acfc964 Reviewed-on: https://gerrit.libreoffice.org/60884 Tested-by: Jenkins Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2018-09-22tdf#119850 show missing mysql connector optionsTamas Bunth2-6/+2
For MYSQL connections there is an extra window which determines how to connect to a mysql/mariadb database. This functionality is handled in OGeneralPageWizard::approveDatasourceType. Change-Id: Ia3c548103b694731cba47ff5390c34b072a938a0 Reviewed-on: https://gerrit.libreoffice.org/60893 Reviewed-by: Tamás Bunth <btomi96@gmail.com> Tested-by: Tamás Bunth <btomi96@gmail.com>
2018-09-17New loplugin:externalStephan Bergmann18-33/+41
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-14Fix warning out-of-range value from the DatasourceType selectionJulien Nabet1-0/+2
Fix warn:dbaccess.ui.generalpage:19437:19437:dbaccess/source/ui/dlg/generalpage.cxx:405: Got out-of-range value '2147483647' from the DatasourceType selection ListBox's GetSelectedEntryPos(): no corresponding URL prefix Just Launch Base and select "Open an existing database file" and see this log If there's nothing to display, we get 2147483647 which corresponds to LISTBOX_ENTRY_NOTFOUND Change-Id: Iaab680695d9816c6375d9ef04f02845890f99dda Reviewed-on: https://gerrit.libreoffice.org/60464 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Jenkins
2018-09-11loplugin:unusedfieldsNoel Grandin2-4/+0
Change-Id: I876183559a7d9f1e6d914fbf37d7ffe91459144e Reviewed-on: https://gerrit.libreoffice.org/60278 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-09Avoid getTokenCount()Matteo Casalin1-1/+1
Change-Id: I3d4ae7495f43cae35e8a149c6523bc0337621724
2018-09-09Remove return variableMatteo Casalin1-3/+2
Change-Id: I322386e103e21e2660716419dd0747765ee087de
2018-09-09Reduce OUString operationsMatteo Casalin1-7/+3
Change-Id: Ia95ced36201ee78d511604a33992be0eff4810df
2018-09-09Avoid getTokenCount()Matteo Casalin1-8/+7
Change-Id: Ib84104ea0c523729c3a7fe6019ed2e788ff7b189
2018-09-09Avoid getTokenCount()Matteo Casalin1-5/+5
Change-Id: I30b9a9122a1e20f50471d1864b8c08af985fc5d7
2018-09-09Avoid getTokenCount()Matteo Casalin1-7/+5
Change-Id: I13318d43d3c572bd81080d5bb164fdcd9cd7d27b
2018-09-08loplugin:useuniqueptr in OGenericAdministrationPageNoel Grandin20-185/+179
Change-Id: I3028aa7d40b5fea763a93b54bf5f4c5bc4294822 Reviewed-on: https://gerrit.libreoffice.org/60193 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-08Replace find_if with proper quantifier algorithmsArkadiy Illarionov1-8/+3
Missed in 085269d25a705b656436feac47149296b4b4b35d Change-Id: I3cfab57232908b48d090658e0fbc948d62b3fc6f Reviewed-on: https://gerrit.libreoffice.org/60180 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-07Cppcheck: resource leak warningMike Kaganski2-2/+6
Change-Id: I855097279cd091c1e8bd665bb0b48ce9279a9ca8 Reviewed-on: https://gerrit.libreoffice.org/60121 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-09-07tdf#119694: read embedded hsqldb file generated before 6.1Julien Nabet1-0/+1
Regression from: https://cgit.freedesktop.org/libreoffice/core/commit/?id=ebb34571c19c5ac939fbf5aed2ab66ee18e298dc Thank you Drew Jensen for the bibisect! Change-Id: I9550f61709e8582a52554f578ef043c6551f09f0 Reviewed-on: https://gerrit.libreoffice.org/60117 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Michael Stahl <Michael.Stahl@cib.de>
2018-09-06loplugin:simplifyconstruct in dbaccess..drawinglayerNoel Grandin22-35/+7
Change-Id: I83624d8bc787aaaaf6071171c882a6e5bde70a0d Reviewed-on: https://gerrit.libreoffice.org/60075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-06clang-tidy performance-unnecessary-value-paramNoel Grandin3-3/+3
Change-Id: I69247498e13331f6ef84afeb242479f8fb1178a8 Reviewed-on: https://gerrit.libreoffice.org/60068 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-02tdf#118750: fix migration assistantJulien Nabet1-2/+9
by catching throw if backup content file doesn't exist Regression from 9ceeb4619ba762c47589023d99c43c774caab441 Change-Id: I68bb27763573217a9dff0e263cb8be88e15255ad Reviewed-on: https://gerrit.libreoffice.org/59900 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-08-29Replace find_if with proper quantifier algorithmsArkadiy Illarionov5-10/+10
Change-Id: Icc820a47ac891c358883f9c01224f676c58fdd11 Reviewed-on: https://gerrit.libreoffice.org/59744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-29loplugin:constantparam (2)Noel Grandin1-3/+3
Change-Id: I528f22876497f87159e3b9453362ebbfb55b7092
2018-08-29new loplugin:oustringbufferNoel Grandin11-48/+47
look for places where we are appending the temporary result of adding strings together, to an OUStringBuffer, where we could rather call append repeatedly and avoid the temporary creation Change-Id: I481435124291ac7fb54b91a78344a9fe5b379a82 Reviewed-on: https://gerrit.libreoffice.org/59708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-29loplugin:constantparam (1)Noel Grandin2-7/+7
Change-Id: I25077e391ecca1b678062d261a83d88daadf0a58 Reviewed-on: https://gerrit.libreoffice.org/59701 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-24Blind fix for -Werror,-Wunused-functionStephan Bergmann1-0/+2
...on Android tb24 Change-Id: I3119a660d6d38d3bff15b3a32a98b188ea06fdbd
2018-08-24give the migration warn dialog a parentCaolán McNamara1-1/+18
Change-Id: Ie133c81464d87e5fbcfa9ff5d3c43f470b48d620 Reviewed-on: https://gerrit.libreoffice.org/59508 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-24pass DelFormats around using std::vectorNoel Grandin1-5/+3
instead of an array and a separate count Change-Id: Ia12a549da7e35092da2db35f8b2b9fc6a9e9c2be Reviewed-on: https://gerrit.libreoffice.org/59506 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-23we have a suitable parent window at this pointCaolán McNamara1-1/+2
Change-Id: I018ebec7fcad946613b7f3b8a4755e28909b7ce9 Reviewed-on: https://gerrit.libreoffice.org/59505 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-20loplugin:useuniqueptr in svt::DialogNoel Grandin3-4/+4
Change-Id: Ib13cd74f186de0db1be4414e893b2d4f66048b44 Reviewed-on: https://gerrit.libreoffice.org/59304 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-16Fix typo: s/an other/another/gAndrea Gelmini1-1/+1
Change-Id: I203c546cfca841e7853282267190e20b60919add Reviewed-on: https://gerrit.libreoffice.org/59098 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-08-16loplugin:returnconstant in dbaccessNoel Grandin8-27/+21
Change-Id: I37b7dc7f0a7786089034acc279cb6ed7a6ef863f Reviewed-on: https://gerrit.libreoffice.org/58426 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-15loplugin:useuniqueptr in ODbAdminDialogNoel Grandin10-20/+13
Change-Id: I4487552b2936cdfcc38055bf16e114fb6b54a3ed Reviewed-on: https://gerrit.libreoffice.org/59013 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-14tdf#119245 Set a parent for OParameterDialogMaxim Monastirsky2-1/+16
Change-Id: I5a7f4b43027a72f049e12c06cd583c6545b028f5 Reviewed-on: https://gerrit.libreoffice.org/58952 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2018-08-01add operator+=(OUStringBuffer) method to OUStringNoel Grandin1-1/+1
to reduce needless object creation and copying some more And fix what looks like a bug in CSS hex color parsing at line 609 in sw/../parcss1.cxx that has been there since commit 7b0b5cdfeed656b279bc32cd929630d5fc25878b "initial import" Change-Id: Ibad42b23721a56493bd1edcd7165e6104494a5c3 Reviewed-on: https://gerrit.libreoffice.org/58357 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-01Add missing sal/log.hxx headersGabor Kelemen42-0/+42
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 dbaccess to extensions Change-Id: I4d15aa35e11664ef78c836ffc2937c7e0bb6ea59 Reviewed-on: https://gerrit.libreoffice.org/58165 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-29replace double checked locking patternsJochen Nitschke2-22/+6
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-29Merge identical conditional branches in OContentHelperMuhammet Kara1-13/+1
Change-Id: Ifaf72d1151f32dc99dbe76838f88090ee2fd7b15 Reviewed-on: https://gerrit.libreoffice.org/58269 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-29Remove unused local variable aErrorMuhammet Kara1-1/+0
Leftover from 529e7619c5258aec91c33dd57b9fa12c3e85cfeb Change-Id: Ifdfe0f0c75d4d0d2ce90310dcb9c3fbfff5775e1 Reviewed-on: https://gerrit.libreoffice.org/58253 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr>
2018-07-28loplugin:stringloop cui,dbaccessNoel Grandin9-60/+52
Change-Id: I32b63d2435d36b869823ea022ebd7f8347a46ea0 Reviewed-on: https://gerrit.libreoffice.org/58211 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-27Remove unused local variable aImageProviderMuhammet Kara3-5/+0
It is no longer needed for the cases where oly the static methods are called Change-Id: I869b824c53ef1a8db07f4ca7f0aa9e678e16a7ac Reviewed-on: https://gerrit.libreoffice.org/58162 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-26dbaccess: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann3-9/+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: Ie8dfa12a144b0d21c99803bf6810cc573b4880ac Reviewed-on: https://gerrit.libreoffice.org/58075 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-26dbaccess: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann1-0/+5
...by explicitly defaulting the copy/move functions (and, where needed in turn, also a default ctor) for classes that have a user-declared dtor that does nothing other than an implicitly-defined one would do, but needs to be user- declared because it is virtual and potentially serves as a key function to emit the vtable, or is non-public, etc. Change-Id: Ic07bf2a39ee18368d2d56b5bc6e666758367b7d7 Reviewed-on: https://gerrit.libreoffice.org/58074 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-24Fix typosAndrea Gelmini1-1/+1
Change-Id: I07cf04cd2acc5b50d64224edb9f2c2de2c61e356 Reviewed-on: https://gerrit.libreoffice.org/57884 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-07-23Fix typosAndrea Gelmini1-1/+1
Change-Id: I9671ad7c9e75b9e10abf46bc6b53fcd760acecbf Reviewed-on: https://gerrit.libreoffice.org/57599 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-07-22Fix typos in codeAndrea Gelmini1-2/+2
It passed "make check" on Linux Change-Id: I5140beaf2115005c197c1e47f4d2df073a761ed4 Reviewed-on: https://gerrit.libreoffice.org/57773 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-07-21Fix typosAndrea Gelmini1-1/+1
Change-Id: Ifc804e33afa160943d7b5634f8ccf4e3af4d26e5 Reviewed-on: https://gerrit.libreoffice.org/57806 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-07-18Fix typosAndrea Gelmini1-2/+2
Change-Id: I5195d13b351c0eebad1eae901f7ce8408a9e5c92 Reviewed-on: https://gerrit.libreoffice.org/57028 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-07-13merge IUndoManager into SfxUndoManagerNoel Grandin1-2/+2
SfxUndoManager is the only implementation of the IUnderManager "interface", and it lives in the same header. Plus this way we can get rid of some covariant parameters, which will make using std::unique_ptr easier. Change-Id: I6661b9876b18da830bead78794d237886cd3c5c9 Reviewed-on: https://gerrit.libreoffice.org/57317 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-10tdf#118634: Don't save embedded data source to a temporary preview documentMike Kaganski2-11/+36
Also don't use storeAsURL to store embedded datasource when the document is being saved using storeToURL. Change-Id: I69a7ee5ae066e591be5e45c87bcf57dff370decc Reviewed-on: https://gerrit.libreoffice.org/57178 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>