summaryrefslogtreecommitdiff
path: root/dbaccess
AgeCommit message (Collapse)Author
2019-03-13weld DatabaseRegistrationDialogCaolán McNamara
Change-Id: I739785daef892ac16d2a41a98268f18670daeedb Reviewed-on: https://gerrit.libreoffice.org/69136 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-12tdf#121092: save db:suppress-version-columns to ODBMike Kaganski
The setting is only available from ODatabaseSource itself, not from its Settings property. So treat it separately on export (it is also treated separately at import: see OXMLDataSource::OXMLDataSource). Change-Id: I2ecdea8748e95380c123afdb9507dfa5a4abd838 Reviewed-on: https://gerrit.libreoffice.org/69031 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-12tdf#42949 Fix IWYU warnings in include/connectivity/*Gabor Kelemen
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-03-12Correctly match checkboxes and relevant settingsMike Kaganski
Regression from commit 1c4025babd7037a3292aa530c7d45ab8d6ef6dcb Change-Id: I59ce8b6ada368c5c3f444a6e35a1dcb487d3539e Reviewed-on: https://gerrit.libreoffice.org/69075 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-11Resolves: tdf#123975 support tri-state for PrimaryKey uiCaolán McNamara
typically indeterminate is an initial state which is not returnable to, this is not the case for PrimaryKey Change-Id: I82f318e18ad9beabd9ca6e3003a736fee9a5e931 Reviewed-on: https://gerrit.libreoffice.org/69043 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-10tdf#121092: save GenerateASBeforeCorrelationName to ODBMike Kaganski
As mentioned in connectivity/registry/README, the property should be named differently in Features and Properties sections. Also the default value set in ODbAdminDialog::createItemSet should be synchronized with the other defaults, because otherwise, in case when the value is absent in the set (when it is default), this value is used in the dialog... sigh, we have too much places where relevant defaults are generated and need to be in sync. TODO: this should be reimplemented to take all defaults from the xcu. Change-Id: Ia61ab2e585107ede9c977cf563cb30e45d624bed Reviewed-on: https://gerrit.libreoffice.org/69002 Tested-by: Jenkins Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-10Make m_xAsBeforeCorrelationName depend on m_xAppendTableAliasMike Kaganski
Regression from commit 5481ca586df8eed2c832e00bc5f7e910fa2cd174 Change-Id: I082625475b6e36cca5cd46c3500c91ca6e901c66 Reviewed-on: https://gerrit.libreoffice.org/69003 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-10Initializing boost::optional with a value then resetting is oddMike Kaganski
Change-Id: Iebf28bebb009a46872dd6d4662a7434e3c66b7dc Reviewed-on: https://gerrit.libreoffice.org/68993 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-10Simplify SpecialSettingsPage's booleans initializationMike Kaganski
Change-Id: I2e1e55d4111e3c996afc27e8970af331b5d76613 Reviewed-on: https://gerrit.libreoffice.org/68988 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-09Fix typoAndrea Gelmini
Change-Id: Idb164537abb0011b223b952df1dc2fc9cc414904 Reviewed-on: https://gerrit.libreoffice.org/68955 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-03-09loplugin:unusedmethodsNoel Grandin
Change-Id: I242f56f2bc5dc8fce6db1ba8f1f8269da4fec0fa Reviewed-on: https://gerrit.libreoffice.org/68938 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-07log nice exception messages whereever possibleNoel Grandin
Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1 Reviewed-on: https://gerrit.libreoffice.org/68579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-06sync dbaccess ui files with swriter ui file structureandreas kainz
Change-Id: I5acecb3292c1b4ef6aa2dfdc38775ed5bb81324a Reviewed-on: https://gerrit.libreoffice.org/68806 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2019-03-06Blacklist some dialogs which won't get properly initializedStephan Bergmann
...so that at least Clang -fsanitize=implicit-signed-integer-truncation would generate warnings for them Change-Id: I76fd0aaa8e61784053e2b367b302fdd68c3859b4 Reviewed-on: https://gerrit.libreoffice.org/68815 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-03-06remove some unnecessary typedef struct... sugarNoel Grandin
Change-Id: I1576282b0a0a3af8ae14c04725d9c4900073f2c4 Reviewed-on: https://gerrit.libreoffice.org/68758 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-06loplugin:unnecessaryparen improve member expressionNoel Grandin
Change-Id: I304621018cb1e2a47e478e86df4229bcf2176741 Reviewed-on: https://gerrit.libreoffice.org/68757 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05re-land "new loplugin typedefparam""Noel Grandin
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad, and adds a bunch more fixes. Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a Reviewed-on: https://gerrit.libreoffice.org/68680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05weld ODatasourceSelectDialogCaolán McNamara
Change-Id: I33a45f6d68c4a6cba63301dbb6c94ea661365a9a Reviewed-on: https://gerrit.libreoffice.org/68651 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-04OSequenceIterator is not necessary anymoreNoel Grandin
we have been able to iterate over a sequence for a long time now Change-Id: Ie7ed6ec25682f631e01170029f7c9f0089448836 Reviewed-on: https://gerrit.libreoffice.org/68666 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-04simplify UNO getTypes methodsNoel Grandin
Change-Id: Ia8b07edec54527fb4904536fabb03a18e8452550 Reviewed-on: https://gerrit.libreoffice.org/68659 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-04Revert "new loplugin typedefparam"Noel Grandin
This reverts commit 9865440d217d975206a3f91612f0666312bc8fd8. This is not ready to land yet, seems like the latest update of the logic reveals a bunch more places I need to fix before it can land.
2019-03-04new loplugin typedefparamNoel Grandin
verify that parameters use the exact same typedef-names (if any) in definition and declaration Change-Id: I55d2817f599b0253904dce2d35a1a93967e15a77 Reviewed-on: https://gerrit.libreoffice.org/68439 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-04Fix typoAndrea Gelmini
Change-Id: I343b4a34b98351a3573d99fb65a624ff57d88cad Reviewed-on: https://gerrit.libreoffice.org/68658 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-03-02OSQLNameEdit not needed as a buildable anymoreCaolán McNamara
Change-Id: I5a70db03ce8846ab56535b3f044d4519c4eeb4b1 Reviewed-on: https://gerrit.libreoffice.org/68626 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-02drop newly unused OSQLNameComboBoxCaolán McNamara
Change-Id: I5de991355cc472d8ee1bc9f55713befca691e096 Reviewed-on: https://gerrit.libreoffice.org/68625 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-02weld OSaveAsDlgCaolán McNamara
Change-Id: I745cdca8b79308db27ccd4fd2c9d4b557e3f6fce Reviewed-on: https://gerrit.libreoffice.org/68624 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-27loplugin:unnecessaryoverride look for more patternsNoel Grandin
like bool Foo::bar() { b = Super::bar(); return b; } Change-Id: I5e4c8005a3da7d7487c9039c35dcbb1d17e65bd7 Reviewed-on: https://gerrit.libreoffice.org/68418 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-27loplugin:unusedfields look for classes where we can make all the..Noel Grandin
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-26loplugin:indentation (clang-cl)Stephan Bergmann
Change-Id: I94689e4eed290b4505d2caba2d9802ef7fb6cffd Reviewed-on: https://gerrit.libreoffice.org/68378 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-25Simplify containers iterations in dbaccessArkadiy Illarionov
Use range-based loop or replace with STL functions Change-Id: I01b4d97fa77ef8daf88e8e006b9523a6b71786cf Reviewed-on: https://gerrit.libreoffice.org/68286 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-25loplugin:unusedfields in dbaccessNoel Grandin
Change-Id: I858fd3d0bbd91b0ee7e02969b26d80e262c63b7d Reviewed-on: https://gerrit.libreoffice.org/68279 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-20Revert "tdf#123020: migration to Firebird fix tablename for indexes (2)"Julien Nabet
As Michael indicated in https://gerrit.libreoffice.org/#/c/67698/, nothing garantees m_sql is at least SET_TABLE_LITERAL_SIZE characters long This reverts commit 2a08db9a0473e2f87715aacfc7b481beaa490dcf. Change-Id: Ib927666043c197527bd73043980d2800453d0843 Reviewed-on: https://gerrit.libreoffice.org/68034 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-02-19Some uses of C++17 class template argument deductionStephan Bergmann
Change-Id: I47c469c0fcdff41d83729be9489c946e81ef3686 Reviewed-on: https://gerrit.libreoffice.org/68020 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-19tdf#42949 Fix IWYU warnings in include/framework/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ia9616f644a68ec6da22e646ba0d919a3489a9481 Reviewed-on: https://gerrit.libreoffice.org/67745 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-18loplugin:simplifybool, check for !(!a op !b)Noel Grandin
Change-Id: Ic3ee9c05705817580633506498f848aac3ab7ba6 Reviewed-on: https://gerrit.libreoffice.org/67866 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-15loplugin:simplifybool extend to !(a == b) where comparison an overloaded opNoel Grandin
Change-Id: I08fcbe2569c07f5f97269ad861fa6d38f23a7cc7 Reviewed-on: https://gerrit.libreoffice.org/67816 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-13Pointer is pointlessNoel Grandin
since it is just a wrapper around PointerStyle Change-Id: I51f065e0d4ad8bd91f5c84c5819048c720a19267 Reviewed-on: https://gerrit.libreoffice.org/67711 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-13Remove dead and broken EmbeddedDatabases configurationStephan Bergmann
As found out in 98c0b20864af965c3bb99a32f8ea57be7402e534 "Make Firebird the (unconditional) default for new databases": "(Curiously, ODsnTypeCollection::getEmbeddedDatabase would read a DefaultEmbeddedDatabase value from the configuration before resorting to the hardcoded default, but `git log -SDefaultEmbeddedDatabase` makes it look like there has never been any code to actually write that setting.)" Digging deeper, the story appears to be as follows: First, "INTEGRATION: CWS hsqldb" commits in 2004 had addded the EmbeddedDatabases group (and accompanying templates) to officecfg/registry/schema/org/openoffice/Office/DataAccess.xcs (ee11cb6373f6bbb28b1cdf57daa73465d030fda5), corresponding values (for HSQLDB) to officecfg/registry/data/org/openoffice/Office/DataAccess.xcu (60c5f0af740265ab81b620208205fe9e74be452f), and code to read those values (lcl_getEmbeddedDatabase in dbaccess/source/ui/misc/dsntypes.cxx; ODsnTypeCollection::getEmbeddedDatabaseURL et al in dbaccess/source/ui/misc/dsntypes.cxx; all a68938bc908c8f852912f3310d2f4bec779a3cea). This looks like it actually worked. Then, "INTEGRATION: CWS dba24b" commits in 2007 removed the EmbeddedDatabases configuration data from officecfg/registry/data/org/openoffice/Office/DataAccess.xcu (473a3ccf63cc36ac3fa992dcb72d581496cb1bbf, "during #i80930#: The approach to read the concrete type of the embedded DB from the configuration does not work, there are enough places where we silently assume 'embedded == embedded HSQLDB'") and removed the code reading it (79bbd382beb13a8f4031cc9b61332d0794878699), but left the EmbeddedDatabases schema data in officecfg/registry/schema/org/openoffice/Office/DataAccess.xcs untouched. Then, b88a62cc97613e5dc00c806f59982cb57f9d1dc8 "CWS-TOOLING: integrate CWS dbaperf2" in 2009 reintroduced code that attempts to read the configuration data as ODsnTypeCollection::getEmbeddedDatabase (dbaccess/source/core/misc/dsntypes.cxx). The reason for that may be "2009-05-06 14:22:21 +0200 oj r271589 : #i101587# use config for the drivers" as listed in the commit message. The code added as ODsnTypeCollection::getEmbeddedDatabase back then remained effectively unchanged until today, but looks fundamentally broken: It starts out with trying to read an /org.openoffice.Office.DataAccess/EmbeddedDatabases/DefaultEmbeddedDatabase/ Value property that can never be present per the schema (an /org.openoffice.Office.DataAccess/EmbeddedDatabases/DefaultEmbeddedDatabase property could be); so no data is ever actually read from the configuration by ODsnTypeCollection::getEmbeddedDatabase. (And the commit also didn't add back any configuration data to officecfg/registry/data/org/openoffice/Office/DataAccess.xcu that could have been read in the first place, nor any code to generate such data programmatically.) So remove the broken code to read configuration data from ODsnTypeCollection::getEmbeddedDatabase (which means it can be a static member function now) and also remove the obviously unused EmbeddedDatabases group (and accompanying templates) from officecfg/registry/schema/org/openoffice/Office/DataAccess.xcs. Change-Id: Icc9b34075b9b7e960df6c236d3595b7fabe71f9d Reviewed-on: https://gerrit.libreoffice.org/67494 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-11tdf#123020: migration to Firebird fix tablename for indexes (2)Julien Nabet
Change-Id: Ibb296611c152807d143fa1e212554fd54aea45fb Reviewed-on: https://gerrit.libreoffice.org/67301 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-02-11new loplugin writeonlyvarsNoel Grandin
largely based on the relevant portion of the unusedfields loplugin, but adapted for local vars Change-Id: Ic522a941573940e8f75c88f90ba5f37508ca49b1 Reviewed-on: https://gerrit.libreoffice.org/66835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-11tdf#120703 PVS: V560 A part of conditional expression is always true/falseMike Kaganski
Change-Id: I67462369d93e9d9ff3c056800947c4b75f71ba5f Reviewed-on: https://gerrit.libreoffice.org/67486 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-02-11remove ControlDependencyManagerNoel Grandin
and just use our normal handlers, instead of this weird magic Change-Id: I8245787bec2a755ce6aba31ed681577771537ca1 Reviewed-on: https://gerrit.libreoffice.org/67534 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-10weld FmSearchDialogCaolán McNamara
Change-Id: If7e87f725ea44732080fc0c57e4503c82b0cf4a0 Reviewed-on: https://gerrit.libreoffice.org/67595 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-10Typo: isAggreateFunction + isNumericOrAggreateFunctionJulien Nabet
Change-Id: Ief40b8f83defb223c9f6cba4bab89486e1c73f99 Reviewed-on: https://gerrit.libreoffice.org/67605 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-08loplugin:indentation in dbaccess..drawinglayerNoel Grandin
Change-Id: I05de6c01e827e596c9802c04964f43508dfd4d64 Reviewed-on: https://gerrit.libreoffice.org/67537 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-06Make Firebird the (unconditional) default for new databasesStephan Bergmann
60db3d2cc3bc4f124bd4d819fbd0285e7f19c8c4 "dbu: Set Firebird to default in wizard.." had done so only "..in case experimental feature is checked in", but Firebird has been made non-experimental meanwhile as documented at <https:// wiki.documentfoundation.org/index.php?title=ReleaseNotes/6.2&oldid=169290#Base>. <https://bugs.documentfoundation.org/show_bug.cgi?id=123099> "Creating new 'HSQLDB Embedded' database immediately brings up migration-to-Firebird dialog" discusses that changing the default to Firebird may be beneficial, so lets do that unconditionally now. But 60db3d2cc3bc4f124bd4d819fbd0285e7f19c8c4 had apparently made a mistake, setting the value returned from OGeneralPageWizard::getDatasourceName to "sdbc:embedded:firebird" even though the corresponding "Connect to an exisiting database" list in the new database wizard doesn't even support that (instead of "sdbc:firebird:", which matches "Firebird File" in that list). Fixed that now. (Curiously, ODsnTypeCollection::getEmbeddedDatabase would read a DefaultEmbeddedDatabase value from the configuration before resorting to the hardcoded default, but `git log -SDefaultEmbeddedDatabase` makes it look like there has never been any code to actually write that setting.) Change-Id: I49b7430f5f8288a6a166ed9184cb438208d56ca1 Reviewed-on: https://gerrit.libreoffice.org/67449 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-06store originating exception when re-throwingNoel Grandin
Change-Id: I26959d3604a581f1528e575239970ab364c7fd50 Reviewed-on: https://gerrit.libreoffice.org/67413 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-05tdf#119502: dbahsql: tables without primary keyTamas Bunth
No "PRIMARY KEY" keyword is needed, when composing a parsed sql which did not contain any primary key definition. Change-Id: Ife8b898806edba41a52d47dc04b1170606ea8aae Reviewed-on: https://gerrit.libreoffice.org/67379 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2019-02-05tdf#42949 Fix IWYU warnings in include/svtools/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I937ed12f2a96943664087ddcdd035f1347e84a57 Reviewed-on: https://gerrit.libreoffice.org/67102 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-03dbaccess: convert ORowSetBase::m_pCache to shared_ptrMichael Stahl
Change-Id: Ic6f95a226e0d900fbc633796d7e27edcd13f5482 Reviewed-on: https://gerrit.libreoffice.org/67286 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>