Commit Graph
2688 Commits
Author SHA1 Message Date
Giuseppe Castagno 0326352470 tdf#83531 Opening WebDAV URL WebDav fails if write is restricted
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-05 11:18:04 +00:00
Giuseppe Castagno b4576f3da4 tdf#82744: fix WebDAV lock/unlock behaviour - part 3
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-05 11:14:50 +00:00
Noel Grandin e209d115d4 remove old standalone Sun bug numbers
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-10-01 06:57:19 +00:00
Andrea Gelmini 82f0a4f930 Fix typos
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-30 10:41:48 +00:00
Noel Grandin 34180700b2 loplugin:removeunusedmethods, remove unused stuff
Change-Id: I35456b2a3ad2a84a1d045f09cdfb29e4c19b8350
2015-09-29 15:08:43 +02:00
Caolán McNamara c4fba6557c boost->std
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-24 06:23:29 +00:00
Caolán McNamara 09b637e365 boost::scoped_ptr->std::unique_ptr
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>
2015-09-23 14:32:43 +00:00
Stephan Bergmann 01d0f0f6ad "unnamed namespaces don't work well yet" is no longer true
Change-Id: I7a04c2d04e3fc52982d83119755e0b349d232a47
2015-09-17 14:31:07 +02:00
Stephan Bergmann 93a0696e74 Related rhbz#1259746: Buffer file content read from GIO UCP
...for one, this avoids sending seek requests down the GIO/GVFS stack, which can
silently fail with corrupt data read from certain broken servers for current
versions of the GIO/GVFS stack; for another, it should considerably speed up
loading documents via the GIO UCP, as LO's document type detection is notorious
for issuing lots of seek and (small-chunk and/or re-) read operations on a file.

(This issue has become more relevant after
51e0d789c3 "rhbz#1134285: Access dav, davs URLs
via GVFS," where the old route via the WebDAV UCP was apparently not affected by
those broken servers, so happened to start affecting opening certain remote
files in LO via Nautilus.)

Change-Id: I91f91128b2d1a16f976eafeacf216a91747f4df1
2015-09-16 10:32:43 +02:00
Michael Stahl 0a94746db1 ucb: fix another duplicate WeakImplHelper<XInteractionRequest>
Change-Id: I0728601cd7abd8f8d718728d5983aed94355bdc0
2015-09-10 17:42:25 +02:00
Michael Stahl 67f4626d07 ucb: fix mergedlib duplicate WeakImplHelper<XInteractionRequest>
Change-Id: I0666bb38e43240a0cbd972a141ecc36573c2ad6a
2015-09-10 17:42:25 +02:00
Takeshi Abe 5cce78f9a5 ucb: tdf#88206 replace cppu::WeakImplHelper* etc.
with the variadic variants.

Change-Id: I0e4c7e26af86806e75bb75b7eb6c70b57e1c9514
Reviewed-on: https://gerrit.libreoffice.org/18427
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-09 08:14:20 +00:00
Caolán McNamara b40b601007 ditch gnome-vfs2 support
Change-Id: I882c04fd3a255f55511b1884157de26e7574e6db
Reviewed-on: https://gerrit.libreoffice.org/18262
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-02 11:46:18 +00:00
Stephan Bergmann 94c76686b5 loplugin:stringconstant: OUStringBuffer: appendAscii -> append
Change-Id: I18420ed24918d77be30a1b4b3a7d55f5299fb82e
2015-08-31 08:00:56 +02:00
Stephan Bergmann d3de490437 Add vnd.sun.star.webdavs URL scheme
...as https-equivalent to complement vnd.sun.star.webdav scheme.  See the mail
thread starting at
<http://lists.freedesktop.org/archives/libreoffice/2015-August/069929.html>
"What autogen.sh for an alternative ContentProvider for dav:// scheme?" for why
it is considered beneficial to have the WebDAV UCP support---in addition to the
standard pair of http[s] schemes---a non-standard pair of
vnd.sun.star.webdav[s] schemes different from the "accidentally supported"
non-standard pair of dav[s].

Change-Id: I7032aa1ed599f735969cf0163cd9dc121a1fdcb3
2015-08-27 11:26:18 +02:00
Stephan Bergmann 9c3f5324bf Apply webdav-neon/ fix to webdav/, too
cf. 9228f41209 "Missing davs URL scheme handling"

Change-Id: Ia161691cc213b5b2c1a3a589ce05b6ad8558013c
2015-08-27 11:08:28 +02:00
Stephan Bergmann 9228f41209 Missing davs URL scheme handling
...looks like it was just forgotten in e557f06cb1
"INTEGRATION: CWS tkr10: i84676 neon and gnome-vfs2"?

Change-Id: I1bae95273f43e58425181bbc4667f87a6389e3a9
2015-08-27 11:03:52 +02:00
Stephan Bergmann 0d80e7d7a8 Clean up initialization of UcbPropertiesManager::m_pProps
(which is a single-instance service, so there is likely no benefit in
initializing it lazily anyway)

