summaryrefslogtreecommitdiff
path: root/connectivity
AgeCommit message (Collapse)Author
2023-02-15Drop 'using namespace ::std' in dirs b* c*Gabor Kelemen
Change-Id: I59392ee7aa71c219e475a09da67a868cfdd14b41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147074 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2023-02-14disable script dumpCaolán McNamara
Change-Id: I04d740cc0fcf87daa192a0a6af34138278043a19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146905 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-16XUnoTunnel->dynamic_cast in file::OResultSetNoel Grandin
Change-Id: Icfb3760b05e80925833f2ecaa294a81c85b6c672 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145561 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-16XUnoTunnel->dynamic_cast in connectivityyNoel Grandin
Change-Id: Ibe5e87a1ef1bdc11451e8fe240d017f1ef60dfe6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145556 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-12-06Resolves: tdf#152381 Treat 0-0-0 invalid date as 0 relative daysEike Rathke
Change-Id: I70cf18395e26ababa854299a58f8839f5bdf8e2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143748 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-11-22Resolves: tdf#152114 Use comphelper::date algorithmsEike Rathke
... that can actually cope with negative (BCE) proleptic Gregorian calendar dates, which already for Julian calendar dates 0001-01-01 and 0001-01-02 they are. Change-Id: I38481007e705f95da0f4f73a6bb298ce42494f72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143115 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-10-21loplugin:referencecasting look for a new patternNoel Grandin
Change-Id: Ib7ded8db2c513909159f0876389f63b60082a529 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141618 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-11escapeWith is just a substitution for OUString::replaceAllMike Kaganski
Change-Id: Ib0b84826a47474f58fa87ed4e1ca1d16c89e1620 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141217 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-11Deduplicate O(U)StringConcatenationMike Kaganski
And use an overloaded helper function with a better (?) unified name to show that the result is not an O(U)String. Change-Id: I8956338b05d02bf46a6185828130ea8ef145d46b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141203 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-09-29split utl::TempFile into fast and named variantsNoel Grandin
which makes it easier to know what each variant requires to stay on it's happy path Change-Id: I3275a2543573367714bc78092e882f6535507285 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140469 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-27use more string_view in connectivityNoel Grandin
Change-Id: I313fe10ce3166a0cd96ae0a98e571fd4356da3b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140620 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-22connectivity: use default member initializers in OWriterConnectionMiklos Vajna
It's less code and does the same. Change-Id: I8660f5409a062da7eb608000fee0e5a9bb07cb2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140356 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-09-18use more string_view in utl::TempFileNoel Grandin
Change-Id: I151c66479053b9b5b7699a4938a622b4320aeaa0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140104 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-17cid#1500499 Resource leakCaolán McNamara
the only change should be to the two trailing cases in OSQLParseNode::substituteParameterNames which do seem to leak. The closest I got to triggering the actual code is toggling into sqlview mode of a query but couldn't quite construct a sql statement to trigger it. Change-Id: I320dc4df3b18a18b236c91ee30329c10001c9a08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140081 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-16OSL_ENSURE->assert where we would crash if not trueCaolán McNamara
Change-Id: I1544573ea9f57b5ca732c9b05acae9b4f91f53ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140080 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-15tdf#150877: Add support for Kamenický and Mazovia encodingsJulien Nabet
...as referenced e.g. at <https://docs.microsoft.com/en-us/previous-versions/visualstudio/foxpro/aa975345(v=vs.71)> "Code Pages Supported by Visual FoxPro". That source lists those two encodings with "code page" values 895 and 620, resp. (which might be what we call "Windows code pages" in include/rtl/tencinfo.h) and "code page identifier" values 0x68 and 0x69, reps. (which might be what we call "Windows charsets" in include/rtl/tencinfo.h. But I deliberately left these two new RTL_TEXTENCODING_* values without any mappings to such Windows codepages etc., as I didn't find any authoritative sources. What I used is the information available at <https://en.wikipedia.org/wiki/Kamenick%C3%BD_encoding> and <https://en.wikipedia.org/wiki/Mazovia_encoding>. (And while at it, I also updated the instructions what to do "Whenever some encoding is added here" in include/rtl/textenc.h.) This commit is building on some prior, abandoned work by Julien Nabet at <https://gerrit.libreoffice.org/c/core/+/139819> "tdf#150877: DBF Mazovia encoding (0x69)". Change-Id: Iae8af4ebab8915411499ae7ef951339b335aa857 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140014 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-09-14move ErrCode to comphelper and improve debug output stringNoel Grandin
need to move it, because modules "below" vcl want to use the debug output method Change-Id: Ibcaf4089a1e0b3fcc0b5189c7ebf1aae90f50b48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139791 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-08Simplify by using replace instead of replaceAt in loop in connectivity (3)Julien Nabet
Change-Id: If7517356959d4720bbe07acea822ec835a681a17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139456 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-09-08Simplify by using replace instead of replaceAt in loop in connectivity (4)Julien Nabet
Change-Id: Iab92f1ee2be1e5b9ab3fa005890acfe9acbf3732 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139460 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-09-08Simplify by using replace instead of replaceAt in loop in connectivity (2)Julien Nabet
Change-Id: I9bbe005f0bd1399b9c43cebe0e4c58d3ec88087c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139455 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-09-08loplugin:unusedmethodsNoel Grandin
Change-Id: I94861f9fa8d8a5d22a89c902984ad2afed43dc14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139645 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-08loplugin:virtualdeadNoel Grandin
Change-Id: Iceb6916bcc8c211a72fccfa4bbcbb22c96a72050 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139642 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-04tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macrojsala
Change associated for by std::find_if in sqlbison.y Also change some integer by std::size_t Change-Id: I0d2100fbd7c22729da6ce0462c6cc093e0767fb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136263 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-09-04Simplify by using replace instead of replaceAt in 2 loops in connectivityJulien Nabet
Change-Id: Ia89ab8131be9cda8b5365fa41769a32409c35a79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139358 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-01connectivity: use default member initializers in OWriterTableMiklos Vajna
It's less code and does the same. Change-Id: I2469868a9fc97f4a9e6a89d53f50686ab89177ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139130 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann
...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>
2022-08-18cid#1500536 silence Resource leakCaolán McNamara
Change-Id: Ibd626a90136f89af731dc2bfa684d99609d44b90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138481 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-17cid#1500701 silence Dereference after null checkCaolán McNamara
Change-Id: Ic982e7d46688628396d659d0c1a9d17fdb8c43a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138360 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-12tdf#113753 Easier use of CSV in Wizards->Address Data SourceRadhey Parekh
Change-Id: Ie14aaa8621379acdb9741f67fcdeab6c477e382f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138153 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-08-11connectivity: avoid divide by zero in calculateTimeOutsCaolán McNamara
See https://crashreport.libreoffice.org/stats/signature/connectivity::OConnectionPool::propertyChange(com::sun::star::beans::PropertyChangeEvent%20const%20&) To reproduce this, blow away your config and start writer, visit tools, options, base, connections and enable connection pooling enabled, find com.sun.star.sdbcx.comp.hdqldb.Driver and "enable pooling for this driver" and "apply" with the default 120 seconds, ok and exit then open a database (based on hsqldb) and click on "tables" (to start a connection) that default 120 seconds is the input for calculateTimeOuts (this becomes a final m_nALiveCount of 10 by the divide by 20), now visit the options again and change the 120 to something else and ok and the input for calculateTimeOuts is the old "10" calculated before and not the new expected value. The reason appears to be in OConnectionPool::propertyChange, it expects to get the new value of the property from evt.NewValue but it gets an empty Any so the m_nALiveCount is not actually changed, so the assumption it was set and will be >= 20 and sanely divisible by 20 doesn't hold. For this easy fix, fetch the new value explicitly from the config Change-Id: Ie91bf5328634f9aafbda1814b10c29b86a3f9cbe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138111 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-07add libebook-1.2.so.21Rene Engelhard
comparing the Debian packages of 3.44.1 and 3.45.2 the actual headers didn't change, so no code changes needed afaics Change-Id: Ifae6395831ca538bb1699a7f2ba4cb504e552baa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137918 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-03Fix 32-bit buildsStephan Bergmann
...after fc898f20cffe94cfde0a24027480fb97ab84563e "Use some more appropriate index variable types", as reported by Rene, > /home/rene/master/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx:313:51: error: conversion from 'guint' {aka 'unsigned int'} to 'connectivity::ORowSetValue' is ambiguous > 313 | aRow[17] = new ORowSetValueDecorator( i ); > | ^ Change-Id: I1532a012a9d8c3c4e3768c48e78ed6f50be3fd50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137744 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-07-21elide some makeStringAndClear() callsNoel Grandin
Change-Id: Ifd8de0042b843de0766a370fb19b9f7791974612 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137284 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-19No need to cast to char hereStephan Bergmann
...similar to 85d15cfaf9b0665d907e099d6588dea0ced556ff "No need to cast to char here" Change-Id: I9f8b226e90d67f49fb38f9139c03529add787c64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137214 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-07-11tdf#149951: MySQL/MariaDB (direct connection) save images in BLOB-fieldsJulien Nabet
There were several pbs: 1) no size value was given to resetSqlVar whereas all BLOB or related need an explicit size so was 0 => provide size value with x.getLength() 2) Type provided was Sequence instead of a sal_Int8 so unitSize was 8 instead of 1 => provide "&x[0]" instead of "&x" 3) m_bindMetas[nIndex].length wasn't filled => initialize it with x.getLength() Change-Id: Iaca6a8f8142601c224d6f7aabe4414e61586d29f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136964 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-07-05Related tdf#137145 tdf#137569 Capitalization + punctuation fixesAdolfo Jayme Barrientos
Change-Id: Icd8a631da83c86333c7e5bcee0069165899d3041 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136822 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-07-02Use some more O3TL_UNREACHABLEStephan Bergmann
Change-Id: I42401a5ba68e6e0d5b99fae4adbea01cd5fa1600 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136778 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-07-01Use some more O3TL_UNREACHABLEStephan Bergmann
Change-Id: I5885c1f33fe7d15e6bd0b572b6d0db1410252362 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136777 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-29related tdf#126961 don't crash when access to the macOS address book is deniedChristian Lohmaier
quick'n'dirty fix, ideally the user should get a message to reset the privacy setting and try again... Change-Id: I51cb852e305e285c87ff3a0e15b5198a2b1c5970 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136620 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-06-16loplugin:moveitNoel Grandin
Change-Id: Ic593974a44d9e327e0385c7ffaaa6d42576ae01a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135911 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-15Use some more appropriate index variable typesStephan Bergmann
Change-Id: Ife891e8757e3f83d53245dfd04594b0359a897cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135831 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-13clang-tidy modernize-pass-by-value in connectivityNoel Grandin
Change-Id: I1f1b609254c7f8cfba14c248167f81b51684d8e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135727 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-08tdf#149470: Firebird, Clob may need several segments to store a very long inputJulien Nabet
Change-Id: I85c7789f46d834d2ae1b251f915382f833bd529d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135480 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2022-05-30Fix linking Library_evoabStephan Bergmann
> ld.lld: error: undefined symbol: LanguageTag::~LanguageTag() > >>> referenced by NResultSet.cxx:82 (connectivity/source/drivers/evoab2/NResultSet.cxx:82) > >>> /home/sbergman/lo3/core/workdir/CxxObject/connectivity/source/drivers/evoab2/NResultSet.o:(connectivity::evoab::ComparisonData::ComparisonData(std::__1::vector<connectivity::evoab::FieldSort, std::__1::allocator<connectivity::evoab::FieldSort>> const&)) > >>> referenced by NResultSet.cxx:82 (connectivity/source/drivers/evoab2/NResultSet.cxx:82) > >>> /home/sbergman/lo3/core/workdir/CxxObject/connectivity/source/drivers/evoab2/NResultSet.o:(connectivity::evoab::ComparisonData::ComparisonData(std::__1::vector<connectivity::evoab::FieldSort, std::__1::allocator<connectivity::evoab::FieldSort>> const&)) after 7b87afa899be289306c709d35eb1d32c0b73b1ed "clang-tidy modernize-pass-by-value in unotools" changed > --- a/include/unotools/intlwrapper.hxx > +++ b/include/unotools/intlwrapper.hxx > @@ -61,7 +61,7 @@ private: > void ImplNewCollator( bool bCaseSensitive ) const; > > public: > - IntlWrapper(const LanguageTag& rLanguageTag); > + IntlWrapper(LanguageTag aLanguageTag); > ~IntlWrapper(); > > const LocaleDataWrapper* getLocaleData() const Change-Id: I29371b27c260c822c427dab70bcb29943e34dfc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135144 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-24Use o3tl::make_unsigned in some placesStephan Bergmann
...where a signed and an unsigned value are compared, and the signed value has just been proven to be non-negative here Change-Id: I20600d61a5d59d739bc1bee838c0038e4611aec2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134875 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-23Fix typosAndrea Gelmini
Change-Id: I53f00e1914283480600dbe84ee96fb38e3cc8e03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134808 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-05-13add SvStream::ReadLine(OStringBuffer... to reduce OString allocationNoel Grandin
and use it where possible Change-Id: I3efc7a642f73661ce606c917c0323ba9948521c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134265 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-12speed up simple use of NamedValueCollectionNoel Grandin
where instantiating and allocating a whole map just to extract a single key is way inefficient Change-Id: I55248bc71a9e8826cab9b76fa6916bfa888efa0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134226 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-09tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macroPragat Pandya
Change-Id: I54257e87da0cd66da59d820c7960c3e4b020fda3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134027 Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> Tested-by: Jenkins
2022-05-05loplugin:unusedvariableplusNoel Grandin
Change-Id: Id93086be1224b6f6bf0bdaa1d50b4f289099027e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133876 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>