From a11aa274dac55b06fba32e348a8386fa4fa9d146 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 4 Jan 2012 12:05:23 +0100 Subject: Dead code. --- unotools/inc/unotools/streamhelper.hxx | 31 ---------------- unotools/source/streaming/streamhelper.cxx | 57 ------------------------------ 2 files changed, 88 deletions(-) (limited to 'unotools') diff --git a/unotools/inc/unotools/streamhelper.hxx b/unotools/inc/unotools/streamhelper.hxx index 51c0b7fd4025..8a383436c5fc 100644 --- a/unotools/inc/unotools/streamhelper.hxx +++ b/unotools/inc/unotools/streamhelper.hxx @@ -29,11 +29,9 @@ #ifndef _UNOTOOLS_STREAMHELPER_HXX_ #define _UNOTOOLS_STREAMHELPER_HXX_ -#include #include #include #include -#include #include #include @@ -81,35 +79,6 @@ public: virtual sal_Int64 SAL_CALL getLength( ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); }; -/** - * The helper implementation for a using output streams based on SvLockBytes. - * - * @author Dirk Grobler - * @since 00/28/03 - */ -typedef ::cppu::WeakImplHelper1 OutputStreamHelper_Base; - // needed for some compilers -class UNOTOOLS_DLLPUBLIC OOutputStreamHelper : public OutputStreamHelper_Base -{ - ::osl::Mutex m_aMutex; - SvLockBytesRef m_xLockBytes; - sal_uInt32 m_nActPos; - -public: - OOutputStreamHelper(const SvLockBytesRef& _xLockBytes, sal_uInt32 _nPos = 0) - :m_xLockBytes(_xLockBytes) - ,m_nActPos(_nPos){} - -// staruno::XInterface - virtual void SAL_CALL acquire() throw (); - virtual void SAL_CALL release() throw (); - -// stario::XOutputStream - virtual void SAL_CALL writeBytes( const staruno::Sequence< sal_Int8 >& aData ) throw(stario::NotConnectedException, stario::BufferSizeExceededException, stario::IOException, staruno::RuntimeException); - virtual void SAL_CALL flush( ) throw(stario::NotConnectedException, stario::BufferSizeExceededException, stario::IOException, staruno::RuntimeException); - virtual void SAL_CALL closeOutput( ) throw(stario::NotConnectedException, stario::BufferSizeExceededException, stario::IOException, staruno::RuntimeException); -}; - } // namespace utl diff --git a/unotools/source/streaming/streamhelper.cxx b/unotools/source/streaming/streamhelper.cxx index 5f073923128d..0fc002a84d62 100644 --- a/unotools/source/streaming/streamhelper.cxx +++ b/unotools/source/streaming/streamhelper.cxx @@ -141,63 +141,6 @@ void SAL_CALL OInputStreamHelper::closeInput() m_xLockBytes = NULL; } -/*************************************************************************/ -//------------------------------------------------------------------------------ -void SAL_CALL OOutputStreamHelper::acquire() throw () -{ - OutputStreamHelper_Base::acquire(); -} - -//------------------------------------------------------------------------------ -void SAL_CALL OOutputStreamHelper::release() throw () -{ - OutputStreamHelper_Base::release(); -} -// stario::XOutputStream -//------------------------------------------------------------------------------ -void SAL_CALL OOutputStreamHelper::writeBytes(const staruno::Sequence< sal_Int8 >& aData) - throw (stario::NotConnectedException, stario::BufferSizeExceededException, stario::IOException, staruno::RuntimeException) -{ - ::osl::MutexGuard aGuard( m_aMutex ); - if (!m_xLockBytes.Is()) - throw stario::NotConnectedException(::rtl::OUString(), static_cast(this)); - - sal_Size nWritten; - ErrCode nError = m_xLockBytes->WriteAt( m_nActPos, aData.getConstArray(), aData.getLength(), &nWritten ); - // FIXME nWritten could be truncated on 64-bit arches - m_nActPos += (sal_uInt32)nWritten; - - if (nError != ERRCODE_NONE || - sal::static_int_cast(nWritten) != aData.getLength()) - { - throw stario::IOException(::rtl::OUString(),static_cast(this)); - } -} - -//------------------------------------------------------------------ -void SAL_CALL OOutputStreamHelper::flush() - throw (stario::NotConnectedException, stario::BufferSizeExceededException, stario::IOException, staruno::RuntimeException) -{ - ::osl::MutexGuard aGuard( m_aMutex ); - if (!m_xLockBytes.Is()) - throw stario::NotConnectedException(::rtl::OUString(), static_cast(this)); - - ErrCode nError = m_xLockBytes->Flush(); - if (nError != ERRCODE_NONE) - throw stario::IOException(::rtl::OUString(),static_cast(this)); -} - -//------------------------------------------------------------------ -void SAL_CALL OOutputStreamHelper::closeOutput( ) - throw(stario::NotConnectedException, stario::BufferSizeExceededException, stario::IOException, staruno::RuntimeException) -{ - ::osl::MutexGuard aGuard( m_aMutex ); - if (!m_xLockBytes.Is()) - throw stario::NotConnectedException(::rtl::OUString(), static_cast(this)); - - m_xLockBytes = NULL; -} - } // namespace utl -- cgit