Change-Id: Ie7e8272f11372149391a1190d5e71137dddaa03b
Reviewed-on: https://gerrit.libreoffice.org/18016
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2015-08-27 07:10:46 +00:00
Caolán McNamara 773d5c6926 remove last WeakImplHelper8 uses
Change-Id: I7ecadedb77832fb3073870880dbfba121fdae826
2015-08-21 13:05:11 +01:00
Noel Grandin 3d614a639e loplugin: defaultparams
Change-Id: If1d183f32079548645b4974a16161dc997c026b7
2015-08-21 10:19:44 +02:00
Stephan Bergmann 5da0dce19c Consolidate isFileUrl checks
Change-Id: I1b74fdfaa09c4d0d6c296253958e83e78b546a9a
2015-08-19 12:24:37 +02:00
Giuseppe Castagno 482f051708 cppcheck:noExplicitConstructor in webdav, serf version
Explicitly add constructors that where previously hidden.

The right implementation of what I did
in aade7198d7.

The explict keyword was added in 6343754e31

Change-Id: I66f6ee51c8b51d93d6ac673e75555e13024e4b48
Reviewed-on: https://gerrit.libreoffice.org/17823
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2015-08-18 07:36:58 +00:00
Stephan Bergmann 81908b3853 Clean up reinterpret_casts
Change-Id: Idd25acf645af7f99e332ec1d5431f7988408675d
2015-08-17 12:19:42 +02:00
Stephan Bergmann f52e295a10 loplugin:cstylecast
Change-Id: I32a9feb5851691b02475e9eb5dbb024d3330b232
2015-08-17 12:03:38 +02:00
Giuseppe Castagno aade7198d7 cppcheck:noExplicitConstructor
Added a constructor and a method there were missing.

The explict keyword was added in 6343754e31

Change-Id: Iaff33eba8581dc201a8e899c7be024e87f8e6b0e
Reviewed-on: https://gerrit.libreoffice.org/17781
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-17 07:18:09 +00:00
Szymon Kłos 0398e1e396 CMIS: remember new session for each user
Change-Id: I7d0a72e48b8f9056e8761cae8939e2b8f6dbdd24
2015-08-14 08:45:16 +02:00
Noel Grandin 6343754e31 cppcheck:noExplicitConstructor
Change-Id: I2717d3d120df8af5b7e9af8d147a57b9f5b5ecbe
2015-08-07 07:20:24 +02:00
Noel Grandin 403c13487c loplugin:unusedmethods
Change-Id: I6801618efb5a66d24156fa429e026acb6ca03aba
Reviewed-on: https://gerrit.libreoffice.org/17506
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-05 09:39:22 +00:00
Noel Grandin a4fd6c4f9e inline some use-once typedefs
Change-Id: I02cbbba56a2ad83e0ac3d806265a7e0d6a29594d
Reviewed-on: https://gerrit.libreoffice.org/17495
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03 12:16:33 +00:00
Noel Grandin f5deb46349 remove some unused typedefs
Change-Id: I98c1e7eaa66b7afb05255a017a3de54714637501
Reviewed-on: https://gerrit.libreoffice.org/17491
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03 08:53:21 +00:00
Noel Grandin 2660d24a07 new loplugin: refcounting
This was a feature requested by mmeeks, as a result of
tdf#92611.

It validates that things that extend XInterface are not
directly heap/stack-allocated, but have their lifecycle managed
via css::uno::Reference or rtl::Reference.

Change-Id: I28e3b8b236f6a4a56d0a6d6f26ad54e44b36e692
Reviewed-on: https://gerrit.libreoffice.org/16924
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03 06:37:16 +00:00
Noel Grandin a45827b230 loplugin:unusedmethods
Change-Id: Ib4d77ee01e7362f5951f81fceeca3c489872d971
Reviewed-on: https://gerrit.libreoffice.org/17378
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-30 06:23:00 +00:00
Noel Grandin 165c939818 loplugin:cstylecast
Change-Id: I21fd75b3c891d98f6ad1e4c8af985c2cd21c7db4
2015-07-27 09:24:08 +02:00
Noel Grandin 58cb142392 loplugin:staticmethods
Change-Id: Iab1eda788690366bfc03ba7c4f085cb474fef1b8
2015-07-27 09:24:08 +02:00
Noel Grandin a3c6ead658 loplugin:loopvartoosmall
Change-Id: I9114a7dd3eae7a76432655c4459a7326bb1908f4
2015-07-27 09:24:08 +02:00
Noel Grandin 53b496daa8 loplugin:simplifybool
Change-Id: Id57ee3c09b11c3ce4820ed06a15f13866a10f19a
2015-07-27 09:24:07 +02:00
Noel Grandin 3e4c5a3538 loplugin:stringconstant
Change-Id: I95765e9c26e393a838ee0c617fde415e6c50e884
2015-07-27 09:24:07 +02:00
Noel Grandin 16f3ef520c fix --with-webdav=serf build
fallout from the conversion to variadic WeakImplHelper template

