diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-04-15 13:00:48 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-04-15 13:00:48 +0000 |
commit | 7ab515cde50582f1f7e161e911035ac16d217df5 (patch) | |
tree | 352d0857f5dc6b48b9391f7a01cfa112137b1bb3 /ucb | |
parent | 67658662be66ac7d95246144b80a5b1d70450376 (diff) |
INTEGRATION: CWS calcshare2 (1.11.114); FILE MERGED
2008/03/14 21:32:35 mav 1.11.114.1: #i85794# new file locking prototype
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/file/filinpstr.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ucb/source/ucp/file/filinpstr.cxx b/ucb/source/ucp/file/filinpstr.cxx index ccc3acb462ba..f234914687ab 100644 --- a/ucb/source/ucp/file/filinpstr.cxx +++ b/ucb/source/ucp/file/filinpstr.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: filinpstr.cxx,v $ - * $Revision: 1.12 $ + * $Revision: 1.13 $ * * This file is part of OpenOffice.org. * @@ -44,14 +44,19 @@ using namespace com::sun::star::ucb; -XInputStream_impl::XInputStream_impl( shell* pMyShell,const rtl::OUString& aUncPath ) +XInputStream_impl::XInputStream_impl( shell* pMyShell,const rtl::OUString& aUncPath, sal_Bool bLock ) : m_pMyShell( pMyShell ), m_xProvider( 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 ); + sal_uInt32 nFlags = OpenFlag_Read; + if ( !bLock ) + nFlags |= OpenFlag_NoLock; + + osl::FileBase::RC err = m_aFile.open( nFlags ); if( err != osl::FileBase::E_None ) { m_nIsOpen = false; |