summaryrefslogtreecommitdiff
path: root/dbaccess
AgeCommit message (Collapse)Author
2018-05-07tdf#117299 dbahsql: add varchar_ignorecase typeTamas Bunth
Change-Id: I1dc904fe1b9146c978086861ef96f5141794bf09 Reviewed-on: https://gerrit.libreoffice.org/53901 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-05-05Refactor: migration warn dlg without modifying APITamas Bunth
Use Migration warn dialog directly in library dba instead of popping up window in dbu and passing down the information through XDataSource. Change-Id: I6b8d2b55408a741662052d4af316b0c662d799f0 Reviewed-on: https://gerrit.libreoffice.org/53363 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-05-02tdf#116980 tdf#116986 Fix data migration in..Tamas Bunth
.. databases with relations. There might be several nodes written in data file before the actual row, each representing an index. We have to skip these. Change-Id: I1556a8212b509c6cb63cb98fa0e9b7b8d3483004 Reviewed-on: https://gerrit.libreoffice.org/53507 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-05-02tdf#116980 Add constraints after data migrationTamas Bunth
So there won't be any violation problems while migrating data. If there is a constraint created in a "CREATE TABLE..." statement, then cut it off and move it to a separate "ALTER TABLE ... ADD CONSTRAINT" statement. Change-Id: I7245ba8b23a6239cd3b724815a6385b9e6c17a91 Reviewed-on: https://gerrit.libreoffice.org/53508 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-05-02tdf#117296 dbahsql: Fix migration of numericTamas Bunth
Change-Id: I9ca181c58cd73432c632147870d546d277893fdf Reviewed-on: https://gerrit.libreoffice.org/53587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-04-29Avoid getTokenCount()Matteo Casalin
Change-Id: I7c58295c8d0eda927dd670ca9cc5537437ed94e6
2018-04-29OUString: getLength() ==> isEmpty() when possibleMatteo Casalin
Change-Id: Id35899bf89384557a744ff5828a0ac54ab19328b
2018-04-29Reduce getTokenCount calls, use getToken with start indexMatteo Casalin
Change-Id: Ie0f82377715fa1ddf570ec1622f40d8b6e9e4715
2018-04-29tdf#117300 dbahsql: Add REAL typeTamas Bunth
Change-Id: I5a63633f8efa2307c75e8018a8fae13f154254ce Reviewed-on: https://gerrit.libreoffice.org/53585 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-04-26[API CHANGE] deprecate XGraphicObjectResolverTomaž Vajngerl
XGraphicObjectResolver was used to get the GraphicObject URL from an storage (package) URL. This isn't possible anymore in LO 6.1 since creating GraphicObject from uniqueID was removed for its lifecycle issues. XGraphicObjectResolver is now deprecated and when the "resolveGraphicObjectURL" is called, it throws a RuntimeExeption. In places where XGraphicObjectResolver was used, we now use the XGraphicStorageHandler as the alternative. Both share a common implementation so previously we could cast one to the other at any time. Now only XGraphicStorageHandler is used. GraphicObjectResolver was removed and replaced by the alternative GraphicStorageHandler for instance creation - where needed. Change-Id: I5d3f759c6f95b7dbe2d93688d99c8aa4899ffa84 Reviewed-on: https://gerrit.libreoffice.org/53279 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-04-26dbu: Set Firebird to default in wizard..Tamas Bunth
..in case experimental feature is checked in. Change-Id: I8a774d4e532ea2afc0e1fe528e98a5743c662888 Reviewed-on: https://gerrit.libreoffice.org/53366 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-04-22place an intermediate class as parent for SfxTabPagesCaolán McNamara
so a SfxTabPage can be parented by a vcl::Window or a welded native notebook tabpage. That ways the same SfxTabPage can be used at the same time in both a native dialog or a vcl dialog. The impl can be changed to the weld api, and when hosted in a native dialog the vcl impl of that will be instantiated, while native otherwise. e.g. print options appearing in print options dialog and general options. This allows incremental changeover. Change-Id: I6f1fed1e8d0898b01853bb878757bad41cbf9bba Reviewed-on: https://gerrit.libreoffice.org/53193 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-21loplugin:unusedmethodsNoel Grandin
Change-Id: I9dc6e81149eae3ba2284fa7fe608dd9252503dce Reviewed-on: https://gerrit.libreoffice.org/53197 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-04-18tdf#117053 create database wizard: set a property when it is supportedLionel Elie Mamane
not only when we let the *user* set it in the "Advanced Settings" dialog. There are two notions: 1) Does the driver/datasource support a property 2) Do we show the user any UI in "Advanced Settings" to change that property. Notion 2 is called a _Feature_, notion 1 a _property_. Database creation was saving properties only in case 2; the right test is obviously case 1. Change-Id: Ie740c9eb6768ae5f412a49119201e9211a9cd07d Reviewed-on: https://gerrit.libreoffice.org/53121 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Jenkins <ci@libreoffice.org>
2018-04-18tdf#117021: fix datasource exampleJulien Nabet
Change-Id: I1e4112ab18e76eec4cb11fb4bc3a7cea67e7ae1d Reviewed-on: https://gerrit.libreoffice.org/53065 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-04-17Resolves: tdf#117057 use same style warning as elsewhereCaolán McNamara
Change-Id: I3072c7725d0769c0a4a1974664b1546ca3ee35ad Reviewed-on: https://gerrit.libreoffice.org/53036 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-17Fix typoAndrea Gelmini
Change-Id: I4e6ace300ffc19c5586d1d0371a06fca36b81080 Reviewed-on: https://gerrit.libreoffice.org/52954 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org>
2018-04-17Simplify calls to Menu::CheckItemMuhammet Kara
in cui, dbaccess, vcl, sc, sd Change-Id: I328d81cf6cd5a7e31fb21a758e4b2670e7df1b91 Reviewed-on: https://gerrit.libreoffice.org/52797 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-04-17remove no longer necessary operator new/delete overridesNoel Grandin
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-17cppcheck - fix variableScope in some filesGökhan Gurbetoğlu
Reduced the scope of some variables in source. Change-Id: Ib3b521ca5df8b9b254b51eab5f1d7040d6cfd846 Reviewed-on: https://gerrit.libreoffice.org/52974 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-17loplugin:constparamsNoel Grandin
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-16Fix typosAndrea Gelmini
Change-Id: Ife28cd9399cfcb375bad764dac7424eda50d430d Reviewed-on: https://gerrit.libreoffice.org/52198 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-04-16More -Werror,-Wreturn-std-moveStephan Bergmann
Change-Id: I21eeabf94c29d6eb67c18baf8cc3ed8f52903710
2018-04-16follow on for tdf#116981Noel Grandin
the previous commit 235d61890512894e27f4f81e38a325eee3c67b30, fixed just exactly the problem reported in tdf#116981. This commit fixes similar issues that may exist elsewhere. To recap, this started as a regression from commit 433fc2214c980abd82fa6240f45e634a53a3c61c (patch) sal_uIntPtr->sal_Int32 in MultiSelection Previously, MultiSelection stored it's values internally as sal_uIntPtr, but returned them as long in FirstSelected(), NextSelected(), and SFX_ENDOFSELECTION was defined to be ULONG_MAX. On 64-bit Linux, sal_uIntPtr is typedefed to sal_uInt64, and ULONG_MAX is 2^64, which means that previously, the SFX_ENDOFSELECTION value was being converted from 2^64 to -2^63 when it was returned, which was why these loop worked. So convert SFX_ENDOFSELECTION to SAL_MIN_INT32, so we get a large negative value which can never be a valid index, and which works more like it did before the regression. Also fix as many loops as I can find, to check against SFX_ENDOFSELECTION explicitly. Change-Id: I947d43dbe23a08105be3d849e33d7e774a8a19fa Reviewed-on: https://gerrit.libreoffice.org/52934 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-15tdf#116965 dbahsql: migrate relationgshipsTamas Bunth
from ALTER statements Change-Id: I399f2ea6f6181c609952d08beb85068cfb45b4df Reviewed-on: https://gerrit.libreoffice.org/52893 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-04-15tdf#116954 dbahsql: migrate views tooTamas Bunth
Change-Id: If6de6491b89cf2fb94586990f5c3e8483e74d464 Reviewed-on: https://gerrit.libreoffice.org/52892 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-04-15tdf#116982 dbahsql: fix autoincrementationTamas Bunth
Fix autoincrementation issue by parsing and processing statements like "ALTER TABLE <name> ALTER COLUMN <col_name> RESTART WITH <num>" Change-Id: Ib175d64343d05d4b2cfc9a4cf944d0d0478adbcc Reviewed-on: https://gerrit.libreoffice.org/52879 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-04-15remove some unused comphelper includesJochen Nitschke
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-14tdf#116944 Warn user before database migrationTamas Bunth
Warn user with a pop-up dialog before migration. To do that we have to know the database URL at UI level. In order to get that I updated XDataSource interface with getConnectionURL(). The dialog offers two options: proceed with or without migration. If the user choose "yes", we store that information in XDataSource. The migration itself will be made in buildLowConnection(). Change-Id: I1f0d03da6352f7a0a8d989da79c4b2fe60a03ca1 Reviewed-on: https://gerrit.libreoffice.org/52876 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-04-14Revert HSQLDB related unit testsTamas Bunth
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#116981 Base when deleting table columnNoel Grandin
regression from commit 433fc2214c980abd82fa6240f45e634a53a3c61c (patch) sal_uIntPtr->sal_Int32 in MultiSelection Previously, MultiSelection stored it's values internally as sal_uIntPtr, but returned them as long in FirstSelected(), NextSelected(), and SFX_ENDOFSELECTION was defined to be ULONG_MAX. On 64-bit Linux, sal_uIntPtr is typedefed to sal_uInt64, and ULONG_MAX is 2^64, which means that previously, the SFX_ENDOFSELECTION value was being converted from 2^64 to -2^63 when it was returned, which was why this loop worked. Change-Id: Ia13836622dc1a0cb3b339c5587b71232f4197157 Reviewed-on: https://gerrit.libreoffice.org/52844 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-14Fix typosAndrea Gelmini
Change-Id: I981cfdf97d132afdd4d3729ec76b6a3f4c62909a Reviewed-on: https://gerrit.libreoffice.org/52210 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-04-14look for check buttons without underlinesCaolán McNamara
Change-Id: Ia9963190cf3dccbfa82951a3f2c0e29e00171429 Reviewed-on: https://gerrit.libreoffice.org/52847 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-14look for radio buttons without underlinesCaolán McNamara
Change-Id: I0ed97515a03a5633628a492ec7797fc3ade8a3d8 Reviewed-on: https://gerrit.libreoffice.org/52846 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-13Removed duplicated includeAndrea Gelmini
Change-Id: Ibfea1c4a87a719ba92111787fd74a6176f8b6458 Reviewed-on: https://gerrit.libreoffice.org/52850 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org>
2018-04-13tdf#42949 Remove unnecessary localization headers from dbaccessGabor Kelemen
Found by searching for the header names and the localization function: git grep -l -e \<core_resource.hxx\> -e \<strings.hrc\> dbaccess | xargs grep -c -e "loadString" -e "DBA_RES" | grep :0$ | grep -v /pch Since certain files use the strings with other functions as well the above command still gives some false positives. Change-Id: Ib41c5d8d18f3a00729fcf2c4cd8203a2047ef0df Reviewed-on: https://gerrit.libreoffice.org/52480 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-12dbaccess: fix --without-java build once moreMiklos Vajna
Change-Id: I49bf0f066db8a988ee9a091cac1adf5ebcaa2afe Reviewed-on: https://gerrit.libreoffice.org/52777 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-12ditch debugging codeCaolán McNamara
Change-Id: I45d8a3416aab1da0f084bbbfacf2cbc84bab4922 Reviewed-on: https://gerrit.libreoffice.org/52764 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-12Revert "Remove dead HSQLDB driver"Sophia Schröder
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 Grandin
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-10tdf#116890: make unique column names in prepared statementJulien Nabet
...like we do resultset. Thanks to Lionel for this solution Change-Id: I44f307cd6bddf76716d7c73b8783070abe43bdf3 Reviewed-on: https://gerrit.libreoffice.org/52662 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Jenkins <ci@libreoffice.org>
2018-04-10dbaccess: fix --without-java buildMiklos Vajna
Change-Id: I9c1ac64745301deda1501806534f13c1527a33b3 Reviewed-on: https://gerrit.libreoffice.org/52670 Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com> Tested-by: Heiko Tietze <tietze.heiko@gmail.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-10Remove dead HSQLDB driverTamas Bunth
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-09use more DBG_UNHANDLED_EXCEPTIONNoel Grandin
so we get nice logs of the exception dynamic type for UNO exceptions. Change-Id: Ic0b10dc14d354a2c9a0591b3a51d2f1640d54bdb Reviewed-on: https://gerrit.libreoffice.org/52465 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-08tdf#116772 adapt handling of LIKE conditions to cleaned up StructuredFilterLionel Elie Mamane
Change-Id: Ifc60da9a95833ee7820a0e03354fa1a8c006e136 Reviewed-on: https://gerrit.libreoffice.org/52573 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2018-04-08this looks suspicious in light of cleaned up StructuredFilterLionel Elie Mamane
Change-Id: I88f9834403e016e849dcd6c46638626b40252cf3 Reviewed-on: https://gerrit.libreoffice.org/52574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2018-04-08Fix typoAndrea Gelmini
Change-Id: I655328122905ff70b667187937f57d23145377b1 Reviewed-on: https://gerrit.libreoffice.org/52567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-04-07dbahsql: Add doxygen commentsTamas Bunth
Change-Id: Ie666d4d8660d29c36479c2e8a1289bd789d1433b Reviewed-on: https://gerrit.libreoffice.org/52549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-04-07dbahsql: add default for autoincremented columnsTamas Bunth
Change-Id: I8b4c99ed9e3701193228c58cc9e64dc87a03da71 Reviewed-on: https://gerrit.libreoffice.org/52550 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-04-07dbaccess: Enable hsql migration by defaultTamas Bunth
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>