Change-Id: I1ff6b4aa0b574bbd4787f548e0bc4bf51b211aba
2015-07-27 08:54:43 +02:00
Noel Grandin 38ecca9b30 inline a bunch of use-once macros
no point in having a macro unless it's actually going to reduce the
number of lines of code

Change-Id: Ic8760d6506cf272d7bd088f7b3b4dcbf288099fc
2015-07-27 08:18:16 +02:00
Noel Grandin efac5fa06e remove some unused defines
Change-Id: Ib2d50e8c29ccbc5ffcb52cdff4ae3eaae9a62188
Reviewed-on: https://gerrit.libreoffice.org/17332
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-27 06:12:01 +00:00
Noel Grandin 95aad95fbe inline a handful of use-once #defines
Change-Id: Id2654555c4042f8c0bdbd6bab6507e705f08326b
2015-07-23 08:41:46 +02:00
Giuseppe Castagno 26e6d4b05a tdf#82744: fix WebDAV lock/unlock behaviour - part 1
There are some areas in ucb outside the issue scope that should later
be addressed, among them:

- in ucb/webdav make flag m_bTransient working right, currently lock
option for WebDAV server not supporting it is suboptimal: there are
not needed lock requests;

- change the method the modified file is checked against the old
one, using DAV:etag instead of the DateTime;

- some http status code returned by the server don't seem to be
managed;

- during WebDAV operation some redundant request of properties is
carried out.
Probably some clean up to remove these not needed transactions
is to be done.
Accessing only those really supported by the referenced href would
be better.

Changes done to the code in ucb, in no particular order

- remove current WebDAV lock management

- have the lock/unlock working correctly when the webdav resource
is first created: in the case of creation is the first lock on
the non existent resource that actually creates it

- fix a problem while fetching WebDAV properties.
If a single WebDAV non-cached property was requested, it would
 not be fetched from the server without this fix.

- change the lock owner name.
This should probably be different. Something to be discussed.
This same string can be read by all the applications accessing the
lock.

Spec reference is:
RFC4918 [2007]: '14.17.  owner XML Element'
link (as of 20150713):
http://tools.ietf.org/html/rfc4918#section-14.17

- manage WebDAV locked file exception directly while locking.
The ucb::InteractiveLockingLockedException is thrown directly
when detected by the lock command, to avoid the user interaction
activated by the cancelCommandExecution method.

- terminate gracefully if WebDAV lock/unlock is not supported

Change-Id: I4c5cd652ac7b2c32fb1c3307c34fc31d1a0305c2
Reviewed-on: https://gerrit.libreoffice.org/17080
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-07-22 15:50:00 +00:00
Vasily Melenchuk 0619ed6d9c cmis: throw an error if we were not able to open repository
It was an crash before, if we have stored CMIS url with repository
that does not exist. Session was created, but with empty repo.
Now this nuance is checked and slightly improved error reporting for
cmis.

Change-Id: I447ec767fd735829f8a507733552b26e05cba441
Reviewed-on: https://gerrit.libreoffice.org/17224
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-07-20 20:42:21 +00:00
Stephan Bergmann 6003732e3b loplugin:simplifybool
Change-Id: I164b62e2c98fad49d581b2ee282b6329b83bdbfb
2015-07-16 14:00:23 +02:00
Szymon Kłos 0207ef8930 If user cancels authorization, don't show login dialog again
Change-Id: I4b110c041f1b8908fdfeeec3b4544f8607f23ddb
2015-07-16 09:53:46 +02:00
Szymon Kłos bfbfdc95c6 PlaceEditDialog: only one error after failed auth
Change-Id: I215de03282b3692ebfdc6a7a0e9fd02ecc04f722
2015-07-16 09:53:45 +02:00
Szymon Kłos 298272f9dc tdf#84190 : when auth fails, don't remember passwords for cmis
Change-Id: Ia1e0d553556693e0efa6de0bfc6f8b0ae9d40b5d
2015-07-16 09:53:23 +02:00
Szymon Kłos 0b2ec9b1b3 PlaceEditDialog: temporary error box (showing when auth failed)
Change-Id: I614c62df60e4da4f6bb36438cbd3360484cd518c
2015-07-16 09:53:15 +02:00
Noel Grandin 54013188b2 cleanup some unnecessary direct usage of the OString/OUString C API.
Change-Id: I6edee95aae1c169ce70063562a0c1b287e0c4735
Reviewed-on: https://gerrit.libreoffice.org/16861
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-10 08:09:00 +00:00
Andrea Gelmini e544f449ed Fix typos
Change-Id: I020c7ce4d9aa93cb0292378a410cdb9f7788e920
Signed-off-by: Michael Stahl <mstahl@redhat.com>
2015-07-08 12:21:19 +02:00