diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2008-11-20 15:13:11 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2008-11-20 15:13:11 +0000 |
commit | 21a4a0827e185c8195f989470e04c2b6756d4a18 (patch) | |
tree | 06146f65ff58ee653d351094f02cec8f4ef87222 /sfx2/source/doc/docfile.cxx | |
parent | 9fc97737a2ccc06fe075234396e41269acfbad07 (diff) |
CWS-TOOLING: integrate CWS buildid301_DEV300
Diffstat (limited to 'sfx2/source/doc/docfile.cxx')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 7b896a9c084d..3764ed7258af 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -1029,15 +1029,13 @@ sal_Bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading ) { // the special file locking should be used only for file URLs - SFX_ITEMSET_ARG( GetItemSet(), pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, sal_False); - // no locking is necessary on loading if the document is explicitly opened as copy SFX_ITEMSET_ARG( GetItemSet(), pTemplateItem, SfxBoolItem, SID_TEMPLATE, sal_False); bResult = ( bLoading && pTemplateItem && pTemplateItem->GetValue() ); try { - if ( !bResult && ( !pReadOnlyItem || !pReadOnlyItem->GetValue() ) ) + if ( !bResult && !IsReadOnly() ) { ::svt::DocumentLockFile aLockFile( aLogicName ); bResult = aLockFile.CreateOwnLockFile(); @@ -1134,6 +1132,8 @@ sal_Bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading ) { // the error should be set in case it is storing process // or the document has been opened for editing explicitly + + SFX_ITEMSET_ARG( pSet, pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, FALSE ); if ( !bLoading || pReadOnlyItem && !pReadOnlyItem->GetValue() ) SetError( ERRCODE_IO_ACCESSDENIED ); else |