summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-01-04 12:05:23 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-01-04 12:05:23 +0100
commita11aa274dac55b06fba32e348a8386fa4fa9d146 (patch)
treedd467618cc828bd14b1497ceef7d45fa4ddea240 /unotools
parent67e31e585f0513f74eb2eab759831e2a9e258483 (diff)
Dead code.
Diffstat (limited to 'unotools')
-rw-r--r--unotools/inc/unotools/streamhelper.hxx31
-rw-r--r--unotools/source/streaming/streamhelper.cxx57
2 files changed, 0 insertions, 88 deletions
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 <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XSeekable.hpp>
#include <osl/mutex.hxx>
-#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase2.hxx>
#include <tools/stream.hxx>
@@ -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<stario::XOutputStream> 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<staruno::XWeak*>(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<sal_Int32>(nWritten) != aData.getLength())
- {
- throw stario::IOException(::rtl::OUString(),static_cast<staruno::XWeak*>(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<staruno::XWeak*>(this));
-
- ErrCode nError = m_xLockBytes->Flush();
- if (nError != ERRCODE_NONE)
- throw stario::IOException(::rtl::OUString(),static_cast<staruno::XWeak*>(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<staruno::XWeak*>(this));
-
- m_xLockBytes = NULL;
-}
-
} // namespace utl