summaryrefslogtreecommitdiff
path: root/connectivity
AgeCommit message (Collapse)AuthorFilesLines
2017-01-13jdbc clob character stream: return 1 when returning a single odd byteLionel Elie Mamane1-1/+1
if at that point nBytesToRead is 0, it may be that it was 1, but we have read one byte from the buffer (m_buf). So in this case, return 1, not 0 (which would signal EOF). Change-Id: I229e53f1c38c80f709df244a3509caccd69c8ecf Reviewed-on: https://gerrit.libreoffice.org/33030 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-11-25Related: coverity#1371267 copy ctor broken, nPagePos not copiedCaolán McNamara1-0/+1
initially operator= was removed by commit a0a919d2b541c415ad9b81d2ee91895bf106e9bb Date: Fri Oct 3 10:39:28 2014 +0200 remove SvRefBase::QueryDelete and then operator= was restored by commit faa6455995966e41653204779d055b885b27fc4c Date: Fri Oct 10 12:02:32 2014 +0200 add copy constructor for ONDXPagePtr class which I forgot in commit a0a919d2b541c415ad9b81d2ee91895bf106e9bb "remove SvRefBase::QueryDelete" but nPagePos was missed Change-Id: I6497934d4a199f5ea94cf2da840c164910e7a826 (cherry picked from commit 8ceb8b2d141a249127822bd511e66dd855fb1e59) (cherry picked from commit 93154946452fdedad9b8b536ec3d9704a4707304) Reviewed-on: https://gerrit.libreoffice.org/31166 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-11-21connectivity, sc: add missing #include <osl/endian.h>Michael Stahl1-0/+1
These files use the macro OSL_BIGENDIAN but did not include the header that defines it. Found via: git grep -l OSL_.*ENDIAN | grep -v -E '\.h(xx)?$' | while read f; do case $f in *cxx) grep -L endian\\.h workdir/Dep/CxxObject/${f%.cxx}.d ;; *) grep -L endian\\.h workdir/Dep/CObject/${f%.c}.d ;; esac ; done (cherry picked from commit e2f08f9def0869460ad38a1c2adb450778290f6e) Change-Id: Iaf589a8235dbc8062840d2716ab843e64b5cb7a2 Reviewed-on: https://gerrit.libreoffice.org/31039 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2016-11-12tdf#71251: VARCHAR max length is 32765 for FirebirdJulien Nabet1-2/+2
At least for Firebird 2.5 (see http://www.firebirdsql.org/en/firebird-technical-specifications/) Let's put the same for CHAR Cherry-picked from ba8a41bac3765f7b3562d357aeb13f752ea14ba4 Reviewed-on: https://gerrit.libreoffice.org/30783 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr> Change-Id: I4ab232689093b0418a7c1a9751685f41f2dabbf7 Reviewed-on: https://gerrit.libreoffice.org/30786 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2016-07-18tdf#71009 GSoC firebird metadata functionsWastack1-12/+108
Implement getImportedKeys funtion in order to have a working tools->relationships feature. Change-Id: I7f1660f284bfdc960d3aca034c3d26109770b4cb Reviewed-on: https://gerrit.libreoffice.org/26882 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Lionel Elie Mamane <lionel@mamane.lu> (cherry picked from commit ba3f703f01089361ac3ff3d2f231b17097c1d173) Reviewed-on: https://gerrit.libreoffice.org/27236 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-07-15tdf#91324 GSoC adapt struct tm correctlyWastack1-4/+8
Change-Id: I645ebe888186e550b95dd072e063260bc69aa178 Reviewed-on: https://gerrit.libreoffice.org/27120 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Lionel Elie Mamane <lionel@mamane.lu> (cherry picked from commit 88346f606a16865bcf7492f67a7207d0078787a1) Reviewed-on: https://gerrit.libreoffice.org/27234 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-07-12tdf#100866: Don't let exception pass connectivity::releaseStephan Bergmann1-2/+8
...which is only ever called from onexcept XInterface::release overrides: connectivity::release itself appears to be only called from connectivity::OSubComponent::relase_ChildImpl [sic], which in turn is only called from various XInterface::release overrides across connectivity. (cherry picked from commit 9624bde1c36a3c1b86d8d88f97bc729ac4d65853) Conflicts: connectivity/source/commontools/dbtools.cxx Change-Id: I94b682ec531acecd0ef9f8c100f67a71c361941e Reviewed-on: https://gerrit.libreoffice.org/27147 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-06-07connectivity: DBase: fix some obvious endian issuesMichael Stahl4-5/+45
These calls to SvStream::Read/Write operate on structs that contain 32-bit integers. (cherry picked from commit 4849f342b6969abb777d91a1fa77ec120f861c48) loplugin:sallogareas (cherry picked from commit 6bd1465395064f60c4ac45bbd79571149a702d0b) connectivity: -Werror=unused-variable (cherry picked from commit 296125b0bf28af9ec6f0ab1459b392e26ed3eb3f) loplugin:sallogareas (cherry picked from commit 106bcf136892944d9430ffa70d21de641bb44441) Change-Id: I2d45128ad482013cd9ef1fca0dd259dfc09c904f Reviewed-on: https://gerrit.libreoffice.org/25991 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-05-24Revert "remove some manual ref-counting"Noel Grandin5-18/+27
until I have a better understanding of the UNO reference counting. This reverts commit 111de438ea3e512a541281dc0716cc728ea8d152.
2016-05-24remove some manual ref-countingNoel Grandin5-27/+18
triggered when I noticed a class doing acquire() in the constructor and then release() in the destructor. found mostly by git grep -n -B5 -e '->release()' Change-Id: Ie1abeaed75c1f861df185e3bde680272dbadc97f Reviewed-on: https://gerrit.libreoffice.org/25363 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-24Convert T_DRIVERTYPE to scoped enumNoel Grandin1-15/+15
Change-Id: I87cfefbd35df5a8db8bac72f937a5906071b7568 Reviewed-on: https://gerrit.libreoffice.org/25356 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-24Convert OKeyType to scoped enumNoel Grandin4-15/+15
Change-Id: Ic604991cdc0bf3e6dc5604a4a2b33f62b92f0915 Reviewed-on: https://gerrit.libreoffice.org/25355 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-22convert TAscendingOrder to scoped enumNoel Grandin7-10/+11
Change-Id: Idd88c08df47c4175702cea0e0a36c6b3e031469f Reviewed-on: https://gerrit.libreoffice.org/25212 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-20clang-tidy misc-assign-operator-signatureNoel Grandin1-5/+5
Change-Id: I2953a88d9e2f5923732865ef17615d5928ac5f5f Reviewed-on: https://gerrit.libreoffice.org/25154 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-19clang-tidy misc-unused-alias-declsNoel Grandin1-1/+0
Change-Id: Iabde7a84b9c2758e0d2b2ffe0fb99fcfa51ff124 Reviewed-on: https://gerrit.libreoffice.org/25075 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-18update unusedmethods plugin to deal with constructorsNoel Grandin10-25/+1
and fix the operator< implementations in some of the other plugins too. Change-Id: Ie5631e0cdc8d2a994ad2af2533cdb558a6cfc035 Reviewed-on: https://gerrit.libreoffice.org/25057 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-18clang-tidy modernize-make-sharedNoel Grandin1-1/+1
Change-Id: I3fa866bfb3093fc876474a9d9db29fe05dc2af3a Reviewed-on: https://gerrit.libreoffice.org/25056 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-17Make CSV line parsers consistent with CSV field parsers.Damjan Jovanovic1-6/+53
Our CSV field parsing algorithms treats fields starting with a quote (immediately at the beginning of the row, or after the field delimiter) as quoted. A quoted field ends at the corresponding closing quote, and any remaining text between the closing quote and the next field delimeter or end of line is appended to the text already extracted from the field, but not processed further. Any quotes in this extra text are taken verbatim - they do not quote anything. Our CSV line parsers were big hacks - they essentially read and concatenate lines until an even number of quote characters is found, and then feed this through the CSV field parsers. This patch rewrites the line parsers to work exactly how the field parsers work. Text such as: "another" ",something else is now correctly parsed by both Calc and Base as: [another "],[something else] instead of breaking all further parsing. Patch by: me (cherry picked from commit 60e93b8b5b6bc4220d66e95cd234a37f3c8f8fd7) Change-Id: Iced60fad9371e17a2e5640cd7169804b18cf5103 Reviewed-on: https://gerrit.libreoffice.org/24999 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-05-12tweak assert and switch to squeak by NDEBUG and nonNDEBUGCaolán McNamara1-2/+2
Change-Id: I996d69d83acb77e96cb105f65a0243bd5fe80295
2016-05-12fall-through->SAL_FALLTHROUGHCaolán McNamara1-1/+1
Change-Id: I91ed1614162f3b7de13a0fe4ce1af689dce21510
2016-05-10Replace fallthrough comments with new SAL_FALLTHROUGH macroStephan Bergmann8-12/+14
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in preparation of enabling -Wimplicit-fallthrough. (This is only relevant for C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.) Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but that would require adding back in dependencies on boost_headers to many libraries where we carefully removed any remaining Boost dependencies only recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its future evolution will not have any impact on the stable URE interface.) C++17 will have a proper [[fallthroug]], eventually removing the need for a macro altogether. Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-05-10Insert explicit "break" when falling through to empty next caseStephan Bergmann3-1/+4
...which itself only contains a "break" (or nothing at all at the end of the "switch"), as otherwise Clang -Wimplicit-fallthrough would warn about these. Change-Id: I25c1cf2ca74dfeba7ca0385ca8f1c1bf30bbf91b
2016-05-06connectivity: replace boost::remove_reference with std::remove_referenceMichael Stahl4-7/+2
Change-Id: I7c11fcdaf8065fa86d224ad2fab88b0bcb907255
2016-05-06teach passstuffbyref plugin to check for..Noel Grandin2-14/+14
unnecessarily passing primitives by const ref. Suggested by Tor Lillqvist Change-Id: I445e220542969ca3e252581e5953fb01cb2b2be6 Reviewed-on: https://gerrit.libreoffice.org/24672 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-04Fix Windows-only code, part 8Stephan Bergmann1-2/+1
Change-Id: I875c4f4382221baaaedcdfe9513ed75706e8517b
2016-05-04Fix Windows-only code, part 7Stephan Bergmann1-1/+1
Change-Id: Idf118bee77b55004897ae085e124b9cec2ba4237
2016-05-04Fix Windows-only code, part 6Stephan Bergmann1-2/+1
Change-Id: Ib9a311dd199db81b0be46a7c32c49a10e1b866e7
2016-05-04While at it, delete Any functions on sal_Bool*Stephan Bergmann5-19/+15
(at least for LIBO_INTERNAL_ONLY), to help further reduce the occurrences of sal_Bool across the code base Change-Id: I70654a0cb56655984c717b7b894f26c9ab47536e
2016-05-03NULL -> nullptrStephan Bergmann1-2/+2
Change-Id: I7e4e36fbff89cb45c01a11dc70c4e6f17fe3bc38
2016-04-28teach stylepolice plugin about ref-counted-pointer namingNoel Grandin10-64/+64
Change-Id: I6e91d22fc1826038c05ddb6fc065563c6a250752 Reviewed-on: https://gerrit.libreoffice.org/24459 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-25-Werror=maybe-uninitializedStephan Bergmann1-2/+3
Change-Id: Iafa3712d3b600e11b687e7ec5a4ea5a14e87a48b
2016-04-25Cannot extract Any to sal_uInt32Stephan Bergmann1-1/+4
...which has the same underlying type as sal_Bool Change-Id: If0548d2830b5924dec06e487c83a468fe8567c87
2016-04-25fix Windows buildNoel Grandin1-2/+3
Change-Id: I35b0d9a1ed6b4929217e75a03132f53844acd5b9
2016-04-25simplify OPropertyMap initNoel Grandin2-82/+70
Change-Id: I4ac86aea7ea391c1c708308b12670005e5eb7d6f
2016-04-22Avoid reserved identifiersStephan Bergmann2-15/+15
Change-Id: I4654278f9a718042efde46755ee25e62494e3fb6
2016-04-22loplugin:salboolStephan Bergmann5-126/+126
Change-Id: Ibcae25d2476de37842e4a0e670b5951f431195a2
2016-04-21clang-tidy modernize-loop-convert in c*Noel Grandin7-30/+27
Change-Id: I77d2548f8be97792660761e6156cd24734a95aaf
2016-04-21new plugin stylepoliceNoel Grandin2-28/+28
check for local variables which follow our member field naming convention, which is highly confusing Change-Id: Idacedf7145d09843e96a584237b385f7662eea10
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann68-649/+649
Change-Id: I6fada7331ee369c35cbe019db4e730ce56cd1a1f
2016-04-18follow-up for clean-up declarations and includesJochen Nitschke1-1/+2
small change for commit 150ac9cf05ed9da6a2af5bc3f820280fd853e519 use forward declaration instead of include Change-Id: Ida9742b49233dc2bd2731e816dd6dc4d5705bb07 Reviewed-on: https://gerrit.libreoffice.org/24222 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-18cppcheck: silence known condition warning in connectivityJochen Nitschke1-8/+4
Change-Id: Ic1e1b2f7aeb6d4c0a2f59f298df125c12a75b081 Reviewed-on: https://gerrit.libreoffice.org/24197 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-18loplugin:passstuffbyrefStephan Bergmann4-5/+5
Change-Id: Ie10757b8026e0bdf8be40f41bb04bb02334241f3
2016-04-18clang-tidy performance-unnecessary-copy-initializationNoel Grandin2-8/+4
probably not much performance benefit, but it sure is good at identifying leftover intermediate variables from previous refactorings. Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657 Reviewed-on: https://gerrit.libreoffice.org/24026 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18clean-up: unused using declarations and includesJochen Nitschke31-231/+3
Searched source for using declarations. Checked if those symbols reappear in the source file, even in comments or dead code but not in #include statements. If they don't reappear, remove the declaration. Remove includes whose symbol got removed. Change-Id: Ibb77163f63c1120070e9518e3dc0a78c6c59fab0 Reviewed-on: https://gerrit.libreoffice.org/24148 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-15loplugin:passstuffbyrefStephan Bergmann2-3/+3
Change-Id: I5c2883dab8045e70467c6d09a75dcb423eecf702
2016-04-13tdf#94306 remove unused boost dependenciesJochen Nitschke1-1/+0
remove <boost/noncopyable.hpp> in pch and remove boost from makefile if it was the only boost entry. Change-Id: Icb945ae59c137571f4f63807601738eea5c3e831 Reviewed-on: https://gerrit.libreoffice.org/24061 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-13tdf#97853 connectivity: fix inverted conditionMichael Stahl2-3/+3
Also in 2 places IS_TYPE was converted to dynamic_cast instead of a typeid check; use typeid there too, just for consistency. (regression from ac9671f94800b647f82b12e718968311a025e87e) Change-Id: I0df47a845eff660c791304c22c97704589ab999f
2016-04-13loplugin:passstuffbyref in connectivityNoel Grandin17-25/+25
Change-Id: I751977ecc1b532f72dd5673767471cb0a2cdbd06
2016-04-12cleanup: remove unused com/sun/star/uno includesJochen Nitschke24-36/+0
Sequence.h(xx), Any.h(xx) and Type.h(xx) and remove unused using-declarations from these files. Add a few missing includes provided by them. Change-Id: I6b91b6d1fdf9d0496dd546c0aab9bdcc6831a5d4 Reviewed-on: https://gerrit.libreoffice.org/23805 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-11clang-tidy performance-unnecessary-value-param in connectivityNoel Grandin8-14/+12
Change-Id: Ie84eeac24f22c5e3d3a4f63728a73023d626ccc0