diff options
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index c776ff944957..1b04019c95c3 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -1200,6 +1200,10 @@ bool SfxObjectShell::SaveTo_Impl && !rMedium.GetName().equalsIgnoreAsciiCase("private:stream") && ::utl::UCBContentHelper::EqualURLs( pMedium->GetName(), rMedium.GetName() ) ) { + // Do not unlock the file during saving. + // need to modify this for WebDAV if this method is called outside of + // the process of saving a file + pMedium->DisableUnlockWebDAV(); bStoreToSameLocation = true; if ( pMedium->DocNeedsFileDateCheck() ) @@ -1298,6 +1302,7 @@ bool SfxObjectShell::SaveTo_Impl } } } + pMedium->DisableUnlockWebDAV(false); } else { @@ -1718,10 +1723,6 @@ bool SfxObjectShell::SaveTo_Impl return bOk; } - -// This method contains a call to disable the UNLOCK of a WebDAV resource, that work while saving a file. -// If the method is called from another process (e.g. not when saving a file), -// that disabling needs tweaking bool SfxObjectShell::DisconnectStorage_Impl( SfxMedium& rSrcMedium, SfxMedium& rTargetMedium ) { // this method disconnects the storage from source medium, and attaches it to the backup created by the target medium @@ -1742,12 +1743,7 @@ bool SfxObjectShell::DisconnectStorage_Impl( SfxMedium& rSrcMedium, SfxMedium& r rTargetMedium.ResetError(); xOptStorage->writeAndAttachToStream( uno::Reference< io::XStream >() ); rSrcMedium.CanDisposeStorage_Impl( false ); - // need to modify this for WebDAV if this method is called outside - // the process of saving a file - rSrcMedium.DisableUnlockWebDAV(); rSrcMedium.Close(); - // see comment on the previous third row - rSrcMedium.DisableUnlockWebDAV( false ); // now try to create the backup rTargetMedium.GetBackup_Impl(); |