summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/firebird/Blob.cxx
AgeCommit message (Collapse)AuthorFilesLines
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann1-1/+1
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-10Use std::vector instead of css::uno::SequenceMike Kaganski1-6/+6
This allows to avoid multiple reallocations during successive reads Change-Id: I74102d21c5dc4d1e92e27ede3490e9ed07bd568e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121873 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-10tdf#120129: don't forget to update buffer size to actual lengthMike Kaganski1-0/+3
Otherwise extra bytes get written to the resulting string from the too long buffer. Change-Id: Iccde16b8002f214df6f86f484f288ec464c6b674 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121872 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-10update firebird modelinesCaolán McNamara1-2/+2
with solenv/bin/add-modelines -p connectivity/source/drivers/firebird because a bunch are missing the trailing ones Change-Id: I168c22586744cd666e6c18a569e143b6caccd421 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116963 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-29loplugin:stringviewparam extend to new..Noel1-5/+5
O[U]StringBuffer methods Change-Id: I0ffbc33d54ae7c98b5652434f3370ee4f819f6f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110090 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-18loplugin:flatten connectivityNoel Grandin1-11/+11
Change-Id: Ic1d9eb84b64ebde99e15704a10b27f21447df4d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92469 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-14tdf#42949 Fix IWYU warnings in connectivity/*/*cxxGabor Kelemen1-2/+1
Except for platform specific drivers/ado and drivers/macab dirs Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I24b741cded8995e29ac3d518aeaa0d60b3c55b56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86317 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-16tdf#42949 Fix IWYU warnings in connectivity/*/*hxxGabor Kelemen1-0/+1
Except for non Linux specific parts: connectivity/source/drivers/macab/ connectivity/source/inc/ado/ Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Iba6d0cd0effdac777be6fbc8f12f2e92cae47887 Reviewed-on: https://gerrit.libreoffice.org/84174 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-06-14loplugin:logexceptionnicely in configmgr..connectivityNoel Grandin1-2/+3
Change-Id: I1cf8250dba63b744f882e54e9eb572884f292975 Reviewed-on: https://gerrit.libreoffice.org/74020 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-05Fix typosAndrea Gelmini1-1/+1
Change-Id: Id5489f3e8f1d3ced3d57b56f8d3a7a4818af0fca Reviewed-on: https://gerrit.libreoffice.org/62377 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-07-16Add missing sal/log.hxx headersGabor Kelemen1-0/+1
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from connectivity to cui Change-Id: I9903c10d0a04bbeb93d0f776d1d252b152459499 Reviewed-on: https://gerrit.libreoffice.org/57408 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-01-15convert a<b?a:b to std::min(a,b)Noel Grandin1-2/+2
with something like git grep -nP '(.*)\s*<\s*(.*)\s*\?\s*\g1\s*:\s*\g2' -- *.?xx Change-Id: Id5078b35961847feb78a66204fdb7598ee63fd23 Note: we also convert a>b?b:a Reviewed-on: https://gerrit.libreoffice.org/47736 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-12More loplugin:cstylecast: connectivityStephan Bergmann1-1/+1
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: Idbefb16acae20ab137497e78c9bc5dc5634c07fe
2017-12-30coverity#1427009 Uninitialized scalar fieldCaolán McNamara1-0/+1
Change-Id: I372e9f7e286e2c563533c88205b7eb5ada1c02b4
2017-12-28tdf#104734 Firebird improve XClob implementationTamas Bunth1-7/+58
Create a more effective implementation of XClob::length() and XClob::getSubString() methods, where string is read segment-by-segment instead of reading the whole underlying blob. That way it is possible to handle big texts which would not fit into memory. Also allow reading Clob data from a resultset with getString() and writing it in a prepared statement with setString(). Implement XPreparedStatement::setClob(). Also implement a private version of setClob() for creating a clob from OUString: Allow the creation of a clob column with GUI by adding a new type in ODataBaseMetaData::getTypeInfo(). Change-Id: Ibcbbdd80e8eed5e2a3fe55b0fa196401f1bcbcdf Reviewed-on: https://gerrit.libreoffice.org/47093 Reviewed-by: Tamás Bunth <btomi96@gmail.com> Tested-by: Tamás Bunth <btomi96@gmail.com>
2017-12-09Firebird: check isc_blob_info errorTamas Bunth1-1/+1
Change-Id: I398bf195a8cfebe081fd3034d6c539b02aaf6d73 Reviewed-on: https://gerrit.libreoffice.org/46148 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin1-1/+1
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-28loplugin:constparams handle constructorsNoel Grandin1-1/+1
had to change the structure of the plugin considerably, was too messy to structure it to do the calculations on a per-function basis Change-Id: I4edee7735f726101105c607368124a08dba21086 Reviewed-on: https://gerrit.libreoffice.org/40516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-21remove unnecessary explicit linefeeds from end of SAL and OSL log callsNoel Grandin1-2/+1
Change-Id: I3fa363c8e76e6cfb297f4ec346e3f031c09d6fbf Reviewed-on: https://gerrit.libreoffice.org/36727 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-06Add missing #includesStephan Bergmann1-0/+3
...and remove some unncessary using directives/declarations, in preparation of removing now-unnecessary #includes from cppumaker-generated files, post e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception specifications". Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-01-26Remove dynamic exception specificationsStephan Bergmann1-12/+0
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-11XBlob::getBytes expects 1-indexed positionTamás Bunth1-3/+4
There was also a wrong relation. Now blob resets its position. Change-Id: I41caf7cdfa261cafa5b9e66c9523c7f15225bfd8 Reviewed-on: https://gerrit.libreoffice.org/32937 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2016-06-21connecitivty: [loplugin:nullptr]Michael Stahl1-0/+8
Change-Id: Ic717e1d119e1a5b8a87caca263322d9e58fe6c68
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann1-1/+1
Change-Id: Iefeeb51c2b101c097a8d77a4625f84baf1f2da44
2015-04-15remove unnecessary use of void in function declarationsNoel Grandin1-1/+1
ie. void f(void); becomes void f(); I used the following command to make the changes: git grep -lP '\(\s*void\s*\)' -- *.cxx \ | xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;' and ran it for both .cxx and .hxx files. Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
2015-01-20Some more loplugin:cstylecast: connectivityStephan Bergmann1-1/+1
Change-Id: Iee1d11aef454284dbe050780c4308917c1a2b36f
2014-11-14coverity#1158396 Uncaught exceptionCaolán McNamara1-2/+29
Change-Id: I6752a534bca8f81627cdd616ac0f2268824299e0
2014-10-31coverity#1158395 Uncaught exceptionCaolán McNamara1-5/+51
and coverity#1158394 Uncaught exception Change-Id: I73430678c658202475e0073c3c9bde0a072c1ee9
2014-10-13coverity#1158396 Uncaught exceptionCaolán McNamara1-2/+5
Change-Id: I0306b8431641d841027b30dfe1c03ecad5df6867
2014-07-21coverity#706376 Uncaught exceptionCaolán McNamara1-2/+2
Change-Id: Ic18823fd60826c144058df32c27ab25d58664e30
2014-06-04connectivity: fix includesThomas Arnhold1-1/+1
Change-Id: I5d5dc6871789865189c78fe9135e7f8bff829489
2014-05-22cppcheck: Exception should be caught by referenceThomas Arnhold1-2/+2
Change-Id: Ib92122311186da16fbef9441560bb7a013072e76
2014-02-26cppuhelper: retrofit std::exception into overriding exception specsStephan Bergmann1-10/+10
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-01-01fdo#70664 Allow reading firebird Blob as InputStream.Andrzej Hunt1-95/+146
Change-Id: Ie0cb93a902961b3f37daf435828263478c9d2997
2013-07-31Remove unnecessary F- prefix for firebird-sdbc files.Andrzej J.R. Hunt1-1/+1
Change-Id: I6574ef7fd1c26770a74b2d1f2b0d997fcca97779
2013-07-25Make evaluateStatusVector a namespace function. (firebird-sdbc)Andrzej J.R. Hunt1-12/+6
We're not in java after all... Change-Id: I145fbd7adad5e03a7c9e7bcf28cb2f80ce40ba9e
2013-07-21Implement the first parts of XBlob. (firebird-sdbc)Andrzej J.R. Hunt1-0/+214
Change-Id: Iebb80168ec6fb941ca936834ed2275a598dff55e