summaryrefslogtreecommitdiff
path: root/ucb
AgeCommit message (Collapse)AuthorFilesLines
2016-02-12Fix tdf#97500 Reinstate missing file error dialog on WebDAVGiuseppe Castagno1-21/+5
Bug introduced with my fix to tdf#96669 in commit 5fc2910fc872bbd1184aaab7c842dff593d2449b. Reverted previous fix and write a new version in fpicker instead. On WebDAV better check if the stream opens first, then check IsDocument property, because it may be a folder name. Change-Id: I72ce728329e4194080db6fa4cc4d98fecf7672e9 Reviewed-on: https://gerrit.libreoffice.org/22214 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> (cherry picked from commit f12e483589888f87843026ceff5ae3c1e615ca02) Reviewed-on: https://gerrit.libreoffice.org/22283 Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu> Tested-by: jan iversen <jani@documentfoundation.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-02-02Related tdf#95217: Force HEAD method in Web access if PROPFIND failedGiuseppe Castagno1-0/+3
Change-Id: I9ad798aa8e0909b162f3e1e33c0bc19d4fc7f484 Reviewed-on: https://gerrit.libreoffice.org/21907 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> (cherry picked from commit d61352f58a7f750d3b0b0a9c2d6498fbb7a6e10d) Reviewed-on: https://gerrit.libreoffice.org/21988 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-02-02Related tdf#95217: Http header names are case insensitiveGiuseppe Castagno2-4/+8
Change-Id: I0d81e110a31f93f5f24a96f96c12f0ec9c95921b Reviewed-on: https://gerrit.libreoffice.org/21906 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> (cherry picked from commit e973b342826e54f147251b132c3325d30749e312) Reviewed-on: https://gerrit.libreoffice.org/21987 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-02-02Fix typo, change misleading warning messageGiuseppe Castagno1-3/+3
Change-Id: I31537e9d73fa8a5d7c56efcc4832df041472ad5d Reviewed-on: https://gerrit.libreoffice.org/21891 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> (cherry picked from commit 80321c5f6bcd103439ae44777cfba1ca94a131d1) Reviewed-on: https://gerrit.libreoffice.org/21939 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-02-02Add initial cppunit test to webdav, 'local' only, neon versionGiuseppe Castagno3-0/+135
This is a 'local' test, meaning it can be done without a WebDAV server. It's the first one, so very trivial... Change-Id: Idf660c7482c86251be02536106f079ac6bdef4b4 Reviewed-on: https://gerrit.libreoffice.org/21658 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 1f9f1fe342ebe65db8f48a4c38c92acf74122966) Reviewed-on: https://gerrit.libreoffice.org/21926 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-01-14Related tdf#96174: save again on Google Drive.Giuseppe Castagno2-2/+10
Files can no longer be saved on Google Drive. The bug was introduced in 0398e1e3967332c49b6451b5d41bcf0357052d0b. Google Drive may have user name in the form: name.surname@domain.com In some places the user name should be escaped before using it. Change-Id: Idee3e57c0ad1dcbbd517b60c387868bfc706f27e Reviewed-on: https://gerrit.libreoffice.org/21198 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 7a32b6f247b2cb92373bbce6fc2a314cb043e3bb) Reviewed-on: https://gerrit.libreoffice.org/21422 Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-01-14tdf#96669: IsDocument should be true only if the document existsGiuseppe Castagno1-5/+21
Fixes a problem with Save to remote server dialog. Change-Id: I4ef2dbf12bb786f5617cb57ff021012e4d884230 Reviewed-on: https://gerrit.libreoffice.org/21010 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org> (cherry picked from commit 5fc2910fc872bbd1184aaab7c842dff593d2449b) Reviewed-on: https://gerrit.libreoffice.org/21258 Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-01-07Related tdf#96833: breadcrumb: setting URL, host port gets lost.Giuseppe Castagno1-0/+1
At the same time added a log in WebDAV, useful to discover the issue. Change-Id: I3435f8d3da28f7d6b4c2e154cf2bb5ee33a9a690 Reviewed-on: https://gerrit.libreoffice.org/21047 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 5c4de8f1991f1a9964e661717dc6b46f6a6a3608) Reviewed-on: https://gerrit.libreoffice.org/21172 Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2015-12-21Related tdf#90700 Add configuration for web connection timeout.Giuseppe Castagno3-4/+32
Currently the connection timeout is governed by operating system default. LO timeouts will be used in place of the TCP socket operating system ones, only in operating system where this is currently possible. The timeouts to use can be changed in LO configuration: 'Tools > Options > Advanced > Expert Configuration'. Propriety names are ConnectTimeout and ReadTimeout. ConnectTimeout contains the timeout (in seconds) used when making a connection (max 180 s, min 2 s, default 20 s). ReadTimeout contains the timeout (in seconds) used when reading from a socket (max 180 s, min 20 s, default 60 s). Change-Id: Ide69ab137274c3bf71332b6e76666151ecac1f1e Reviewed-on: https://gerrit.libreoffice.org/20195 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 14220052ef2b8675ee12aad63b0402f023d9760a) Reviewed-on: https://gerrit.libreoffice.org/20742 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-12-16Fix tdf#90700 Notify connect timeout early.Giuseppe Castagno1-0/+8
Throws exception to manage timeout early in the first connection sequence. Change-Id: Ibf87f9d7607c808692509c694127266b6f542014 Reviewed-on: https://gerrit.libreoffice.org/20196 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 95958755cbbf8c6026b878703400d5d9ec1e6c98) Reviewed-on: https://gerrit.libreoffice.org/20739 Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-12-15tdf#95792: fix saving file the first time on some WebDAV servers.Giuseppe Castagno2-20/+29
Some WebDAV servers don't implement section 7.3 of RFC4918: <http://tools.ietf.org/html/rfc4918#section-7.3> This lack of implementation breaks 'Save As...' functionality when the target is a WebDAV server, by not locking the URL ('reserve the name for use', in RFC4918 parlance). The server not implementing this usually answers with one of '405 Method Not Allowed', '501 Not Implemented' or '412 Precondition Failed' http error codes. The fix should manage this lack of implementation. Change-Id: Ie4689a076aafa365106d02b3ea16459a28fcde65 Reviewed-on: https://gerrit.libreoffice.org/20600 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 4c82edfb3a9286a0bfef3f006e468e5c331987eb) Reviewed-on: https://gerrit.libreoffice.org/20722 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2015-12-15Some WebDAV server answer without 'DAV:' XML namespace.Giuseppe Castagno1-1/+1
The call to assert() is not appropriate, better use a SAL_WARN_IF instead. The call to DAVProperties::createUCBPropName() method immediately after will take care of the missing namespace. The change to assert() was introduced in commit dd9c15b36f69bec4d4fc9b0049f7e496e5eb9e9d In libreoffice-5-1 branch it was introduced in commit 0ee79446c8c6daa8426eb2948b6e607b14e50059 Change-Id: Ib9b85426fc84907fb12f70759a189cedcf117b3a Reviewed-on: https://gerrit.libreoffice.org/20380 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 9b9329e479615194dda0288d699263412e5c4f1d) Reviewed-on: https://gerrit.libreoffice.org/20711 Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2015-12-03Add/change some logs in WebDAV ucb.ucp layer.Giuseppe Castagno10-113/+189
At the same time replace old OSL_TRACE, OSL_FAIL, OSL_ENSURE with SAL_* as appropriate: OSL_TRACE =--> SAL_LOG or =--> SAL_WARN if requires some kind of attention by the developer. OSL_FAIL =--> SAL_WARN or =--> SAL_INFO if the warning is brought up later in the program flow. OSL_ENSURE =--> assert oe SAL_WARN_IF when appropriate. Change-Id: I1cf8f76acdec6f37746488b22cbf579802a9d79d Reviewed-on: https://gerrit.libreoffice.org/20034 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit dd9c15b36f69bec4d4fc9b0049f7e496e5eb9e9d) Reviewed-on: https://gerrit.libreoffice.org/20373 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2015-11-24loplugin:unusedfields in ucb/Noel Grandin20-91/+23
Change-Id: Ic9ca044aa2465a197397bec6632e1a5aa5fe7110
2015-11-20add mapKeysToSequence/mapValuesToSequence methods to comphelperNoel Grandin1-11/+2
and use them Change-Id: If4dc9df63db37185228aeaaab2979498d61304ec Reviewed-on: https://gerrit.libreoffice.org/20055 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-17use unique_ptr for pImpl in ucb/Noel Grandin10-16/+13
Change-Id: I9a626a11d665b081a7b05db52955598dbd90721e
2015-11-16use initialiser list for Sequence<OUString>Noel Grandin2-9/+3
Change-Id: Ia5e47261d1fc6fac2d046656c05a1c5eedb07e02 Reviewed-on: https://gerrit.libreoffice.org/19978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15use initialiser for Sequence<OUString>Noel Grandin11-28/+14
using variations of: git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence<OUString> (\w+)\(1\)\; \s*OUString\* pArray.*; .*\[0\]\s*=\s*(\S+)\;/Sequence<OUString> \1 { \2 };/g" Change-Id: I03c64334ff30ee14dce0d17b67f5122a3893bbe3 Reviewed-on: https://gerrit.libreoffice.org/19971 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15use initialiser for Sequence<OUString>Noel Grandin1-2/+1
replaced using: git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence<\s*OUString\s*> (\w+)\(\s*1\s*\); .*\[0\] = (\S+);/Sequence<OUString> \1 { \2 };/g" Change-Id: I20ad0489da887a9712982531c3b127339bb8b3b9 Reviewed-on: https://gerrit.libreoffice.org/19969 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15use initialiser syntax for Sequence<OUString>Noel Grandin2-4/+2
replaced using the script: git grep -lP 'Sequence.*OUString.*\(1\)' | xargs perl -0777 -pi -e "s/Sequence< OUString > (\w+)\(1\); .*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g" Change-Id: I23688a91562051a8eed11fc2a85599545c285c34 Reviewed-on: https://gerrit.libreoffice.org/19967 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-11new loplugin: memoryvarNoel Grandin1-18/+2
detect when we can convert a new/delete sequence on a local variable to use std::unique_ptr Change-Id: Iecae4e4197eccdfacfce2eed39aa4a69e4a660bc Reviewed-on: https://gerrit.libreoffice.org/19884 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann75-372/+372
Change-Id: I72bf3e008a8941d6e0fdea81b6b3e4a959ff28c5
2015-11-09com::sun::star->css in tools/ and ucb/Noel Grandin143-3784/+3104
Change-Id: I695ff721efd63b8ca0dd3c61ba5a4fef2c43cde6 Reviewed-on: https://gerrit.libreoffice.org/19854 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-06coverity#1338238 Uncaught exceptionCaolán McNamara2-5/+2
Change-Id: If822954d8355df879da8315e1c006571d3a26139
2015-11-06coverity#1338237 Uncaught exceptionCaolán McNamara2-3/+5
Change-Id: I7a7604f250a571708225fa347e80585baaa2f03d
2015-11-06coverity#1338236 Uncaught exceptionCaolán McNamara2-2/+2
Change-Id: Ia2fc54862dfc0f6367f52fd471d6066d915264b6
2015-11-06loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)Stephan Bergmann15-94/+93
Change-Id: Ifb9832022c92cc9996000d0515e81c53c36bfae8
2015-11-05use uno::Reference::set method instead of assignmentNoel Grandin34-110/+66
Change-Id: Id036f867e75d03d8347cc32a1011c5cdda1dcc73
2015-11-04yyyyyNoel Grandin6-67/+37
Change-Id: I9a947beefd2dfe21da8239e841ea3fb416bd1548
2015-11-01no need to use OUString constructor in call to createInstanceNoel Grandin2-9/+6
Change-Id: Iaf3d83ba1490cb1d97a5bd4d1f7cd6943d4a7296 Reviewed-on: https://gerrit.libreoffice.org/19704 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-01Remove last stdio.h from ucb moduleJulien Nabet1-2/+0
Change-Id: Ic44c39bb4f880fe3b14470fdd3d5761aa5f2a084
2015-10-30UNO: no need to use OUString constructor when calling createInstanceNoel Grandin4-6/+6
Change-Id: I37da28539b94706574116d0fff5f008aabfb5526 Reviewed-on: https://gerrit.libreoffice.org/19682 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-26tdf#75637: Resolve help images via a vnd.libreoffice.image UCPStephan Bergmann4-0/+223
...which uses the logic already available in VCL's ImplImageTree to locate the image zip files and find fallbacks for incomplete themes and for localized images. Change-Id: Ic1c15fcacb6596a27a2b051093232902202bf472
2015-10-23ucb: replace boost::ptr_vector with std::vector<std::unique_ptr>Michael Stahl1-26/+27
Change-Id: I05c64aaed4aaea813b369dccc721f9d10167f161
2015-10-15cppcheck:variableScopeNoel Grandin1-2/+1
Change-Id: I9b671637fbe0f32e695d22b74bfb40a39a9fe884 Reviewed-on: https://gerrit.libreoffice.org/19364 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-13tdf#91054 cleanup weirdo function prototypeskerem1-33/+17
Change-Id: I1002a25e0349263f286d3e3752579660a1ee5728 Reviewed-on: https://gerrit.libreoffice.org/19328 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-10-13remove some useless commentsNoel Grandin1-1/+0
found with git grep '// /' Change-Id: I948cf9ae61bbbf2ec706ca5b0572c4f27c58c745
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann105-1273/+1273
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY codeStephan Bergmann3-7/+7
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-10-12loplugin:mergeclassesNoel Grandin4-72/+13
Change-Id: I6266369912413d51c9f1595b13dca97d3d74225f
2015-10-11cppcheck: Prefer prefix ++/-- operators for non-primitive typesJulien Nabet2-4/+4
Change-Id: I93b65c89cc7475460e0e7339f939cc058f36f0da
2015-10-07clang-analyzer-deadcode.DeadStoresStephan Bergmann1-6/+2
Change-Id: Ic94b5fdcf88a9580e816aceb199753e88636810a
2015-10-07clang-analyzer-deadcode.DeadStoresStephan Bergmann1-1/+0
Change-Id: I5f5eb507e1c5bbdc8a0517244e867724249f3661
2015-10-05tdf#83531 Opening WebDAV URL WebDav fails if write is restrictedGiuseppe Castagno1-0/+22
Happened because LOCK method was not allowed without credentials. Change-Id: I7b204e67079791a08211410ced4b0b4f015d524a Reviewed-on: https://gerrit.libreoffice.org/17856 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2015-10-05tdf#82744: fix WebDAV lock/unlock behaviour - part 3Giuseppe Castagno5-77/+301
Changes done to the code in sfx2, ucbhelper, ucb, unotools in no particular order - add method helpers to call the ucb lock/unlock - add lock/unlock 'real' management - make DateChange property retrieval working for WebDAV as well - add check for changed content of a WebDAV file, in order to reload it correctly when 'Edit Mode' command is activated from GUI - Unlock WebDAV file while saving only if explicitly enabled Needed in order to avoid the small window of file unlocked state that opens while saving a file. When saving LO actually does as follows: - unlock the prevoius version of the file - prepares operations to save the modified version - lock the new file - save the new version - the lock method is enabled if the DAV resource supports it. In case the lock is not supported, for example example DAV with lock disabled, the lock method is disabled. Exception: when the resource is first created and the lock is not supported: a lock command is sent anyway, because if the resource is not yet present, there is no method to detect the lock/unlock availability in this case. - cppcheck:noExplicitConstructor Change-Id: I0aa876c4e3364d86e5740977b97f3db9a01e4491 Reviewed-on: https://gerrit.libreoffice.org/17189 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2015-10-01remove old standalone Sun bug numbersNoel Grandin6-9/+8
Sun bug numbers without any accompanying text are completely useless. Fixed with git grep -lP '//\s*#\d+#\s*$' | xargs perl -i -ne'/\/\/\s*#\d+#\s*$/d or print' And then hand-checking the result to restore places where it deleted code. And then some more grepping and hand-editing to kill the others. Change-Id: Ia96ce4466db8bb8da363ebf41f0ae7f45f28bf29 Reviewed-on: https://gerrit.libreoffice.org/19023 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-30Fix typosAndrea Gelmini4-6/+6
Change-Id: I3926eca56ac9f54f9ddbf88610888ce97cf00b34 Reviewed-on: https://gerrit.libreoffice.org/18990 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-29loplugin:removeunusedmethods, remove unused stuffNoel Grandin1-11/+0
Change-Id: I35456b2a3ad2a84a1d045f09cdfb29e4c19b8350
2015-09-24boost->stdCaolán McNamara4-28/+28
Change-Id: I24ecb1173af3711dfd6e8a9284f5d7a095d9c544 Reviewed-on: https://gerrit.libreoffice.org/18819 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-23boost::scoped_ptr->std::unique_ptrCaolán McNamara9-42/+40
Change-Id: I03020e3536ee692a96224a517794c0d0a294f607 Reviewed-on: https://gerrit.libreoffice.org/18793 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>