diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-03-15 14:32:00 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-03-15 15:24:49 +0200 |
commit | 48f45d36e2a0e9fbaaa4bd55e8ee4acaa9499072 (patch) | |
tree | 53b97aea363b083398d77adfe5d24e4090ac0252 | |
parent | 303cb25751373743b978a5da9c6c2d6d1d0dda3d (diff) |
Lock document that is opened for potential modification
Part of fix for bnc#805901. (No locking of documents edited through WebDAV.)
Seems to work, can it really be this simple...
I am a bit unsure if any explicit UNLOCK operation happens, but WebDAV locks
typically time out relatively quickly, don't they? And WebDAV implementations
(often/always?) have the possibility for a user to force open a lock.
Change-Id: Ia32d8b1517361f702b4f469d9f1aa17de6d7ba54
-rw-r--r-- | ucb/source/ucp/webdav-neon/webdavcontent.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx index 14d52d3d006c..6a3cb7b2d6cc 100644 --- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx +++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx @@ -499,6 +499,11 @@ uno::Any SAL_CALL Content::execute( } aRet = open( aOpenCommand, Environment ); + + if ( (aOpenCommand.Mode == ucb::OpenMode::DOCUMENT || + aOpenCommand.Mode == ucb::OpenMode::DOCUMENT_SHARE_DENY_WRITE) && + supportsExclusiveWriteLock( Environment ) ) + lock( Environment ); } else if ( aCommand.Name == "insert" ) { |