otransactedfilestream.cxx (49b34792) | otransactedfilestream.cxx (d75c37ae) |
---|---|
1/************************************************************** | 1/************************************************************** |
2 * | 2 * |
3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at | 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at |
10 * | 10 * |
11 * http://www.apache.org/licenses/LICENSE-2.0 | 11 * http://www.apache.org/licenses/LICENSE-2.0 |
12 * | 12 * |
13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. | 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. |
19 * | 19 * |
20 *************************************************************/ 21 22 23 24// MARKER(update_precomp.py): autogen include statement, do not remove 25#include "precompiled_comphelper.hxx" 26#include <osl/diagnose.h> 27#include <com/sun/star/beans/PropertyAttribute.hpp> --- 19 unchanged lines hidden (view full) --- 47 OTransactionHelper( OTruncatedTransactedFileStream* pStream ) 48 : m_pFileStream( pStream ) 49 { 50 m_xStreamHolder = static_cast< io::XStream* >( pStream ); 51 if ( !m_xStreamHolder.is() ) 52 throw uno::RuntimeException(); 53 } 54 | 20 *************************************************************/ 21 22 23 24// MARKER(update_precomp.py): autogen include statement, do not remove 25#include "precompiled_comphelper.hxx" 26#include <osl/diagnose.h> 27#include <com/sun/star/beans/PropertyAttribute.hpp> --- 19 unchanged lines hidden (view full) --- 47 OTransactionHelper( OTruncatedTransactedFileStream* pStream ) 48 : m_pFileStream( pStream ) 49 { 50 m_xStreamHolder = static_cast< io::XStream* >( pStream ); 51 if ( !m_xStreamHolder.is() ) 52 throw uno::RuntimeException(); 53 } 54 |
55 virtual void SAL_CALL commit( ) throw (io::IOException, lang::WrappedTargetException, uno::RuntimeException); 56 virtual void SAL_CALL revert( ) throw (io::IOException, lang::WrappedTargetException, uno::RuntimeException); | 55 virtual void SAL_CALL commit( ) throw (io::IOException, lang::WrappedTargetException, uno::RuntimeException); 56 virtual void SAL_CALL revert( ) throw (io::IOException, lang::WrappedTargetException, uno::RuntimeException); |
57}; 58 59// ------------------------------------------------------------------------ 60void SAL_CALL OTransactionHelper::commit( ) throw (io::IOException, lang::WrappedTargetException, uno::RuntimeException) 61{ 62 m_pFileStream->Commit_Impl(); 63} 64 --- 278 unchanged lines hidden (view full) --- 343 344// com::sun::star::io::XStream 345// ------------------------------------------------------------------------ 346uno::Reference< io::XInputStream > SAL_CALL OTruncatedTransactedFileStream::getInputStream( ) 347 throw (uno::RuntimeException) 348{ 349 ::osl::MutexGuard aGuard( m_aMutex ); 350 | 57}; 58 59// ------------------------------------------------------------------------ 60void SAL_CALL OTransactionHelper::commit( ) throw (io::IOException, lang::WrappedTargetException, uno::RuntimeException) 61{ 62 m_pFileStream->Commit_Impl(); 63} 64 --- 278 unchanged lines hidden (view full) --- 343 344// com::sun::star::io::XStream 345// ------------------------------------------------------------------------ 346uno::Reference< io::XInputStream > SAL_CALL OTruncatedTransactedFileStream::getInputStream( ) 347 throw (uno::RuntimeException) 348{ 349 ::osl::MutexGuard aGuard( m_aMutex ); 350 |
351 if ( m_pStreamData ) 352 m_pStreamData->m_bInOpen = sal_True; | 351 if ( m_pStreamData ) 352 m_pStreamData->m_bInOpen = sal_True; |
353 return static_cast< io::XInputStream* >( this ); 354} 355 356 357// ------------------------------------------------------------------------ 358uno::Reference< io::XOutputStream > SAL_CALL OTruncatedTransactedFileStream::getOutputStream( ) 359 throw (uno::RuntimeException) 360{ 361 ::osl::MutexGuard aGuard( m_aMutex ); 362 | 353 return static_cast< io::XInputStream* >( this ); 354} 355 356 357// ------------------------------------------------------------------------ 358uno::Reference< io::XOutputStream > SAL_CALL OTruncatedTransactedFileStream::getOutputStream( ) 359 throw (uno::RuntimeException) 360{ 361 ::osl::MutexGuard aGuard( m_aMutex ); 362 |
363 if ( m_pStreamData ) 364 m_pStreamData->m_bOutOpen = sal_True; | 363 if ( m_pStreamData ) 364 m_pStreamData->m_bOutOpen = sal_True; |
365 return static_cast< io::XOutputStream* >( this ); 366} 367 368 369 370// com::sun::star::io::XInputStream 371// ------------------------------------------------------------------------ 372::sal_Int32 SAL_CALL OTruncatedTransactedFileStream::readBytes( uno::Sequence< ::sal_Int8 >& aData, ::sal_Int32 nBytesToRead ) --- 439 unchanged lines hidden (view full) --- 812void SAL_CALL OTruncatedTransactedFileStream::removeVetoableChangeListener( const ::rtl::OUString&, const uno::Reference< beans::XVetoableChangeListener >& ) 813 throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) 814{ 815 // not implemented 816} 817 818 819} // namespace comphelper | 365 return static_cast< io::XOutputStream* >( this ); 366} 367 368 369 370// com::sun::star::io::XInputStream 371// ------------------------------------------------------------------------ 372::sal_Int32 SAL_CALL OTruncatedTransactedFileStream::readBytes( uno::Sequence< ::sal_Int8 >& aData, ::sal_Int32 nBytesToRead ) --- 439 unchanged lines hidden (view full) --- 812void SAL_CALL OTruncatedTransactedFileStream::removeVetoableChangeListener( const ::rtl::OUString&, const uno::Reference< beans::XVetoableChangeListener >& ) 813 throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) 814{ 815 // not implemented 816} 817 818 819} // namespace comphelper |
820 | |