summaryrefslogtreecommitdiff
path: root/connectivity
AgeCommit message (Collapse)AuthorFilesLines
2017-07-19Change the most obvious Date+=(long)... to Date+=static_cast<sal_Int32>(...)Eike Rathke1-1/+1
Simple search git grep -l 'Date.*[+-].*[(<] *long *[>)]' Since commit f5b0cc2a3690ba963b3f150886e1d5ddddee9530 Date: Sat Jul 1 16:01:15 2017 +0200 Date operators +,-,+=,-= have sal_Int32 operands instead of long. Change-Id: I2387cbceadcb056831225e4111353980d50a94d4 Reviewed-on: https://gerrit.libreoffice.org/40163 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-07-19connectivity: merge OCalcColumns and OWriterColumnsMiklos Vajna9-112/+17
Turns out createObject() only needs the base class OFileTable, and then these can be shared. Change-Id: I6e8a83155dbbbc3d85794e190c2e710d01902017 Reviewed-on: https://gerrit.libreoffice.org/40183 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-19connectivity: merge OCalcPreparedStatement and OWriterPreparedStatementMiklos Vajna9-100/+16
Into a single OComponentPreparedStatement, as both of them just provide prepared statement functionality based on a file loaded into an LO component, so they can share code. Change-Id: Ib1074871d63de83f16861081050e57442ebf0ffa Reviewed-on: https://gerrit.libreoffice.org/40182 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-19connectivity: merge OCalcStatement and OWriterStatementMiklos Vajna9-103/+16
Into a single OComponentStatement, as both of them just provide statement functionality based on a file loaded into an LO component, so they can share code. Change-Id: Iad2852f93783ec3c4a672f4b86424b4aa0ae8eaf Reviewed-on: https://gerrit.libreoffice.org/40181 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-19connectivity: merge OCalcResultSet and OWriterResultSetMiklos Vajna11-301/+50
Into a single OComponentResultSet, as both of them just provide data source functionality based on a file loaded into an LO component, so they can share code. Change-Id: I19352e592a45d7a58d834e72645dec72d77ce7c9 Reviewed-on: https://gerrit.libreoffice.org/40180 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-19loplugin:constparams in connectivityNoel Grandin40-101/+102
Change-Id: I9b81c6227fb3c89a832640058a11444f72019694 Reviewed-on: https://gerrit.libreoffice.org/40155 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-18connectivity writer driver: mention Writer in display nameMiklos Vajna1-1/+1
It was just "Document" to be consistent with Calc's "Spreadsheet", but it's confusing as we have a Text driver as well. Change-Id: I9ec10f49c3f2bdab7d8f92a9ee0a44b4536e83eb Reviewed-on: https://gerrit.libreoffice.org/40135 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-18connectivity writer driver: add Statement implementationMiklos Vajna4-3/+88
Gets rid of the OWriterConnection::createStatement() stub warning. This is the last interface which was not supported by the writer driver, as far as I see. Change-Id: I5d1e6835d30b704d6866f2cc4cd9e82ea0f2139e Reviewed-on: https://gerrit.libreoffice.org/40134 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-18connectivity writer driver: add ResultSet implementationMiklos Vajna4-2/+255
Now column headers and table data show up on the UI. Change-Id: I84100c5a7ac65c3be1e985be8ae7195835c45145 Reviewed-on: https://gerrit.libreoffice.org/40128 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-18-Werror,-Wunused-private-fieldStephan Bergmann2-2/+0
Change-Id: Idd356214b553eadf5030115fc60a526e4428b1bb
2017-07-18connectivity writer driver: add PreparedStatement implementationMiklos Vajna4-4/+91
Gets rid of the stub warnings in OWriterConnection::prepareStatement(). Change-Id: I05db81898d8117578130e660932608fcc927edf0 Reviewed-on: https://gerrit.libreoffice.org/40092 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-18connectivity writer driver: add Columns implementationMiklos Vajna4-1/+97
Gets rid of the stub warnings in OWriterTable::refreshColumns(). Change-Id: I2dd43777a00a6958548e3dc8119c5cb825ebb02e Reviewed-on: https://gerrit.libreoffice.org/40091 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-18connectivity writer driver: add Table implementationMiklos Vajna4-3/+541
Gets rid of the stub warnings in OWriterTables::createObject(). Change-Id: I161e498d5704bb9a3d9f423ce1823664d8249c86 Reviewed-on: https://gerrit.libreoffice.org/40090 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-18connectivity writer driver: add Tables implementationMiklos Vajna4-1/+96
But leave OWriterTables::createObject() as a stub for now. Change-Id: I8a05d698e565cefded1286decdfbdfece8c2237b
2017-07-18connectivity writer driver: add Catalog implementationMiklos Vajna4-3/+114
But leave OWriterCatalog::refreshTables() as a stub for now. Change-Id: Ica5eb9d45937c826501b666d565019e2e04df6bf Reviewed-on: https://gerrit.libreoffice.org/40071 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-17connectivity writer driver: initial DatabaseMetaData implementationMiklos Vajna4-1/+381
With this the list of tables is visible in Data Sources. Change-Id: I7ee4955c54a76c57f854dba19fd1a6a8ee606089 Reviewed-on: https://gerrit.libreoffice.org/40056 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-17loplugin:oncevar: connectivity (clang-cl)Stephan Bergmann1-4/+2
Change-Id: I479db3383252e803d84e1d1cfd613fa4f5a36145
2017-07-17connectivity: add initial writer backendMiklos Vajna10-0/+800
Similar to the calc one. As a first step the Driver and the Connection interfaces are implemented, though the later has some stubs. Change-Id: Id043f7742fdb2006d4f88526ef4d055a6d8dee82 Reviewed-on: https://gerrit.libreoffice.org/40033 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-13loplugin:oncevar: empty strings: connectivityStephan Bergmann6-60/+31
Change-Id: Icfc67638e2aee9b5025dd40a50a2627d153ada4d
2017-07-13use more OUString::operator== comphelper..cuiNoel Grandin6-10/+10
Change-Id: Ib5f3037249152be2b66acf347d1a0c236dc7adfa Reviewed-on: https://gerrit.libreoffice.org/39888 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11simplify some OUString::copy callsNoel Grandin2-2/+2
Change-Id: Ifa228ca02ea79a1309e1875414028aade7e5f12d Reviewed-on: https://gerrit.libreoffice.org/39801 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11use more range-for on uno::SequenceNoel Grandin1-13/+7
Change-Id: Ifad32425d79be5a22d33d721bdc5fb993f699759 Reviewed-on: https://gerrit.libreoffice.org/39763 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11loplugin:unnecessaryparenStephan Bergmann1-1/+1
Change-Id: I6ea2cf715095e5f686fa8a4262682553e9a293ac
2017-07-10simplify some OUString compareTo callsNoel Grandin1-2/+2
to either startsWith or == or != Change-Id: Ie4b4662f5b8e4532cbc1ab36910389e0b3d41ef0 Reviewed-on: https://gerrit.libreoffice.org/39750 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-10teach unnecessaryparen loplugin about identifiersNoel Grandin1-3/+3
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b Reviewed-on: https://gerrit.libreoffice.org/39737 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-09cppcheck: uselessCallsRemoveJochen Nitschke2-6/+6
std::remove returns a past the end iterator which should be used for the reallocation. This makes the code more robust. Previously it only worked if there was exactly one value with type XGeneratedResultSet in the Sequence. Change-Id: Ia2db1252ba8fe682dbc55d9722eaa62ed596e297 Reviewed-on: https://gerrit.libreoffice.org/39724 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-07No language driver in header for dBASEIII/PlusJulien Nabet1-1/+4
See http://dbase.free.fr/tlcharge/structure%20tables.pdf Change-Id: I68df30f73d2556a217f30d80d1d55ec93bca1564 Reviewed-on: https://gerrit.libreoffice.org/39710 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-07-07remove nullptr checks on STL search result iteratorsJochen Nitschke2-3/+3
results are in the range of first_iterator to last_iterator. If one of those is nullptr the algorithm would fail anyway. This removes some impossible checks in sw/source/core/unocore/unochart.cxx: SwChartDataProvider::detectArguments. A sorted range still holds the same values and has the same length as the original range. Replacing raw pointers eases reading this code. Change-Id: If96bd11e9167488346a57e9e08507ac42338d3cd Reviewed-on: https://gerrit.libreoffice.org/39683 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-07loplugin:unnecessaryparen handle parens inside call exprNoel Grandin1-1/+1
stick to single-arg function calls, sometimes parens in multi-arg calls might be there for clarity Change-Id: Ib80190c571ce65b5d219a88056687042de749e74 Reviewed-on: https://gerrit.libreoffice.org/39676 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-07C++11 remove std::binary_function bases from functorsJochen Nitschke5-8/+8
std::binary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::binary_function base class was used by deprecated std::bind2nd, this was solved in individual commits. The members first_argument_type and second_argument_type were used in chart2/source/controller/dialogs/DataBrowserModel.cxx: DataBrowserModel::implColumnLess and are inlined in this commit. Change-Id: I60ded60a8d4afd59e15ac15a58e18d2498c9be5a Reviewed-on: https://gerrit.libreoffice.org/39659 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-07tdf#108782 replace std::bind2nd with lambdaJochen Nitschke1-1/+2
and inline questionable comphelper::TPropertyValueEqualFunctor Change-Id: I9caf7063f653554a3758d9eab3eb4d6dfd36309e Reviewed-on: https://gerrit.libreoffice.org/39658 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06use OString::operator== in preference to ::equalsNoel Grandin2-2/+2
Change-Id: Ib291521963a791a9c6175964571e9d9895072acf Reviewed-on: https://gerrit.libreoffice.org/39646 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06use more begin()/end() for SequenceNoel Grandin4-16/+10
Change-Id: I399be6b6ef7a6ce01e883569a177c0969bc29c69
2017-07-05loplugin:useuniqueptr in basic..cppcanvasNoel Grandin4-16/+12
Change-Id: Ib40241eb794607154ae52f8aa68fbf5ea5e944af Reviewed-on: https://gerrit.libreoffice.org/39551 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05new loplugin unnecessaryparenNoel Grandin10-18/+18
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec Reviewed-on: https://gerrit.libreoffice.org/39549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05loplugin:casttovoid (clang-cl): connectivityStephan Bergmann4-40/+12
Change-Id: I68eef2cff5fffe61bd1ca2abc6d8ef42810406cb
2017-07-05loplugin:unusedfields connectivityNoel Grandin17-78/+30
Change-Id: I056b36249803982e451b887cc73b49a851144b7e Reviewed-on: https://gerrit.libreoffice.org/39498 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-04loplugin:unusedfieldsNoel Grandin3-15/+0
Change-Id: I6bf3de7ba6e6bff2fd607156a0dcdd554887e491 Reviewed-on: https://gerrit.libreoffice.org/39475 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-04loplugin:casttovoidStephan Bergmann1-2/+1
...cases that were initially missed due to the broken containsProcessingConditionalInclusion() Change-Id: Ib7d801ab5173ee590ef35a9e075d3ce4d4aa06da
2017-07-03use begin()/end() when working with SequenceNoel Grandin3-6/+6
Change-Id: Icf9da6a24d72c073338f6fbb513d7250b3898015 Reviewed-on: https://gerrit.libreoffice.org/39469 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-03loplugin:oncevar (clang-cl): connectivityStephan Bergmann3-8/+5
Change-Id: I76dcc99c29302b49a1d66fa22db8b28714421a98
2017-07-03C++11 remove std::unary_function bases from functorsJochen Nitschke3-10/+8
std::unary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::unary_function base class was used in 3 places: * chart2/source/tools/DataSeriesHelper.cxx: lcl_MatchesRole is used in a std::not1 function helper who uses the members return_type and argument_type. - replace deprecated std::not1 with a lambda * chart2/source/tools/ModifyListenerHelper.cxx: lcl_weakReferenceToSame used the argument_type member in the operator() parameter. - inline the parameter type. * xmloff/source/chart/SchXMLExport.cxx: lcl_SequenceToMapElement used result_type and argument_type in operator(). - inline the types Also fix compile error with gcc about finding std::for_each. Change-Id: I073673beb01410c3108e7d0346d9e7d6b9ad2e2f Reviewed-on: https://gerrit.libreoffice.org/39358 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-07-02loplugin:casttovoid: connectivityStephan Bergmann31-287/+134
Change-Id: I03127890499dac67816bb43a8c3fb9dd87eefcab
2017-07-02Typo: isCaseSensitveExtension->isCaseSensitiveExtensionJulien Nabet2-2/+2
Change-Id: Ifcd0a93fc8f3e95f7e0e8d518b5d6fbb5ab0a514 Reviewed-on: https://gerrit.libreoffice.org/39448 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-07-02tdf#108789 and others: overhaul DBase files encoding handlingLionel Elie Mamane2-41/+85
- Calc: make the complete "what encoding to use" decision before calling the connectivity driver, so that the driver has no ambiguity about whether it should override our setting or not. To this end, factorise the part of the driver that reads the encoding from the file header into dbtools. - Calc: don't ask for encoding when the file's header give the encoding. - don't confuse CP850 (the default) and "don't know", including: * don't ignore CP850 user setting * don't overwrite user setting with CP850 Thanks to Julien Nabet for the extensive collaboration on this. Change-Id: Id80b7c505858b88f717b0ce6bd890527909e5fd1
2017-06-30loplugin:oncevarStephan Bergmann3-56/+28
Change-Id: Id19ffb1d4817a882bc3f8f73c3ead932c5a92aeb
2017-06-29loplugin:oncevarStephan Bergmann2-9/+5
Change-Id: I5ee54b458b85581cf49ab39a7b1dc0cae6abed00
2017-06-29improve refcounting lopluginNoel Grandin7-8/+8
to find ref-counted classes being managed via other smart pointer classes. Hopefully prevent needing fixes like 642ae256ea5b8083ba0b3c097ca8ea52304b9cdb "ChangedUIEventListener is refcounted, mustn't be helt by unique_ptr" Change-Id: I6b0c5f8f87ce3546a8a1104ce1000470c09459bd Reviewed-on: https://gerrit.libreoffice.org/39378 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-28In DatabaseMetaData::getIndexInfo, isPrimary has always been ignoredStephan Bergmann1-3/+1
...ever since the code's introduction with e28033fdfad9750ebe96885b9514adee629acf88 "Apply sdbc-postgresql.diff" Change-Id: Ia0a1581c0284d96c73367ac6ea52fb0bab8e3c88 Reviewed-on: https://gerrit.libreoffice.org/39310 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-06-28connectivity: Fix memory leak at finding non-empty fileTakeshi Abe1-4/+2
Change-Id: I7134dc4efb9a659727474a788dce19fcb8ea2da7 Reviewed-on: https://gerrit.libreoffice.org/39338 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>