summaryrefslogtreecommitdiff
path: root/dbaccess/source/filter
AgeCommit message (Collapse)Author
2018-04-01remove unused processfactory.hxx includesJochen Nitschke
and fix fallout Change-Id: Id06bf31f2075111e426ba40c84c885ae70697bee Reviewed-on: https://gerrit.libreoffice.org/52206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-03-29dbahsql: Unit test for binary importTamas Bunth
Also fix bugs shown by the unit test Use boost date/time instead of std, because std::tm cannot handle dates before 1970. Change-Id: I7f5dbb3d828a591a4b51c7204dc3bd39fefc42ff Reviewed-on: https://gerrit.libreoffice.org/51804 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-03-28dbahsql: wrong variableTamas Bunth
Change-Id: Ib0027bc8a84c2cfd5622e83c420434b3bb130c7c Reviewed-on: https://gerrit.libreoffice.org/51974 Reviewed-by: Tamás Bunth <btomi96@gmail.com> Tested-by: Tamás Bunth <btomi96@gmail.com>
2018-03-22dbahsql: refactor move index parser to parseschemaTamas Bunth
Change-Id: I57820edc9ba8e9b8b11db78cf795fd5b1203db9b Reviewed-on: https://gerrit.libreoffice.org/51733 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-03-22dbahsql: add unit tests for schema importTamas Bunth
Change-Id: Ib666562f2d33824188ea3d643e6056f375a4339b Reviewed-on: https://gerrit.libreoffice.org/51537 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-03-20drop msgbox includeCaolán McNamara
Change-Id: Ic7872adf8a7e8e4a8e1503dd21e22ec69509efaf Reviewed-on: https://gerrit.libreoffice.org/51652 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-19remove unused ucbstreamhelper includesJochen Nitschke
and a few vclunohelper includes Change-Id: I4803605766d155fe5044c2a65c0444631146831c Reviewed-on: https://gerrit.libreoffice.org/51496 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-12Fix typoAndrea Gelmini
Change-Id: If7667b9cda78b481de0048a459cef3de4642385a Reviewed-on: https://gerrit.libreoffice.org/51084 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2018-03-12dbahsql: use empty Any for "Other" columnTamas Bunth
Change-Id: Ie3e918956a25fba2831d3542e5f3d1b26c4fdc2a Reviewed-on: https://gerrit.libreoffice.org/51117 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-03-12another fix for AndroidNoel Grandin
Change-Id: I21802c695e2ca4fbc7ff0dd08880dfa262ca9a33
2018-03-12blind fix for AndroidNoel Grandin
Change-Id: I014e23da43292b458ca046ebdc7fd6a472c6dffb
2018-03-11dbahsql: import DATE and DATETIME columnsTamas Bunth
Change-Id: Ibfd9340fad40efab891cba5b77ce3496424a3525 Reviewed-on: https://gerrit.libreoffice.org/51076 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-03-11dbahsql: import TIME columnsTamas Bunth
Change-Id: I8863127a4de1bfc06b13d008e037db2a4e60f1e7 Reviewed-on: https://gerrit.libreoffice.org/51059 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-03-10dbahsql: Add numeric/decimal importTamas Bunth
Change-Id: Icba170d586d35f890d5232463f89d547d526d885 Reviewed-on: https://gerrit.libreoffice.org/50937 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-03-10dbahsql: add booleanTamas Bunth
Change-Id: I1c18d40f6375d034e8de3c1bad6323b7cda052e6 Reviewed-on: https://gerrit.libreoffice.org/50975 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-03-10Modernize a bit more dbaccessJulien Nabet
mainly by using for-range loops but also by simplifying some simple algo Change-Id: If04cd78e62f80f9575e24f3d50ff1e427454da79 Reviewed-on: https://gerrit.libreoffice.org/51019 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-08loplugin:unusedmethodsNoel Grandin
Change-Id: Id6b4edd265cb6bef31c72e2a0a440211d51c7c33 Reviewed-on: https://gerrit.libreoffice.org/50900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-07dbahsql: add BINARY and VARBINARY importTamas Bunth
Change-Id: Ibb4d5f8dda16dc7779b7a7b818a8bd2c49cbf283 Reviewed-on: https://gerrit.libreoffice.org/50844 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-03-05Removed duplicated includeAndrea Gelmini
Change-Id: I9baebc135d62fac29512ae5e8eb5e43d61ac227a Reviewed-on: https://gerrit.libreoffice.org/50773 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org>
2018-03-05Fix typosAndrea Gelmini
Change-Id: I70e7db0926f8c5815637ae14c1193130d52c3224 Reviewed-on: https://gerrit.libreoffice.org/50774 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org>
2018-03-05HSQLDB Binary importTamas Bunth
C++ implementation of reading HSQL's binary file format. This file contains the actual rows for the tables, represented in an AVL tree. Import starts from HsqlImporter, which calls to SchemaParser for some metadata (the positions of the trees in "data" file). After that it goes through the tree and read up the rows using HsqlRowInputStream. Finally, it uses sdbc's XPreparedStatement to insert the rows to the actual database. Change-Id: If4b17572e5989c218d45880bc3fd5a8820bb4101 Reviewed-on: https://gerrit.libreoffice.org/50536 Reviewed-by: Tamás Bunth <btomi96@gmail.com> Tested-by: Tamás Bunth <btomi96@gmail.com>
2018-02-27remove unused vclunohelper.hxx includesJochen Nitschke
Change-Id: I68178379e5493d0e738861a4dce5aa6e4b58cd22 Reviewed-on: https://gerrit.libreoffice.org/50393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-27Add HSQLDB schema importTamas Bunth
It can be enabled by initializing the DBACCESS_HSQL_MIGRATION variable. Create new library "dbahsql" which is responsible for migrating the embedded hsql database to any database covered by sdbc. The hsqldb schema is stored in a file named "script" in form of SQL statements. The SQL statements used by DBMS's differ mostly by the defined types. Because of that, only the create statements need to be parsed, alter statements will work (with a little luck) without actually modifying it. User / security settings which can occur in the script file (e.g. GRANT statements) are dropped. Statements starting with SET are also dropped (they are hsql specific stuff) Change-Id: I6a22942e8a9a76765f80e50f0ad68f4d72e1ff9d Reviewed-on: https://gerrit.libreoffice.org/48260 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-01-12More loplugin:cstylecast: dbaccessStephan Bergmann
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I96df8923f7791288bbd350d75582a9220006ece6
2017-12-19inline use-once typedefsNoel Grandin
Change-Id: I5c3ffc03c26b3428f1f336e6ecba7838a1cf1157 Reviewed-on: https://gerrit.libreoffice.org/46764 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-19loplugin:unusedenumconstantsNoel Grandin
Change-Id: I9dc4b369872a7c6c076ae9be1dcdf2f8385af8a7 Reviewed-on: https://gerrit.libreoffice.org/46684 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-14No need to keep these whitelisted functions decorated with SAL_CALLStephan Bergmann
The only effect SAL_CALL effectively has on LO-internal code is to change non- static member functions from __thiscall to __cdecl in MSVC (where all other functions are __cdecl by default, anyway). (For 3rd-party code, it could be argued that SAL_CALL is useful on function declarations in the URE stable interface other than non-static member functions, too, in case 3rd-party code uses a compiler switch to change the default calling convention to something other than __cdecl. But loplugin:salcall exempts the URE stable interface, anyway.) One could argue that SAL_CALL, even if today it effectively only affects non- static member functions in MSVC, could be extended in the future to affect more functions on more platforms. However, the current code would already not support that. For example, 3af500580b1c82eabd60335c9ebc458a3f68850c "loplugin:salcall fix functions" changed FrameControl_createInstance in UnoControls/source/base/registercontrols.cxx to no longer be SAL_CALL, even though its address (in ctl_component_getFacrory, in the same file) is passed to cppuhelper::createSingleFactory as an argument of type cppu::ComponentInstantiation, which is a pointer to SAL_CALL function. Change-Id: I3acbf7314a3d7868ed70e35bb5c47bc11a0b7ff6 Reviewed-on: https://gerrit.libreoffice.org/46436 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-11loplugin:salcall fix functionsNoel Grandin
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-05loplugin:countusersofdefaultparams in dbaccessNoel Grandin
Change-Id: Ic372096785f9f6ead569b34dcc7e97f78ab9ddf8 Reviewed-on: https://gerrit.libreoffice.org/45837 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-30dbaccess: -Werror,-Wimplicit-fallthroughMichael Stahl
Change-Id: I0580a4aec9762e774679ad3d6a567ec4e74c1908
2017-11-30xmloff: turn SvXMLImportContext into a no-op base classMichael Stahl
Fix the non-obvious and potentially dangerous recursion that is implicit in xmloff's context code. SvXMLImportContext::CreateChildContext() now always creates a SvXMLImportContext, does not delegate to SvXMLImport. Rename CreateContext to CreateDocumentContext, to make its purpose of creating only the top-level context more obvious. With the previous changes to CreateContext overrides in sw, reportdesign and dbaccess, this hopefully shouldn't break anything. Change-Id: I9e147bf6297bbac9e8470454881da73f6e39db0a
2017-11-30dbaccess: split up ODBFilter::CreateContext()Michael Stahl
This was handling XML elements at 3 different levels; add some more context classes to handle the nesting better. Change-Id: I05d7b2b7dc2d797acd4e97eacb54fa07e32d88e2
2017-11-20look for =() in loplugin:unnecessaryparenNoel Grandin
Change-Id: I4f9b71ff7767e90987bb40358fc46ed5d1d571d0 Reviewed-on: https://gerrit.libreoffice.org/44944 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-10Properly construct vnd.sun.star.pkg URLStephan Bergmann
...in SwDBManager::LoadAndRegisterEmbeddedDataSource. For example, when the authority encodes a file URL whose path contains '%23' (because one of the pathname segments encoded in the file URL contains a '#' character), the original code would have left it as %23 in the vnd.sun.star.pkg URL, instead of encoding it as %2523. That lead to bad file URLs being recovered from the vnd.sun.star.pkg URL in dbaccess. (And 03f58aa36c5150ea305b5fd0023e0ec53a334051 "dbaccess: properly encode path to prevent stripping 'fragment' from it", which this commit reverts, wrongly tried to address that on the consuming instead of the producing side.) Change-Id: I17d2dc9e6306d006361fbcb63d77e93a9e20bf31 Reviewed-on: https://gerrit.libreoffice.org/44569 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-11-09dbaccess: properly encode path to prevent stripping "fragment" from itMike Kaganski
When a path contains "#" character, it must be encoded to prevent detecting it as URI's "fragment" separator, and subsequent stripping of following path part (e.g., in SfxMedium::Init_Impl). Change-Id: Ide08f8c13dc2296d9aecba92c96f1b29cc4538de Reviewed-on: https://gerrit.libreoffice.org/44538 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-11-08ODBFilter::filter: Also leave window wait on exceptionMike Kaganski
Change-Id: I6bb759c583e15f229bc2afa178a1d1d90d8315ef Reviewed-on: https://gerrit.libreoffice.org/44458 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-11-06loplugin:finalclasses in dbaccessNoel Grandin
Change-Id: I7cbc786407ee798950a7fdc98f43aee0845ff862 Reviewed-on: https://gerrit.libreoffice.org/44347 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: dbaccessStephan Bergmann
Change-Id: I15aee966012612033ab7e2ee03ac1a553802f540
2017-10-04add << operator for css::uno::ExceptionNoel Grandin
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-22ofz: don't leak in face of exceptionsCaolán McNamara
Change-Id: Ic15590a13bd3770ee5dd7db76b21c830a4fe73e2 Reviewed-on: https://gerrit.libreoffice.org/42587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-11clang-tidy modernize-use-emplace in d*Noel Grandin
Change-Id: I79ac90faf24b4c741545e411dbaea7826c2df531 Reviewed-on: https://gerrit.libreoffice.org/42150 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11convert std::map::insert to std::map::emplaceNoel Grandin
which is considerably less verbose Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b Reviewed-on: https://gerrit.libreoffice.org/40978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31loplugin:constparams in dbaccessNoel Grandin
Change-Id: I4994c4f0ae614c8f98466f440412f28380ddd6a6 Reviewed-on: https://gerrit.libreoffice.org/40589 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-25use more comphelper::InitAnyPropertySequenceNoel Grandin
Found with: git grep -n -A10 'Sequence.*Any' -- *.cxx | grep -B5 -w PropertyValueProvider and: git grep -n 'Sequence.*Any.*( *&' Change-Id: Icb18c98bdd3f8352817e443ff78de5df042859ad Reviewed-on: https://gerrit.libreoffice.org/40389 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21migrate to boost::gettextCaolán McNamara
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-06-26s/catched/caughtNoel Grandin
Change-Id: I7ea6977a9749e86f8058b78cdb91cd2c62da8264 Reviewed-on: https://gerrit.libreoffice.org/39164 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-21convert ErrCode to strong typedefNoel Grandin
would have preferred to re-use o3tl::strong_int, of which this is a modified copy, but there are lots of convenience accessors which are nice to define on the class. Change-Id: I301b807aaf02fbced3bf75de1e1692cde6c0340a Reviewed-on: https://gerrit.libreoffice.org/38497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-18remove unused osl/mutex.hxx includesJochen Nitschke
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb Reviewed-on: https://gerrit.libreoffice.org/38905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-14use ERRCODE_NONE instead of 0Noel Grandin
peeling off a small chunk of my ErrCode strong_int conversion Change-Id: Idc89e8496083beed7608cba705cd981139eb7111 Reviewed-on: https://gerrit.libreoffice.org/38777 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12cleanup unused css/frame/* includesJochen Nitschke
Change-Id: I173a29fd1ee889127369d2bc2fce8e010b89ca65 Reviewed-on: https://gerrit.libreoffice.org/38633 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>