tdf#82744: fix WebDAV lock/unlock behaviour - part 3

Desktop / LibreOffice - Giuseppe Castagno [acca-esse.eu] - 5 October 2015 06:14 UTC

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

b4576f3 tdf#82744: fix WebDAV lock/unlock behaviour - part 3
include/sfx2/docfile.hxx | 3 +-
include/ucbhelper/content.hxx | 20 ++
sfx2/source/doc/docfile.cxx | 146 ++++++++++-
sfx2/source/doc/objstor.cxx | 8 +
sfx2/source/view/viewfrm.cxx | 32 ++-
ucb/source/ucp/webdav-neon/ContentProperties.hxx | 6 +-
ucb/source/ucp/webdav-neon/NeonSession.cxx | 50 +++-
ucb/source/ucp/webdav-neon/webdavcontent.cxx | 305 +++++++++++++++++-----
ucb/source/ucp/webdav-neon/webdavcontent.hxx | 14 +-
ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx | 3 +-
ucbhelper/source/client/content.cxx | 21 ++
unotools/source/misc/mediadescriptor.cxx | 8 +-
12 files changed, 520 insertions(+), 96 deletions(-)

Upstream: cgit.freedesktop.org


  • Share