summaryrefslogtreecommitdiff
path: root/ucb
AgeCommit message (Collapse)AuthorFilesLines
2017-04-06tdf#106955: Open WebDAV resources on which PROPFIND failsMike Kaganski2-108/+172
When PROPFIND fails on a WebDAV resource, its IsDocument property stays undefined, and so stream creation fails. Proposed solution is to default to IsDocument=true for all WebDAV documents where we cannot get the property from server. Such resources also fail to return their locking options, so defaulting to server properties. When later locking is attempted on it, the attempt fails with user notification (a dialog saying that getting information from server failed). Proposed solution is to check Content-Disposition header in such resources, and in case it's attachment, disable lock on this resource. The rationale for this is that "In a regular HTTP response, the Content-Disposition response header is a header indicating if the content is expected to be displayed ... as an attachment, that is downloaded and saved locally" (see MDN: https://developer.mozilla.org/en/docs/Web/HTTP/Headers/Content-Disposition Also, Content::getProperties wasn't ready for PROPFIND returning empty result. Change-Id: I91dbffa8bdf0fe900c11d2f8c9c9394d2104bb49 Reviewed-on: https://gerrit.libreoffice.org/36090 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit fbc04c97231d629c1b5e9e57203dbe8d8eb06714) Reviewed-on: https://gerrit.libreoffice.org/36132 Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-02-24-Werror,-Wimplicit-fallthroughTor Lillqvist2-0/+2
Change-Id: I7ea9c1af7568ce37f29df14f8dc4345031c20eb8 (cherry picked from commit dfafaeb989c16792d722d2a256a621f58f8e81fc) Reviewed-on: https://gerrit.libreoffice.org/34527 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit d48f30590a54000287ebdc3453d61e40d6fdfde7)
2017-02-24fix the generally unused non-neon webdav MapDAVExceptionCaolán McNamara1-1/+1
Change-Id: I82caa1686a8855c484050f129d5095f95eab7ece (cherry picked from commit e100bb57d884d21c6a0e498317fa93b0202dcb64) Reviewed-on: https://gerrit.libreoffice.org/34526 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit c68347040462ae6c000c0f7564c42553c8c18f98)
2017-01-10ucb: cmis::DataSupplier::queryContent() looks rather questionableMichael Stahl1-4/+6
It's not immediately obvious if the caller is responsible for checking the index validity here, but all the other sub-classes of ResultSetDataSupplier that i looked at do check the index so do the same here. Change-Id: Ib0c5c38cb28282f08752cdb03202e4d6f3566693 (cherry picked from commit 84de69638362c7b575560e0da3efbc709b7ac476) Reviewed-on: https://gerrit.libreoffice.org/32906 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Ostrovsky <david@ostrovsky.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-01-10ucb: ReacquireableGuard::reacquire() is a no-opMichael Stahl3-80/+76
So remove this junk and use osl::ResettableGuard instead which actually works. Change-Id: Ieb49fab16c94f0a2847ee5a1b95b52f2c141c674 (cherry picked from commit a5a94537d804f20a0d6472ef2e5995cee2d5b2fe) Reviewed-on: https://gerrit.libreoffice.org/32907 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Ostrovsky <david@ostrovsky.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-12-19vcl: separate ImplImageTree - ImageTree singleton and public ifaceTomaž Vajngerl1-3/+3
ImplImageTree was used outside of VCL which is not consistent with the name and the header also contains a lot of implementation detail. This separates the implementation to ImplImageTree and the public interface and singleton to ImageTree only. Change-Id: I3a26444f0f6971a6b1d83472e9cef19c93192d3e Reviewed-on: https://gerrit.libreoffice.org/32134 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit bf5f6df9e47bd31dc052c6411f6f88ec2d4e3cea) Reviewed-on: https://gerrit.libreoffice.org/32165
2016-12-08-Werror=return-local-addrStephan Bergmann2-6/+6
(the first case with OUString would technically be OK, but better change all three of them) regression introduced with 0e4ca9b0cfe015f7ab3b964d1b90de7c2cba42de "Clean up uses of Any::getValue() in ucb"; thanks to tml for finding it via --enable-fuzz-options Change-Id: I79e70cff8d8b96e1eb6b0bacda52be06eb0f108b (cherry picked from commit 912fda1d7b21e7f7c8983c449d5d50fdf000e5bc) Reviewed-on: https://gerrit.libreoffice.org/31766 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-11-22remove some more global OUStringsNoel Grandin3-65/+38
Change-Id: Ic02754f98bfda3b7cd8c06857123d363a96e8d0e Reviewed-on: https://gerrit.libreoffice.org/31071 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-18loplugin:datamembershadowNoel Grandin1-2/+0
Change-Id: I8a737a2f22c7be9630a1f7562b4309e687bb85f9 Reviewed-on: https://gerrit.libreoffice.org/30948 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-16straighten weirdo exception message, inserting a comma and a blank helps..Eike Rathke1-4/+2
Has ever been like that since commit 54bd83fe93ff3253fbcde2f8c0b97eccbdac52e5 Date: Thu Oct 31 15:24:42 2002 +0000 Change-Id: Ifa52dc10458a91054675900a55c1eee14899d80d
2016-11-13Change remaining sal_Int32 to ContinuationFlags ...Korrawit Pruegsanusak1-1/+1
from 7f97b5e72c61066ea1ddd0f782e50070ce5f6363 Change-Id: I064e35f879ecba61d7ef71a0a177e760c3d263c4 Reviewed-on: https://gerrit.libreoffice.org/30793 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-07loplugin:unnecessaryvirtual in test..vbahelperNoel Grandin2-6/+6
Change-Id: I0e110af6eab798e11f96d0f7d282d59440d91965 Reviewed-on: https://gerrit.libreoffice.org/30649 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-01Cosmetic: Namespaces, better make use of the 'using-directive'Giuseppe Castagno2-8/+11
Change-Id: If27709a2d8d8f231be9be0231d522f2a71e5fcae Reviewed-on: https://gerrit.libreoffice.org/30457 Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu> Tested-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-10-31Omit comparator which is the same as default std::less<key_type>Takeshi Abe2-19/+2
Change-Id: I72a0b618577caececaaf3eb4df53d4cb192251da Reviewed-on: https://gerrit.libreoffice.org/30369 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-10-27Cosmetic: Move function member around...Giuseppe Castagno1-28/+28
...so it's nearer to the other function member that uses the class variables it initializes. Change-Id: I199621fbcad36313e0948627d47445a1de211d02 Reviewed-on: https://gerrit.libreoffice.org/30313 Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu> Tested-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-10-26const-ness fixesStephan Bergmann2-15/+15
Change-Id: I83858c0cbca0fc493ac506e2b839e43310f3bb2f
2016-10-26WebDAV: Small cosmetic to unit checks.Giuseppe Castagno1-7/+7
Change server name in URI test strings. Pass by const lvalue reference [loplugin:passstuffbyref]. Change-Id: Ic0134f0690a8e6b9abb7d0764efaeeaf3a167bcf Reviewed-on: https://gerrit.libreoffice.org/30284 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-10-26loplugin:expandablemethods in ucb..ucbhelperNoel Grandin22-130/+144
Change-Id: I42d077d7ebcfb77447d011644f8d64e80eae69c2 Reviewed-on: https://gerrit.libreoffice.org/30266 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-23Fix typosAndrea Gelmini1-1/+1
Change-Id: Ib7b17f85c7b6a1937c3f6e1617ceec58074643b4 Reviewed-on: https://gerrit.libreoffice.org/30040 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-10-21tdf#102499 (9): Fix eXo Platform WebDAV on 'Save Remote File'Giuseppe Castagno3-6/+77
Change-Id: I2d2aceed3804f653b79d48eeb02468fc77374eb7 Reviewed-on: https://gerrit.libreoffice.org/29884 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-10-21tdf#102499 (8): Return empty property when not present.Giuseppe Castagno1-0/+24
Change-Id: If5afa4f33ac5b5dfec123960c2e9660183576256 Reviewed-on: https://gerrit.libreoffice.org/30142 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-10-19loplugin:expandablemethods in UnoControls..vbahelperNoel Grandin6-21/+7
Change-Id: Iec2c5e13119d97c9ca87e083c0f7cb00227e5231 Reviewed-on: https://gerrit.libreoffice.org/29997 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-18replace <<= with assign for <<= with rhs AnyJochen Nitschke4-4/+4
found by deleting specialization of '<<=' template Change-Id: I253f15177ab20fd3ef9baf4158da8c662cb47e6c Reviewed-on: https://gerrit.libreoffice.org/29956 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-18ucb: fix handling of >>= with rhs AnyJochen Nitschke2-5/+4
>>= for rhs Any is always true, check result with hasValue() instead. bool convert<uno::Any>(...) always returns false and assigns the 3rd parameter to the 4th. do the assign directly and check result with hasValue(). Change-Id: I0ae985cc0837abf1108930d593edae69de2ae549 Reviewed-on: https://gerrit.libreoffice.org/29977 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-18loplugin:unusedmethodsNoel Grandin2-69/+0
Change-Id: Icf773925c37dde8b7404edac9864e7b10fe113b4 Reviewed-on: https://gerrit.libreoffice.org/29968 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-13tdf#102499 (7): Caching connect timeout or cannot connect.Giuseppe Castagno2-0/+30
An unofficial HTTP response status code is defined and used internally in LibreOffice WebDAV ucp provider in order to catch either the DAVException::DAV_HTTP_TIMEOUT state or the DAVException::DAV_HTTP_CONNECT state. Change-Id: Iec4927d18ace5384fed16a7ec2a2620dc8305c5b Reviewed-on: https://gerrit.libreoffice.org/29757 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-10-13loplugin:unnecessaryoverrideNoel Grandin2-7/+0
Change-Id: I08c55a3023ec2e8990098eeb60e91cd18556e7ae Reviewed-on: https://gerrit.libreoffice.org/29656 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-12tdf#102499 (6): Cache OPTIONS if not present or if lifetime differentGiuseppe Castagno4-38/+54
Add the OPTIONS information and response status code into the cache: - if the OPTIONS information is already cached, update the cache only if the lifetime is different; - if the OPTIONS information is not cached, cache it. Add some new functions in DAVOptions to support the change and remove a function no longer used. Change-Id: I2f28f0ee793ec7d898caa61cc0a4962334e6e068 Reviewed-on: https://gerrit.libreoffice.org/29733 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-10-11tdf#102499 (5): Deal with HTTP unofficial response status codesGiuseppe Castagno4-58/+237
A reference can be found here: <https://en.wikipedia.org/wiki/List_of_HTTP_status_codes> (retrieved 2016-09-13). Changes done: Add set of 'HEAD method not available' before using fall back GET method. Add new method in OPTIONS cache. Add response status code if fall-back GET didn't succeeded. Add copy-assignement operator to DAVOptions. Fix behaviour of GET fall back when HEAD missing. Change-Id: I6aad0e22bb444abf37b90186588f64f79b03cc3d Reviewed-on: https://gerrit.libreoffice.org/29680 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-10-05tdf#102499 (3): Change caching model for HTTP response status codeGiuseppe Castagno5-182/+214
Instead of caching only a single status flag, now both the HTTP response status code and the message accompanying it are cached. Change-Id: If7352f6b0cb7c7dab6af3cede96647308baa5ce2 Reviewed-on: https://gerrit.libreoffice.org/29538 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-10-03tdf#101094 (36): Fix behaviour of GET in fetching Headers onlyGiuseppe Castagno6-26/+106
Implement a better way to GET only headers, as HEAD method substitute. Wrote a new version of GET, specifically for 'no payload' service because sometimes neon was returning an internal error about: 'Compressed response was truncated' but without a specific error state. Change-Id: I84a3e5635193c3f68d335eba7af41b05980f4192 Reviewed-on: https://gerrit.libreoffice.org/29502 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-10-03loplugin:countusersofdefaultparams in sw..vclNoel Grandin2-6/+3
Change-Id: I152df55f5a30e073c66cfd3a64d5090a20cb232d Reviewed-on: https://gerrit.libreoffice.org/29471 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-03tdf#101094 (35): Add OPTIONS as pre-check in direct WebDAV open() methodGiuseppe Castagno1-1/+9
The function call will act as a precheck on Web resource access error when accessing the open directly without the normal file open procedure, e.g. accessing Web resource property values first. An example of this direct open call are the extension fetching and the extension update check. Change-Id: I765a2fe29f432a07a649e5a35440ae351c681af9 Reviewed-on: https://gerrit.libreoffice.org/29454 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-10-01Fix typosAndrea Gelmini1-1/+1
Change-Id: I6aeda978911b25caa45d4e459e581fc743e93d2c Reviewed-on: https://gerrit.libreoffice.org/29442 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-01tdf#101094 (34): Fix test and missing field value in comparision operatorGiuseppe Castagno4-42/+63
Change-Id: I6be4a7861f2a978c260defd54dcbc8d124017439 Reviewed-on: https://gerrit.libreoffice.org/29431 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-09-26tdf#102499 (2): Refactor the WebDAV resource access retryGiuseppe Castagno3-19/+50
Change-Id: Ia29560d54a61f1238f3b4e945d78308a3a68c483 Reviewed-on: https://gerrit.libreoffice.org/29269 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-09-26tdf#101094 (33): Fix: use the correct exceptionGiuseppe Castagno1-2/+2
Change-Id: I41e7cc0a1e176e44cb1b3fb87269eb6e052c6478 Reviewed-on: https://gerrit.libreoffice.org/29273 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-09-26convert CONTINUATION constants to typed_flags_setNoel Grandin2-11/+10
Change-Id: I38333e5d229aa520fbe0a8ad72007c503853956e
2016-09-25tdf#102499 (1): Add WebDAV test to check HTTP reponse status codes retryGiuseppe Castagno5-2/+146
Change-Id: I4ff36df3ac1cc0788322768378fb74f70892f922 Reviewed-on: https://gerrit.libreoffice.org/29245 Tested-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-09-22loplugin:unusedmethods in sc..vclNoel Grandin3-23/+0
Change-Id: I70fcf95dfd3db05b4fd6e5cee37866f673d3afa8 Reviewed-on: https://gerrit.libreoffice.org/29183 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-20loplugin:unusedfieldsNoel Grandin2-2/+0
Change-Id: I852e98b16fdcb88b04e39d11e3101d502c918c24 Reviewed-on: https://gerrit.libreoffice.org/29078 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-19tdf#101094 (32): Use a partial GET as a fall-back for HEAD...Giuseppe Castagno4-8/+88
... partial GET means a GET with no data returned, to test for resource 'real' availability in case HEAD fails or is disabled. At the same time disable use of HEAD method on the resource for the whole access procedure. This change is needed to manage web servers that don't permit the use of either HEAD or OPTIONS methods. To accomodate pure web sites that enable only GET to fetch contents. Change-Id: If52316ddd6ce637fb7d2ef518423de246ee2dcfb Reviewed-on: https://gerrit.libreoffice.org/28992 Tested-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-09-18Related: tdf#101094 (31): Add a simulated HEAD method: use GETGiuseppe Castagno3-5/+202
Some server have HEAD method disabled or not implemented. So we can use GET with no data, retrieving only the header info. The implementing code comes from LO WebDAV serf implementation. Change-Id: I3b3d81f5a07232c4f1647888685e820939bc978c Reviewed-on: https://gerrit.libreoffice.org/28982 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann73-86/+86
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-13Remove nonsense comments: // bitfieldTor Lillqvist1-1/+0
Surely the actual bitfield syntax is enough to tell the code reader that it is a bitfield. Change-Id: Ic9552e01b19c8b34b2a17db56b9ff63e7c7de926
2016-09-13tdf#101094 (30): Better explanation of OPTIONS errors in debug buildGiuseppe Castagno1-6/+7
Change-Id: Iea0eef5d3cd67c73325eb7af883ef8ce286187cd Reviewed-on: https://gerrit.libreoffice.org/28850 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-09-07-Werror=unused-but-set-variableNoel Grandin1-8/+0
Change-Id: I1a7ed38a95b06029d821b000324b2cc880df1ebb
2016-09-07loplugin:constantparam in framework..vbahelperNoel Grandin7-36/+9
Change-Id: I592f73012ae8a4df8488ef04dc0956d9400625bc
2016-08-29WebDAV: Make some SAL_WARN log wording a bit betterGiuseppe Castagno1-9/+9
Change-Id: Ib854d1ac74e952c786136176899e533804eb1e61 Reviewed-on: https://gerrit.libreoffice.org/28459 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-08-29cppcheck: noExplicitConstructorGiuseppe Castagno1-1/+1
Change-Id: Ifa588c37added377d753cb7b32a6f1e6a3672c94 Reviewed-on: https://gerrit.libreoffice.org/28453 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>