summaryrefslogtreecommitdiff
path: root/dbaccess
AgeCommit message (Collapse)Author
2018-06-15menubar: update and sync all base menubarsandreas kainz
Change-Id: I9b7e31f2335f01e20ee71137fdb2fd0315f3bd91 Reviewed-on: https://gerrit.libreoffice.org/55542 Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com> Tested-by: Jenkins (cherry picked from commit 7d584f7775e1b8f7dc96c618e8c600b1bef77af5) Reviewed-on: https://gerrit.libreoffice.org/55830
2018-06-11Properly decompose vnd.sun.star.pkg URLStephan Bergmann
When the URL encoded in the vnd.sun.star.pkg URL's authority contains a "@" (e.g., because it is a file URL denoting a pathname containging a "@" in one of the segments), that "@" need not be encoded (cf. the grammar at the top of tools/source/fsys/urlobj.cxx) and INetURLObject::GetHost would only return the part following the "@". When constructing sBaseURI in ODatabaseContext::loadObjectFromURL (dbaccess/source/core/dataaccess/databasecontext.cxx), the path part shall obviously not be decoded (but which the original code erroneously did). However, when obtaining sStreamRelPath in ODBFilter::implImport (dbaccess/source/filter/xml/xmlfilter.cxx), it isn't clear to me whether the path should be decoded, so I left that in (and added a TODO). (Caused `make CppunitTest_sw_uiwriter CPPUNIT_TEST_NAME=SwUiWriterTest::testEmbeddedDataSource` to fail when SRCDIR is such a pathname containing a "@" in one of the segments.) Change-Id: I6ffd842f3f3d37d2682e7cf14399fb3dbfa0a2aa Reviewed-on: https://gerrit.libreoffice.org/55286 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit e310ac4ab942feb014f3bb5bc4519dcf966b47fc) Reviewed-on: https://gerrit.libreoffice.org/55633 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-06-10fix CppunitTest_dbaccess_hsqlbinary_importRene Engelhard
at least with system-hsqldb. add missing connectivity/source/drivers/hsqldb/hsqldb to gb_CppunitTest_use_components Change-Id: I6e845dadd67276b137734f68ba922a1d5890c809 Reviewed-on: https://gerrit.libreoffice.org/55551 Reviewed-by: Rene Engelhard <rene@debian.org> Tested-by: Rene Engelhard <rene@debian.org> (cherry picked from commit b7279359107ccafc691c198e94aa4e990b6300dc) Reviewed-on: https://gerrit.libreoffice.org/55559
2018-05-28loplugin:passstuffbyrefNoel Grandin
Change-Id: I785e96599bbda029adf4698d11d7f981750dec07 Reviewed-on: https://gerrit.libreoffice.org/54802 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit ff3bdde2527123fc9e011ff0d93e958174632186) Reviewed-on: https://gerrit.libreoffice.org/54914 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-05-24tdf#117670: migration Firebird, deal with multiword columnJulien Nabet
by changing parsing process a bit Change-Id: I77c06ba218e9bc0d241dbff10f76860d0ca5ed44 Reviewed-on: https://gerrit.libreoffice.org/54542 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-05-24tdf117333 dbahsql: Chain SQLExceptionsTamas Bunth
Change-Id: Ic24d79f39d9cc36cf229c7410e1f96c4c3d316f9 Reviewed-on: https://gerrit.libreoffice.org/54671 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-05-23toolbar:id is not valid attribute of toolbar:toolbarChristian Lohmaier
according to framework/dtd/toolbar.dtd – and having the same ID everywhere also is kinda pointless.. Change-Id: Ia7768be2f951886e39e24d78fc6d69b4f3c84235 Reviewed-on: https://gerrit.libreoffice.org/54665 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-05-23Fix typosAndrea Gelmini
Change-Id: Ibe94c7379a9389a0506c33666bf2bfb033f96f08 Reviewed-on: https://gerrit.libreoffice.org/54670 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-05-20tdf#117298: migration Firebird, fix time dataJulien Nabet
by just adjusting nColIndex like other datatypes Change-Id: Ia7947b3498818bac2f033eac81ac3835f98bbab3 Reviewed-on: https://gerrit.libreoffice.org/54581 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-05-17weld SvxJavaClassPathDlgCaolán McNamara
Change-Id: I3938a05d96cb1fc171611e54fa34f780ba569268
2018-05-17loplugin:unusedfields in dbaccess..drawinglayerNoel Grandin
Change-Id: I069badbce9b899d176fd3db91243139579dec6b1 Reviewed-on: https://gerrit.libreoffice.org/54456 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-16Fix typosAndrea Gelmini
Change-Id: I979323310cbb3473f7dc0f3d9ae1ea3f4c1642db Reviewed-on: https://gerrit.libreoffice.org/54420 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2018-05-16tdf#117333, tdf#117325 dbahsql: exception handlingTamas Bunth
Add proper exception handling for importing HSQL database. If there are errors during migration, the migration process should continue anyway. The first error should be shown to the user. All the others can be seen as a warning. Popping up several error messages would be just annoying for the user. Change-Id: Ia726ad777fd798f064a8fde1c0062c5b05fe59d0 Reviewed-on: https://gerrit.libreoffice.org/54396 Reviewed-by: Tamás Bunth <btomi96@gmail.com> Tested-by: Tamás Bunth <btomi96@gmail.com>
2018-05-16tdf#116987 dbahsql: check for table names..Tamas Bunth
..longer than 30 characters. In that case throw SQLException which indicates that the currently used Firebird version cannot handle table names longer than 30 characters. Change-Id: Ib2978feaeef22b70de9f2351042c25206a041105 Reviewed-on: https://gerrit.libreoffice.org/54398 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-05-14loplugin:useuniqueptr in SaveDBDocPageNoel Grandin
Change-Id: I750e6de1cce5355281336343b1ec03596113e311 Reviewed-on: https://gerrit.libreoffice.org/54170 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-14loplugin:useuniqueptr in ORowSetNoel Grandin
hold this by rtl::Reference since we are taking references to it elsewhere and passing them around. Change-Id: Iae68d7da67cf84f01deb6bb42c00e4c74d7a99d7 Reviewed-on: https://gerrit.libreoffice.org/54169 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-14tdf#117092 dbahsql: handle multiple primary keysTamas Bunth
Set primary keys at the end of the sql statement instead of putting it right after the column definition. This way multiple primary keys can be defined. Change-Id: I7956a536b0516fd8a773d4aa64ccb930ae5c715d Reviewed-on: https://gerrit.libreoffice.org/54204 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-05-12tdf#117301 dbahsql: add FLOAT typeTamas Bunth
Change-Id: I2a7227c40d8df6347c014cf720369384b92e3970 Reviewed-on: https://gerrit.libreoffice.org/53898 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-05-11tdf#96099 Remove trivial StringVector typedefAbhyudaya Sharma
Change-Id: I2924447a61f592f2c4da1c5b2e4940d30f4a1307 Reviewed-on: https://gerrit.libreoffice.org/54125 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-05-11(try to) fix dbaccess firebird-related testsRene Engelhard
after 1c5c9b84df270e41c68e68bb69fbf183fc20eed2 Move headless check into test and add missing component file for firebird... Also check for ENABLE_FIREBIRD_SDBC... Change-Id: I27ea9fb08ebcce701a54686a8986e5071a8bcf96 Reviewed-on: https://gerrit.libreoffice.org/53940 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-05-10move Java from config_features to already existing config_javaRene Engelhard
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-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>