summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/docfile.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/doc/docfile.cxx')
-rw-r--r--sfx2/source/doc/docfile.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 5d00d39bd837..95e0af044f2a 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -4215,17 +4215,18 @@ OUString SfxMedium::SwitchDocumentToTempFile()
{}
}
+ if (bWasReadonly)
+ {
+ // set the readonly state back
+ pImpl->m_nStorOpenMode = SFX_STREAM_READONLY;
+ GetItemSet()->Put(SfxBoolItem(SID_DOC_READONLY, true));
+ }
+
if ( aResult.isEmpty() )
{
Close();
SetPhysicalName_Impl( OUString() );
SetName( aOrigURL );
- if ( bWasReadonly )
- {
- // set the readonly state back
- pImpl->m_nStorOpenMode = SFX_STREAM_READONLY;
- GetItemSet()->Put( SfxBoolItem(SID_DOC_READONLY, true));
- }
GetMedium_Impl();
pImpl->xStorage = xStorage;
}