summaryrefslogtreecommitdiff
path: root/ucb
AgeCommit message (Collapse)AuthorFilesLines
2020-04-15"General Internet Error" dialog appearing on gio mountCaolán McNamara1-1/+3
we get a GError of G_IO_ERROR_FAILED_HANDLED which is documented as "Operation failed and a helper program has already interacted with the user. Do not display any error dialog." PENDING seems to describe this state better than a generic error case and results in no error dialog. Change-Id: Iee382e49edaa0a734526659971e0339991e2c03e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92171 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-11-21tdf#128598: Revert "Move dubious file: -> smb: conversion from...Stephan Bergmann2-20/+0
INetURLObject to file UCP" It turns out that there is lots of code in and around e.g. SfxMedium::LockOrigFileOnDemand (sfx2/source/doc/docfile.cxx) that treats document URLs non-generically and treats file URLs specially. That means that it does not work to transparently rewrite a file URL as an smb URL in the underlying UCB layer. So for libreoffice-6-4 revert the change again. (For master towards LO 6.5, I plan to instead completely drop the feature of silently treating certain forms of file URLs on Linux as smb URLs.) This reverts commit 46c645bf4e9909f5296e75028f1f5434e83942d2. Conflicts: tools/qa/cppunit/test_urlobj.cxx ucb/source/ucp/file/prov.cxx Change-Id: I94ac0637115bea36924099951efd8542854a727d Reviewed-on: https://gerrit.libreoffice.org/83396 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-13Extend loplugin:salbool to loplugin:fakeboolStephan Bergmann1-1/+1
...checking for unnecessary uses of more "fake bool" types. In the past, some of the checks involving the types of variables or data members, or the return types of functions, issued warnings that required surrounding code to be changed too (e.g., when changing the signature of a function whose address was taken). These checks have been tightened now to not warn in such cases (which avoids warnings that require changes to additional code, or changes that might even be impossible to make, at the cost of being less aggressive about removing all unnecessary uses of those "fake bool" types). Change-Id: I70eb75039817cda34ed611387ee27dc5f36a3e2e Reviewed-on: https://gerrit.libreoffice.org/82554 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-03loplugin:stringaddNoel Grandin2-4/+4
tweak the plugin to be more permissive, then validate by hand afterwards Change-Id: I40c5c911fe6ff7e45baaca372abf7dac211d9654 Reviewed-on: https://gerrit.libreoffice.org/81942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-02New loplugin:conditionalstringStephan Bergmann4-8/+8
Change-Id: I2eab990c15f845b44a3b598571aca361dadf9ff3 Reviewed-on: https://gerrit.libreoffice.org/81946 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-31Fix StringAdd::isCompileTimeConstantStephan Bergmann3-28/+14
...to find StringLiteral on the RHS of +=. Which revealed that the VisitCompoundStmt/checkForCompoundAssign logic needed to be fixed, too, so that s += side_effect(); s += "literal"; s += side_effect(); only gets combined to s += side_effect() + "literal"; s += side_effect(); and not all the way to s += side_effect() + "literal" + side_effect(); Change-Id: I432e3458b933a7d0ad6141c747b675cc8b0f0ba4 Reviewed-on: https://gerrit.libreoffice.org/81804 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-29tdf#42949 Fix IWYU warnings in ucb/*/*cxxGabor Kelemen89-227/+84
Also recheck hxx files after recent changes in f-u-i Note: to build ucb/source/ucp/webdav one needs to use the --with-webdav=serf configure option Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I69c3a869394b0667b4d51e18e5293000872227a5 Reviewed-on: https://gerrit.libreoffice.org/81496 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-10-28loplugin:stringadd improve detectionNoel Grandin1-4/+2
if one side of the expression is a compile-time-constant, we don't need to worry about side-effects on the other side Change-Id: Iee71ea51b327ef244bf39f128f921ac325d74e2b Reviewed-on: https://gerrit.libreoffice.org/81589 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21Silence new Clang 10 trunk -std=c++2a -Wambiguous-reversed-operator for nowStephan Bergmann1-0/+2
It is unclear whether this will really be errors in a final C++20 standard, see <https://github.com/llvm/llvm-project/commit/ 974c8b7e2fde550fd87850d50695341101c38c2d> "[c++20] Add rewriting from comparison operators to <=> / ==" for details. Change-Id: I3a7c2574a65952c8d255107823a1d1e18b2cbe4c Reviewed-on: https://gerrit.libreoffice.org/81268 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-21size some stringbuffer to prevent re-allocNoel Grandin3-3/+4
found by the simple expidient of putting asserts in the resize routine. Where an explicit const size is used, I started with 32 and kept doubling until that site did not need resizing anymore. Change-Id: I998787edc940d0a3ba23b5ac37131ab9ecd300f4 Reviewed-on: https://gerrit.libreoffice.org/81138 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-17Silence Clang 10 trunk -Wdeprecated-volatile in GLib for nowStephan Bergmann1-0/+5
See <https://gitlab.gnome.org/GNOME/glib/merge_requests/1170> "Avoid C++20 deprecated assignment to volatile" for a potential fix in GLib (but also see my question at <https://github.com/llvm/llvm-project/commit/ 4a6861a7e5b59be24a09b8b9782255d028e7aade#commitcomment-35540755> "[c++20] P1152R4: warn on any simple-assignment to a volatile lvalue" whether that Clang warning is actually wanted here). With glib2-devel-2.62.1-1.fc31.x86_64, the suppressed warnings looked like > libreofficekit/source/gtk/lokdocview.cxx:327:1: error: use of result of assignment to object of volatile-qualified type 'volatile gsize' (aka 'volatile unsigned long') is deprecated [-Werror,-Wdeprecated-volatile] > G_DEFINE_TYPE_WITH_CODE (LOKDocView, lok_doc_view, GTK_TYPE_DRAWING_AREA, > ^ > /usr/include/glib-2.0/gobject/gtype.h:1617:56: note: expanded from macro 'G_DEFINE_TYPE_WITH_CODE' > #define G_DEFINE_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, 0) {_C_;} _G_DEFINE_TYPE_EXTENDED_END() > ^ > /usr/include/glib-2.0/gobject/gtype.h:2034:3: note: expanded from macro '_G_DEFINE_TYPE_EXTENDED_BEGIN' > _G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER(TypeName, type_name, TYPE_PARENT, flags) \ > ^ > /usr/include/glib-2.0/gobject/gtype.h:2005:7: note: expanded from macro '_G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER' > g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \ > ^ > /usr/include/glib-2.0/glib/gthread.h:257:17: note: expanded from macro 'g_once_init_leave' > (void) (0 ? *(location) = (result) : 0); \ > ^ Change-Id: If67ad04f8fb242f50b43a1d98ad2b28c4bed55a4 Reviewed-on: https://gerrit.libreoffice.org/80937 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-17Remove some memset callsMike Kaganski1-2/+1
Replace them with default initialization or calloc Change-Id: I747f53c2ced2d0473fd5a5ede4f8520a0633dcc1 Reviewed-on: https://gerrit.libreoffice.org/80805 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-15new loplugin:bufferaddNoel Grandin3-18/+6
look for OUStringBuffer append sequences that can be turned into creating an OUString with + operations Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6 Reviewed-on: https://gerrit.libreoffice.org/80809 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-14loplugin:stringadd look for unnecessary temporariesNoel Grandin1-2/+2
which defeat the *StringConcat optimisation. Also make StringConcat conversions treat a nullptr as an empty string, to match the O*String(char*) constructors. Change-Id: If45f5b4b6a535c97bfeeacd9ec472a7603a52e5b Reviewed-on: https://gerrit.libreoffice.org/80724 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-09use cppu::WeakImplHelper in HierarchyDataSourceNoel Grandin2-52/+5
Change-Id: I52da5a05e20f4971720e59589511eeacb1911b95 Reviewed-on: https://gerrit.libreoffice.org/80454 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-08use cppu::WeakImplHelper in FTPContentIdentifierNoel Grandin2-66/+3
Change-Id: Id4ea2006fab9607fdbd744ba73deb3dbd30b374b Reviewed-on: https://gerrit.libreoffice.org/80453 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-08use cppu::WeakImplHelper in fileaccess::FileContentIdentifierNoel Grandin2-68/+2
Change-Id: I944bd19d432c18708bc822e186cd2ea1ce304403 Reviewed-on: https://gerrit.libreoffice.org/80452 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-08use cppu::WeakImplHelper in UniversalContentBrokerNoel Grandin2-62/+6
Change-Id: Iaeb88801faab2c9e45b19751ab44c0f800d3c5ec Reviewed-on: https://gerrit.libreoffice.org/80424 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-08use cppu::WeakImplHelper in CachedDynamicResultSetStubFactoryNoel Grandin2-49/+5
Change-Id: Ide129bb5de11f967aa42d46704a0d00487fc5419 Reviewed-on: https://gerrit.libreoffice.org/80423 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-08use cppu::WeakImplHelper in fileaccess::BaseContentNoel Grandin2-82/+11
Change-Id: I1a677ce5c3eed773c04709808d0d019a2f59585d Reviewed-on: https://gerrit.libreoffice.org/80425 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-08use cppu::WeakImplHelper in CachedDynamicResultSetFactoryNoel Grandin2-50/+5
Change-Id: Ia13306a3059678ef306835b8641a26200f9ae420 Reviewed-on: https://gerrit.libreoffice.org/80414 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-08use cppu::WeakImplHelper in CachedContentResultSetStubFactoryNoel Grandin2-50/+5
Change-Id: Ic0fb9aa44fefc9377ead2d815be0f522eaf8cb33 Reviewed-on: https://gerrit.libreoffice.org/80413 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-08use cppu::WeakImplHelper in CachedContentResultSetFactoryNoel Grandin2-50/+5
Change-Id: I1575e051fe963a4bf73453a7e6b89c9c891d1ff9 Reviewed-on: https://gerrit.libreoffice.org/80412 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-07enable -Wrange-loop-analysis on clangNoel Grandin1-2/+2
Change-Id: I2095308943c94ad16c110d5fac47715398eb5d39 Reviewed-on: https://gerrit.libreoffice.org/80187 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-02loplugin:stringadd in tools..unotoolsNoel Grandin5-48/+26
Change-Id: I441a5ccef6adc8be8029178e304ff3044e812e2a Reviewed-on: https://gerrit.libreoffice.org/79986 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-01tdf#42949 Fix IWYU warnings in ucb/source/*/*hxxGabor Kelemen103-124/+141
Note: to build ucb/source/ucp/webdav one needs to use the --with-webdav=serf configure option Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I6da50aeeea0c05d49b8b9eadf67ab91d3d250f41 Reviewed-on: https://gerrit.libreoffice.org/79577 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-09-28loplugin:constmethod in ucb..uuiNoel Grandin10-14/+14
Change-Id: I53db381de8e063b6a3aa07051351e655c6f040fa Reviewed-on: https://gerrit.libreoffice.org/79782 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-26add property name when throwing css::uno::UnknownPropertyExceptionNoel Grandin13-43/+28
Change-Id: I17f06c9415b9d43b6d8896360e07216c2856367a Reviewed-on: https://gerrit.libreoffice.org/79627 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-25Use cppu::WeakImplHelperStephan Bergmann2-61/+2
Change-Id: I997286b864247fff6f1eda30fa8e4fcc074b887b Reviewed-on: https://gerrit.libreoffice.org/79536 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-09-25Better use rtl::Reference to hold ref-counted UNO objectsStephan Bergmann1-9/+10
Change-Id: I515ddde31730c95fdeee9f9a64a35605c2d01c2c Reviewed-on: https://gerrit.libreoffice.org/79483 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-09-19improve and enable loplugin:fragiledestructorNoel Grandin3-3/+3
Where the problem was benign and the class was not extended, I marked the class as final. Where the problem was benign and the class was extended, I marked the relevant callee methods as final. Other cases were excluded in the plugin. Change-Id: Idb762fb2206af4e8b534aa35ff77f8368c7909bc Reviewed-on: https://gerrit.libreoffice.org/79089 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-06Fixing "...."Andrea Gelmini2-2/+2
Change-Id: I3424e17cfdfb563fdc5882942031deafae8689fe Reviewed-on: https://gerrit.libreoffice.org/78678 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-09-01Fix '..'Andrea Gelmini1-4/+4
To complete this: https://gerrit.libreoffice.org/#/c/78312/ This is a massive replace for lines ending with ".." instead of "..." It passed "make check" on Linux. Change-Id: I07fa7b2e30ba9ea17a1f9a5e21c57216ba958efe Reviewed-on: https://gerrit.libreoffice.org/78356 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2019-08-27loplugin:referencecasting find more redundant static_castNoel Grandin13-26/+13
Change-Id: I3a51812bbd3fcdc6b11e47cb12962f0d4fa7a2ae Reviewed-on: https://gerrit.libreoffice.org/78191 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-24loplugin:returnconstval in test..writerfilterNoel Grandin2-2/+2
Change-Id: Iea7d15f0a54921514cc4b71c5dc8caaa2ee573c8 Reviewed-on: https://gerrit.libreoffice.org/78063 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-20loplugin:constvars in test..unotoolsNoel Grandin2-2/+2
Change-Id: I087dc53ca5c18893974bbd9d959de56d5a4cdfa0 Reviewed-on: https://gerrit.libreoffice.org/77827 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-17tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorJulien Nabet5-22/+5
in ucb, xmlhelp Change-Id: I79f6378cff14c71987f77e0c08e0107bd4b3eefb Reviewed-on: https://gerrit.libreoffice.org/77623 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-16use more TOOLS_WARN_EXCEPTIONNoel Grandin2-4/+2
Change-Id: Ic21ea11ff106e0732bb8fa600ef39a549d7bda86 Reviewed-on: https://gerrit.libreoffice.org/77569 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-16loplugin:sequenceloop in ucb..unotoolsNoel Grandin10-16/+16
Change-Id: Ie52d993c185ba43386b494baad0a484d5b365499 Reviewed-on: https://gerrit.libreoffice.org/77532 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-15replace ".get->" with "->"Noel Grandin1-1/+1
Change-Id: I327a6fda1fe0170da33e06b735f09a39421c8a58 Reviewed-on: https://gerrit.libreoffice.org/77469 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-12Fix typosAndrea Gelmini8-11/+11
Change-Id: Ica726584fe2691c9803976d23cba16d7f2a1f4bd Reviewed-on: https://gerrit.libreoffice.org/77355 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-12Fix typosAndrea Gelmini5-19/+19
Change-Id: Ic49b4cc6f2d0e0ac4d2635da2447bc6a2db5322e Reviewed-on: https://gerrit.libreoffice.org/77275 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-09Fix typosAndrea Gelmini7-9/+9
Change-Id: Ie63c7b2d8bf9579b7b41d7bae515818c8d5706dc Reviewed-on: https://gerrit.libreoffice.org/77217 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-05Fix OSL_ENSURE argumentArkadiy Illarionov1-1/+1
Change-Id: Ie1e63055b9603b7903fe1dcfaeb4eb7aa7c12cc1 Reviewed-on: https://gerrit.libreoffice.org/76956 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): ucbStephan Bergmann37-53/+53
Change-Id: Id9c3a97bdb3eaa69973d3742ce57257800fa21ae Reviewed-on: https://gerrit.libreoffice.org/76634 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-29Fix typosAndrea Gelmini1-1/+1
Change-Id: I94bfbfef24be46583c5c2877e468ed65c2bd5eb0 Reviewed-on: https://gerrit.libreoffice.org/76513 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-23dispose() methods should clear their smart pointersNoel Grandin1-0/+1
especiall the ref-counted ones Change-Id: Ib3bb029043b1b923010ef4a47bfc377e1f569da7 Reviewed-on: https://gerrit.libreoffice.org/76102 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-22cid#705118 Using invalid iteratorCaolán McNamara1-40/+38
Change-Id: If90375ee49e71357482f86e31185c95774aef17c Reviewed-on: https://gerrit.libreoffice.org/76092 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-21cid#1448305 silence Out-of-bounds accessCaolán McNamara1-0/+1
Change-Id: I7a25cc0c30f06ec146bdc205c51d5cad70e713b1 Reviewed-on: https://gerrit.libreoffice.org/76014 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-21loplugin:referencecasting in ucbNoel Grandin7-43/+23
Change-Id: I2f0959c280a832fb80fd0dda263de5f9ae63a698 Reviewed-on: https://gerrit.libreoffice.org/76030 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>