summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-04-15 13:01:16 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-04-15 13:01:16 +0000
commit16c5c83e36e004ee05d19dfede8b2ed20a51e084 (patch)
tree5dfd22c98b95fb480b83dfb257665684e2feb1d6 /ucb
parentaad16740f6e294e6ca393ea50b894b04548c1d11 (diff)
INTEGRATION: CWS calcshare2 (1.22.114); FILE MERGED
2008/03/14 21:32:35 mav 1.22.114.1: #i85794# new file locking prototype
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/file/filstr.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx
index b6f620946fb2..4c560acb238f 100644
--- a/ucb/source/ucp/file/filstr.cxx
+++ b/ucb/source/ucp/file/filstr.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: filstr.cxx,v $
- * $Revision: 1.23 $
+ * $Revision: 1.24 $
*
* This file is part of OpenOffice.org.
*
@@ -102,16 +102,21 @@ XTYPEPROVIDER_IMPL_7( XStream_impl,
-XStream_impl::XStream_impl( shell* pMyShell,const rtl::OUString& aUncPath )
+XStream_impl::XStream_impl( shell* pMyShell,const rtl::OUString& aUncPath, sal_Bool bLock )
: m_bInputStreamCalled( false ),
m_bOutputStreamCalled( false ),
m_pMyShell( pMyShell ),
m_xProvider( m_pMyShell->m_pProvider ),
+ m_bLock( bLock ),
m_aFile( aUncPath ),
m_nErrorCode( TASKHANDLER_NO_ERROR ),
m_nMinorErrorCode( TASKHANDLER_NO_ERROR )
{
- osl::FileBase::RC err = m_aFile.open( OpenFlag_Read | OpenFlag_Write );
+ sal_uInt32 nFlags = ( OpenFlag_Read | OpenFlag_Write );
+ if ( !bLock )
+ nFlags |= OpenFlag_NoLock;
+
+ osl::FileBase::RC err = m_aFile.open( nFlags );
if( err != osl::FileBase::E_None )
{
m_nIsOpen = false;