summaryrefslogtreecommitdiff
path: root/ucb
AgeCommit message (Collapse)Author
2021-04-01Use isEmpty instead of comparing getLength to 0 (ucb)Julien Nabet
Change-Id: I31f91295e1e34efbd0e2b7d2c463f2ca19b512e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113429 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-03-25const OUString -> const OUStringLiteralMike Kaganski
Mostly automated rewrite Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-24Using .md extension/Markdown syntax for modules READMEHossein
Renaming all README files for all top level modules to README.md, applying no content change at this stage to be able to track history of the files. These files should be edited to use correct Markdown syntax later. Change-Id: I542fa3f3d32072156f16eaad2211a397cc212665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112977 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-03-23tdf#124176 Use pragma once in u*Vincent LE GARREC
ucb, uno*, uui Change-Id: Ic4b6d541eb0df8bf7bceddf178ebb5177ad2b87b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112046 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-03-21cid#1474207 silence Unchecked return value from libraryCaolán McNamara
Change-Id: I7c9ec1db7f0255f1063e58c0fbd92fb63d07c833 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112848 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-21cid#1473800 silence Unchecked return value from libraryCaolán McNamara
Change-Id: I677709f2b071c7f738db7fd5754ba66d1d6e1559 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112844 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-19cid#1473830 Resource leakCaolán McNamara
Change-Id: I221468d7030cf3ebf0425ede29e46febe8ffbe05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112763 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-10Drop 'static_cast<cppu::OWeakObject*>' syntactic noiseMike Kaganski
... a leftover from 96388e5e809a48573970df9b6b2649517a08447f. Change-Id: I909a470612c421472d8bf94f80e3e94ecb51d6e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112257 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-10Drop 'static_cast<cppu::OWeakObject*>' syntactic noiseMike Kaganski
... where the object is created in-place, and its type is known Change-Id: Ifabfcf2f3ad0d60152f14e8d970c1faa42115288 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112256 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-08tdf#75280 Convert some sal_uIntPtr in ucb to more appropriate typesAditya Pratap Singh
Change-Id: Icb4ae99fd49a4b080ad8f3df6f15dddcdcb09e42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110491 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-02-27loplugin:refcounting in ucbNoel
Change-Id: I5dd8295648aadafc7dfc73121354aa5f602c2c79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111633 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-19loplugin:refcounting in ucbNoel
Change-Id: Ib62c99b9cb71adda5c94d268f726949117163ede Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111200 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-18More verbose GIO transfer failure informationStephan Bergmann
Change-Id: Id379a545017d1574e1253ef7c1a9dac49f87b043 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111105 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-15loplugin:referencecasting in ucbNoel
Change-Id: I7531ea30e8d141dce1d1bc27ffbca3fcf28d0ef5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110892 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-11loplugin:refcounting generalise type checkingNoel
Change-Id: Ia013878ac9c2918d8eaf9aab16b291d8211e708f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110700 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-09loplugin:referencecasting check for Reference::queryNoel
Change-Id: I008d16d933c70df132699872ac4c39a5c1f87b34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110592 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-08tdf#124176: Use pragma once instead of include guardsShobhit
Applied clang format Change-Id: Idb3f4dc8726115f8d53721bea28cbe3e53adef3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110188 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-02-07Remove unneeded breaksAndrea Gelmini
Extending this: https://gerrit.libreoffice.org/c/core/+/110512 Change-Id: I9e7cf757a346d603d0acb818be0c9bc488c8d5c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110516 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-02-05Revert "Fix typo in code"Stephan Bergmann
This reverts commit 3ed9bba283a6a67864c0928186e277240be0d9ba. osl_Pos_Absolut (include/osl/file.h) is part of the stable URE interface; it must not be changed. Change-Id: I1f49923a9351e4be5aee39b10720d38b424feb9b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110435 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-04Fix typo in codeAndrea Gelmini
Change-Id: Ib8b306a27d25a34e784aeeb72708b0d5d1511f3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110394 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-01-28simplify code, use more subView()Noel
Change-Id: I569c7f34acbdf8451cd5c9acf1abd334637072d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110051 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-28add string_view variants of methods to O[U]StringBufferNoel
and update the stringview loplugin to detect cases where we can use these new methods. Change-Id: I998efe02e35c8efcb3abfb4d7186165bbe6dfb2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110046 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-04loplugin:stringviewparam: operator +=Stephan Bergmann
Change-Id: I30ce1b5bd8fb168da7067c1967c5af2569df2653 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108512 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-27Simplify loplugin:stringviewparam comparison operator handlingStephan Bergmann
In practice, it works fine to look at all of them, regardless of actual argument types. Change-Id: Ifc49cbcd6003c8837c1b3f81d432c59fb0657bf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108366 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-25ucp: fix call to getComponentContextAndrew Udvare
Commit 3f9940c2e050830051a31e4b70736132e034a9db mistakenly removed include/ucbhelper/getcomponentcontext.hxx seeing the getComponentContext method as unused. According to that file, ucbhelper::getComponentContext was just a duplicate of comphelper::getComponentContext so this commit changes to calling that method instead. Change-Id: Ibd66b56a72afce437a26417d7944ec1ace34a4eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108262 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-14tdf#115643 make onedrive work again by switching to graph APIChristian Lohmaier
the live SDK method had been deprecated quite a while ago and has been turned off a while back. Notes: While you can access and save existing files using the remote files dialog, creating new files or using "save as" requires using the LibreOffice open/save dialogs. Authentication is clunky: username and password you're asked when creating a new connection is not used at all for connecting, so only fill out a username to label your onedrive entry. Actual authentication is done in browser - copy'n'paste the URL from the dialog into the browser, login and approve access for LibreOffice (approving access only necessary once), then you get redirected to localhost, ignore that there is nothing to display. The important part is the code from the URL-bar. Copy and paste that into the LibreOffice dialog and LO can request an authentication token for API access. Testing this feature requires compiling with corresponding api-keys specified in configure/having an app registered with microsoft. Change-Id: I2db11ac09f9fdc354a10d6c749b2bec84b5d34a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107646 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-12-11Adapt the remaining OUString functions to std string_viewStephan Bergmann
...for LIBO_INTERNAL_ONLY. These had been missed by 1b43cceaea2084a0489db68cd0113508f34b6643 "Make many OUString functions take std::u16string_view parameters" because they did not match the multi-overload pattern that was addressed there, but they nevertheless benefit from being changed just as well (witness e.g. the various resulting changes from copy() to subView()). This showed a conversion from OStringChar to std::string_view to be missing (while the corresponding conversion form OUStringChar to std::u16string_view was already present). The improvement to loplugin:stringadd became necessary to fix > [CPT] compilerplugins/clang/test/stringadd.cxx > error: 'error' diagnostics expected but not seen: > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd] > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd] > 2 errors generated. Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-06Avoid relying on OString(char const *) ctor's undocumented behaviorStephan Bergmann
...of treating nullptr like an empty string Change-Id: I41b8b88f27ed3d3c404781f897952b7d1e0e01e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107279 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-01OSL_FAIL.*exception -> TOOLS_WARN_EXCEPTIONNoel
Change-Id: I6800e23ead2767d245d5da71d2d40e0f8a6d7e1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106859 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-30loplugin:stringviewparam include comparisons with string literalsNoel
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-18tdf#123936 Formatting files in module ucb with clang-formatPhilipp Hofer
Change-Id: I645c81c1454d3eeea6083387f1d343985b4b6d96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105722 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-15Extend loplugin:stringviewparen: subViewStephan Bergmann
Change-Id: Iee4833b148a5e17e09f84bdfbc8692aa5a956618 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105777 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-11loplugin:stringviewNoel
Add new methods "subView" to O(U)String to return substring views of the underlying data. Add a clang plugin to warn when replacing existing calls to copy() would be better to use subView(). Change-Id: I03a5732431ce60808946f2ce2c923b22845689ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105420 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-29Revert questionable tools::Long in commented-out codeStephan Bergmann
If it were not commented out, it should presumably stay `long` for similar reasons as the corresponding 13c0326d237cb4860b121ceba8ecb04fe96ae479 "ne_lock::timeout is of type long, so keep using that here" in ucb/source/ucp/webdav-neon/NeonSession.cxx. Change-Id: I2fee057887b6aaceab158edb6b09cc514249061f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105014 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-29SortedResultSet uses sal_IntPtr instead of longStephan Bergmann
...(which had now been changed to tools::Long with 4fbd63860500b2db76df4d5aedbe5e3aa31fac69 "switching long to a 64-bit type on 64-bit windows") since 9eb4e4dc51a4448d59ee80f39144387c7b3cffaf "Some more modules at least building with mingw64" Change-Id: Iea4a68452f22a3c1d4515294e7dab5148e80da05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105009 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-29ne_lock::timeout is of type long, so keep using that hereStephan Bergmann
...partially reverting 4fbd63860500b2db76df4d5aedbe5e3aa31fac69 "switching long to a 64-bit type on 64-bit windows" Change-Id: I858630e5de76942a001ba619085ee07183df6ff6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104994 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-29libcmis::Property::getLongs returns std::vector<long>Stephan Bergmann
...so that needs to be used here. Reverting part of 7a09d67e1c76db7cb6a87a2ceaa6de7325342b75 "convert some more long -> tools::Long". Change-Id: I73be5bcc5db244012a9cfbc834e85665ba9cfc10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104993 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-29Fix some confusion between UNOIDL long (i.e., sal_Int32) and C++ longStephan Bergmann
...dating back to before d3329bacd8a925ec070ad06ea3d9a6a026a3696b "Moved here from module 'chaos'", in the meantime hit by 4fbd63860500b2db76df4d5aedbe5e3aa31fac69 "switching long to a 64-bit type on 64-bit windows" Change-Id: I378379abf520ce914f1ba2789d788ab726038c50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104992 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-28convert some more long -> tools::LongNoel
Change-Id: Ide9811c1a7582454b3fcf655b70ea106ed56509a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104914 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-26switching long to a 64-bit type on 64-bit windowsNoel
(*) create a rewriting plugin to do most of the work, heavily based on the fakebool plugin (*) but there are still a number of "long"s in the codebase that will need to be done by hand (*) the plugin needs lots of handholding, due to needing to add #include and update macros Change-Id: I8184d7000ca482c0469514bb73178c3a1123b1e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104203 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-05Removed duplicated includeAndrea Gelmini
Change-Id: Ib3fb174f390424f765113a7565a8b87dbede7342 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103938 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2020-10-04use more TOOLS_WARN_EXCEPTIONMike Kaganski
Change-Id: I269f88d82680f6a969a8bf582f0ae00cc7636509 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103925 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-10-04loplugin:reducevarscope in toolkit..unotoolsNoel
Change-Id: I439b9f456ac0bfaa3eb9bf17472053bd4787e828 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103840 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-03use more TOOLS_WARN_EXCEPTIONNoel
Change-Id: I8b5cde993c13e0b7c8c830b1ff698933a6b7cfd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103863 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-02Use the new single-instance="true" attribute in ucbStephan Bergmann
Change-Id: I7eb38f0da1d88fd0f7ca4a1054546617b10a3502 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103843 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-01Use the new single-instance="true" attribute in ucbStephan Bergmann
It looks like 3d44c6a49b20415616dab7a2de2820da5efab309 "ucb/core: create instances with uno constructors" mixed up com.sun.star.comp.ucb.UcbPropertiesManager (which had originally been implemented with the single-instance cppu::createOneInstanceFactory) and com.sun.star.comp.ucb.SimpleFileAccess (which had originally been implemented with the multi-instance cppu::createSingleFactory), using a static g_Instance in the C++ constructor function of the former but adding a fake <singleton> to the *.component <implementation> of the latter. Change-Id: Ida7cb242a73fbe7689094e239ffe0c0291cf1d3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103738 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-09-27Remove unused include list in ucb/cmis_contentJulien Nabet
Change-Id: I7c554e883691e2f97e2f48b2a0353dfa9d4d84d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103507 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-09-22OUStringLiteral/OStringLiteral coverity PARSE_ERROR workaroundCaolán McNamara
do more like commit 121771e37f7e2de41cd5643475861062bf25627b Date: Mon Sep 21 09:17:54 2020 +0200 Make some OUStringLiteral vars constexpr cause coverity can live with that Change-Id: I9efd7f848289c4865997a44c6780373068422227 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103147 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>