diff options
author | Dirk Völzke <dv@openoffice.org> | 2001-08-28 07:58:00 +0000 |
---|---|---|
committer | Dirk Völzke <dv@openoffice.org> | 2001-08-28 07:58:00 +0000 |
commit | de4d0606b86b540bd54e98140d5db50df7bbdbfc (patch) | |
tree | 45c65eae82b53ebbcc4e3ba6ccb8b28279d67e9c /sfx2 | |
parent | fcbad93bdae18d52581f3d70bfb5ab4e46b32558 (diff) |
#91405# Don't set READONLY flag for http documents ( for better support of webdav )
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index b203173739dc..531407e68b49 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -2,9 +2,9 @@ * * $RCSfile: docfile.cxx,v $ * - * $Revision: 1.74 $ + * $Revision: 1.75 $ * - * last change: $Author: mba $ $Date: 2001-08-27 16:14:39 $ + * last change: $Author: dv $ $Date: 2001-08-28 08:58:00 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1629,13 +1629,24 @@ void SfxMedium::GetMedium_Impl() } else if ( pImp->xLockBytes->GetError() == ERRCODE_IO_ACCESSDENIED && bIsWritable && bAllowReadOnlyMode ) { - GetItemSet()->Put( SfxBoolItem(SID_DOC_READONLY, sal_True)); + BOOL bIgnoreReadonly = FALSE; + StreamMode aOldMode = GetOpenMode(); + + if ( pURLObj && ( pURLObj->GetProtocol() == INET_PROT_HTTP ) ) + bIgnoreReadonly = TRUE; + if ( ! bIgnoreReadonly ) + GetItemSet()->Put( SfxBoolItem(SID_DOC_READONLY, sal_True)); + SetOpenMode(SFX_STREAM_READONLY, sal_False); ResetError(); pImp->bDownloadDone = sal_False; pImp->bDontCallDoneLinkOnSharingError = sal_False; pImp->xLockBytes = ::utl::UcbLockBytes::CreateLockBytes( GetContent(), aProps, nStorOpenMode, xInteractionHandler, pHandler ); + + if ( bIgnoreReadonly ) + SetOpenMode( aOldMode, sal_False, sal_True ); + if ( !pHandler && !pImp->bDownloadDone ) Done_Impl( pImp->xLockBytes->GetError() ); } |