summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2005-05-18 09:57:18 +0000
committerKurt Zenker <kz@openoffice.org>2005-05-18 09:57:18 +0000
commit23b91acd622a2884533a8e9785d461e365c6bb46 (patch)
tree2ee43aa47753e5fe601262ace51db65e2607814f
parent6ece9dcf06a7964641ed96a6607a647ae4d89149 (diff)
INTEGRATION: CWS readonlydoc1 (1.68.6); FILE MERGED
2005/05/12 11:43:24 mav 1.68.6.1: #i49111# do not close input stream of own readonly document
-rw-r--r--sfx2/source/doc/objmisc.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 009419d703c3..2e2a2b14140f 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: objmisc.cxx,v $
*
- * $Revision: 1.68 $
+ * $Revision: 1.69 $
*
- * last change: $Author: obo $ $Date: 2005-04-22 13:32:25 $
+ * last change: $Author: kz $ $Date: 2005-05-18 10:57:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1244,8 +1244,9 @@ void SfxObjectShell::FinishedLoading( sal_uInt16 nFlags )
if ( (pImp->nLoadedFlags & SFX_LOADED_MAINDOCUMENT ) && (pImp->nLoadedFlags & SFX_LOADED_IMAGES ) )
{
// closing the streams on loading should be under control of SFX!
+ // if a readonly medium has storage then it's stream is already based on temporary file
DBG_ASSERT( pMedium->IsOpen(), "Don't close the medium when loading documents!" );
- if( !(pMedium->GetOpenMode() & STREAM_WRITE) )
+ if( !(pMedium->GetOpenMode() & STREAM_WRITE) && !pMedium->HasStorage_Impl() )
// don't lock file opened read only
pMedium->CloseInStream();
}