summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2007-04-19 08:24:24 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2007-04-19 08:24:24 +0000
commitbce47b4faa82136a669dea23edbe832d28102e5b (patch)
treebf0b3b0142d55a9f378c646b4e7df8f9ee97f848 /sot
parent02092517c1f2e93c8369e1d86ff512130abd9003 (diff)
INTEGRATION: CWS fwk64 (1.16.28); FILE MERGED
2007/03/29 10:00:09 mav 1.16.28.2: #i75574# avoid crash 2007/03/21 10:00:25 mav 1.16.28.1: #i75574# do not allow to write to readonly streams; let even readonly substorage get correct bDirect flag
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/stg.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx
index fee44aa55ca1..3d813fb126d9 100644
--- a/sot/source/sdstor/stg.cxx
+++ b/sot/source/sdstor/stg.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: stg.cxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: obo $ $Date: 2006-09-17 16:08:55 $
+ * last change: $Author: ihi $ $Date: 2007-04-19 09:24:24 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -629,12 +629,14 @@ BaseStorage* Storage::OpenStorage( const String& rName, StreamMode m, BOOL bDire
pIo->SetError( SVSTREAM_FILE_NOT_FOUND );
p = NULL;
}
+
+ // Either direct or transacted mode is supported
+ if( p && pEntry->nRefCnt == 1 )
+ p->bDirect = bDirect;
+
// Dont check direct conflict if opening readonly
if( p && (m & STREAM_WRITE ))
{
- // Either direct or transacted mode is supported
- if( pEntry->nRefCnt == 1 )
- p->bDirect = bDirect;
if( p->bDirect != bDirect )
SetError( SVSTREAM_ACCESS_DENIED );
}