Kaydet (Commit) fa6a5ebc authored tarafından Thomas Arnhold's avatar Thomas Arnhold

unotools: stario -> css::io

Change-Id: I54b03d00e5cf0b0b43bf5c5db264660792baf951
üst 091fc82b
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
namespace utl namespace utl
{ {
namespace stario = ::com::sun::star::io;
/** /**
* The helper implementation for a using input streams based on SvLockBytes. * The helper implementation for a using input streams based on SvLockBytes.
...@@ -36,7 +35,7 @@ namespace utl ...@@ -36,7 +35,7 @@ namespace utl
* @author Dirk Grobler * @author Dirk Grobler
* @since 00/28/03 * @since 00/28/03
*/ */
typedef ::cppu::WeakImplHelper2<stario::XInputStream, stario::XSeekable> InputStreamHelper_Base; typedef ::cppu::WeakImplHelper2<css::io::XInputStream, css::io::XSeekable> InputStreamHelper_Base;
// needed for some compilers // needed for some compilers
class UNOTOOLS_DLLPUBLIC OInputStreamHelper : public InputStreamHelper_Base class UNOTOOLS_DLLPUBLIC OInputStreamHelper : public InputStreamHelper_Base
{ {
...@@ -57,12 +56,12 @@ public: ...@@ -57,12 +56,12 @@ public:
virtual void SAL_CALL acquire() throw () SAL_OVERRIDE; virtual void SAL_CALL acquire() throw () SAL_OVERRIDE;
virtual void SAL_CALL release() throw () SAL_OVERRIDE; virtual void SAL_CALL release() throw () SAL_OVERRIDE;
// stario::XInputStream // css::io::XInputStream
virtual sal_Int32 SAL_CALL readBytes( css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw(stario::NotConnectedException, stario::BufferSizeExceededException, stario::IOException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL readBytes( css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw(css::io::NotConnectedException, css::io::BufferSizeExceededException, css::io::IOException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int32 SAL_CALL readSomeBytes( css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) throw(stario::NotConnectedException, stario::BufferSizeExceededException, stario::IOException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL readSomeBytes( css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) throw(css::io::NotConnectedException, css::io::BufferSizeExceededException, css::io::IOException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) throw(stario::NotConnectedException, stario::BufferSizeExceededException, stario::IOException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) throw(css::io::NotConnectedException, css::io::BufferSizeExceededException, css::io::IOException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int32 SAL_CALL available( ) throw(stario::NotConnectedException, stario::IOException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL available( ) throw(css::io::NotConnectedException, css::io::IOException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL closeInput( ) throw (stario::NotConnectedException, stario::IOException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL closeInput( ) throw (css::io::NotConnectedException, css::io::IOException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL seek( sal_Int64 location ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL seek( sal_Int64 location ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int64 SAL_CALL getPosition( ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Int64 SAL_CALL getPosition( ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
......
...@@ -27,8 +27,6 @@ ...@@ -27,8 +27,6 @@
namespace utl namespace utl
{ {
namespace stario = ::com::sun::star::io;
/** implements handling for compatibly reading/writing data from/into an input/output stream. /** implements handling for compatibly reading/writing data from/into an input/output stream.
data written in a block secured by this class should be readable by older versions which data written in a block secured by this class should be readable by older versions which
use the same mechanism. use the same mechanism.
...@@ -39,9 +37,9 @@ namespace utl ...@@ -39,9 +37,9 @@ namespace utl
class OStreamSection class OStreamSection
{ {
css::uno::Reference< stario::XMarkableStream > m_xMarkStream; css::uno::Reference< css::io::XMarkableStream > m_xMarkStream;
css::uno::Reference< stario::XDataInputStream > m_xInStream; css::uno::Reference< css::io::XDataInputStream > m_xInStream;
css::uno::Reference< stario::XDataOutputStream > m_xOutStream; css::uno::Reference< css::io::XDataOutputStream > m_xOutStream;
sal_Int32 m_nBlockStart; sal_Int32 m_nBlockStart;
sal_Int32 m_nBlockLen; sal_Int32 m_nBlockLen;
...@@ -51,7 +49,7 @@ public: ...@@ -51,7 +49,7 @@ public:
@param _rxInput the stream to read from. Must support the @param _rxInput the stream to read from. Must support the
com::sun::star::io::XMarkableStream interface com::sun::star::io::XMarkableStream interface
*/ */
OStreamSection(const css::uno::Reference< stario::XDataInputStream >& _rxInput); OStreamSection(const css::uno::Reference< css::io::XDataInputStream >& _rxInput);
/** starts writing of a "skippable" section of data into the given output stream /** starts writing of a "skippable" section of data into the given output stream
@param _rxOutput the stream the stream to write to. Must support the @param _rxOutput the stream the stream to write to. Must support the
...@@ -61,7 +59,7 @@ public: ...@@ -61,7 +59,7 @@ public:
needed. If you know how much bytes you are about to write, you may needed. If you know how much bytes you are about to write, you may
want to use this param, saving some stream operations this way. want to use this param, saving some stream operations this way.
*/ */
OStreamSection(const css::uno::Reference< stario::XDataOutputStream >& _rxOutput, sal_Int32 _nPresumedLength = 0); OStreamSection(const css::uno::Reference< css::io::XDataOutputStream >& _rxOutput, sal_Int32 _nPresumedLength = 0);
/** dtor. <BR>If constructed for writing, the section "opened" by this object will be "closed".<BR> /** dtor. <BR>If constructed for writing, the section "opened" by this object will be "closed".<BR>
If constructed for reading, any remaining bytes 'til the end of the section will be skipped. If constructed for reading, any remaining bytes 'til the end of the section will be skipped.
......
...@@ -34,11 +34,10 @@ class SvStream; ...@@ -34,11 +34,10 @@ class SvStream;
namespace utl namespace utl
{ {
namespace stario = ::com::sun::star::io;
//= OInputStreamWrapper //= OInputStreamWrapper
typedef ::cppu::WeakImplHelper1 < stario::XInputStream typedef ::cppu::WeakImplHelper1 < css::io::XInputStream
> InputStreamWrapper_Base; > InputStreamWrapper_Base;
// needed for some compilers // needed for some compilers
/// helper class for wrapping an SvStream into an com.sun.star.io::XInputStream /// helper class for wrapping an SvStream into an com.sun.star.io::XInputStream
...@@ -58,12 +57,12 @@ public: ...@@ -58,12 +57,12 @@ public:
OInputStreamWrapper(SvStream* pStream, bool bOwner=false); OInputStreamWrapper(SvStream* pStream, bool bOwner=false);
virtual ~OInputStreamWrapper(); virtual ~OInputStreamWrapper();
// stario::XInputStream // css::io::XInputStream
virtual sal_Int32 SAL_CALL readBytes(css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) throw(stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL readBytes(css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) throw(css::io::NotConnectedException, css::io::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int32 SAL_CALL readSomeBytes(css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) throw(stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL readSomeBytes(css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) throw(css::io::NotConnectedException, css::io::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL skipBytes(sal_Int32 nBytesToSkip) throw(stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL skipBytes(sal_Int32 nBytesToSkip) throw(css::io::NotConnectedException, css::io::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int32 SAL_CALL available() throw(stario::NotConnectedException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL available() throw(css::io::NotConnectedException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL closeInput() throw(stario::NotConnectedException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL closeInput() throw(css::io::NotConnectedException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
protected: protected:
/// throws a NotConnectedException if the object is not connected anymore /// throws a NotConnectedException if the object is not connected anymore
...@@ -95,7 +94,7 @@ public: ...@@ -95,7 +94,7 @@ public:
//= OOutputStreamWrapper //= OOutputStreamWrapper
typedef ::cppu::WeakImplHelper1<stario::XOutputStream> OutputStreamWrapper_Base; typedef ::cppu::WeakImplHelper1<css::io::XOutputStream> OutputStreamWrapper_Base;
// needed for some compilers // needed for some compilers
class OOutputStreamWrapper : public OutputStreamWrapper_Base class OOutputStreamWrapper : public OutputStreamWrapper_Base
{ {
...@@ -105,10 +104,10 @@ public: ...@@ -105,10 +104,10 @@ public:
protected: protected:
virtual ~OOutputStreamWrapper(); virtual ~OOutputStreamWrapper();
// stario::XOutputStream // css::io::XOutputStream
virtual void SAL_CALL writeBytes(const css::uno::Sequence< sal_Int8 >& aData) throw(stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL writeBytes(const css::uno::Sequence< sal_Int8 >& aData) throw(css::io::NotConnectedException, css::io::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL flush() throw(stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL flush() throw(css::io::NotConnectedException, css::io::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL closeOutput() throw(stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL closeOutput() throw(css::io::NotConnectedException, css::io::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
/// throws an exception according to the error flag of m_pSvStream /// throws an exception according to the error flag of m_pSvStream
void checkError() const; void checkError() const;
...@@ -150,14 +149,14 @@ class UNOTOOLS_DLLPUBLIC OStreamWrapper : public ::cppu::ImplInheritanceHelper3 ...@@ -150,14 +149,14 @@ class UNOTOOLS_DLLPUBLIC OStreamWrapper : public ::cppu::ImplInheritanceHelper3
public: public:
OStreamWrapper(SvStream& _rStream); OStreamWrapper(SvStream& _rStream);
// stario::XStream // css::io::XStream
virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getInputStream( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getInputStream( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > SAL_CALL getOutputStream( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > SAL_CALL getOutputStream( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// stario::XOutputStream // css::io::XOutputStream
virtual void SAL_CALL writeBytes(const css::uno::Sequence< sal_Int8 >& aData) throw(stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL writeBytes(const css::uno::Sequence< sal_Int8 >& aData) throw(css::io::NotConnectedException, css::io::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL flush() throw(stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL flush() throw(css::io::NotConnectedException, css::io::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL closeOutput() throw(stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL closeOutput() throw(css::io::NotConnectedException, css::io::BufferSizeExceededException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL truncate() throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL truncate() throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
}; };
......
...@@ -33,13 +33,13 @@ void SAL_CALL OInputStreamHelper::release() throw () ...@@ -33,13 +33,13 @@ void SAL_CALL OInputStreamHelper::release() throw ()
} }
sal_Int32 SAL_CALL OInputStreamHelper::readBytes(css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) sal_Int32 SAL_CALL OInputStreamHelper::readBytes(css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead)
throw(stario::NotConnectedException, stario::BufferSizeExceededException, stario::IOException, css::uno::RuntimeException, std::exception) throw(css::io::NotConnectedException, css::io::BufferSizeExceededException, css::io::IOException, css::uno::RuntimeException, std::exception)
{ {
if (!m_xLockBytes.Is()) if (!m_xLockBytes.Is())
throw stario::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this)); throw css::io::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this));
if (nBytesToRead < 0) if (nBytesToRead < 0)
throw stario::BufferSizeExceededException(OUString(), static_cast<css::uno::XWeak*>(this)); throw css::io::BufferSizeExceededException(OUString(), static_cast<css::uno::XWeak*>(this));
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
aData.realloc(nBytesToRead); aData.realloc(nBytesToRead);
...@@ -49,7 +49,7 @@ sal_Int32 SAL_CALL OInputStreamHelper::readBytes(css::uno::Sequence< sal_Int8 >& ...@@ -49,7 +49,7 @@ sal_Int32 SAL_CALL OInputStreamHelper::readBytes(css::uno::Sequence< sal_Int8 >&
m_nActPos += nRead; m_nActPos += nRead;
if (nError != ERRCODE_NONE) if (nError != ERRCODE_NONE)
throw stario::IOException(OUString(), static_cast<css::uno::XWeak*>(this)); throw css::io::IOException(OUString(), static_cast<css::uno::XWeak*>(this));
// adjust sequence if data read is lower than the desired data // adjust sequence if data read is lower than the desired data
if (nRead < (sal_uInt32)nBytesToRead) if (nRead < (sal_uInt32)nBytesToRead)
...@@ -82,41 +82,41 @@ sal_Int64 SAL_CALL OInputStreamHelper::getLength( ) throw(::com::sun::star::io: ...@@ -82,41 +82,41 @@ sal_Int64 SAL_CALL OInputStreamHelper::getLength( ) throw(::com::sun::star::io:
sal_Int32 SAL_CALL OInputStreamHelper::readSomeBytes(css::uno::Sequence< sal_Int8 >& aData, sal_Int32 SAL_CALL OInputStreamHelper::readSomeBytes(css::uno::Sequence< sal_Int8 >& aData,
sal_Int32 nMaxBytesToRead) sal_Int32 nMaxBytesToRead)
throw (stario::NotConnectedException, stario::BufferSizeExceededException, stario::IOException, css::uno::RuntimeException, std::exception) throw (css::io::NotConnectedException, css::io::BufferSizeExceededException, css::io::IOException, css::uno::RuntimeException, std::exception)
{ {
// read all data desired // read all data desired
return readBytes(aData, nMaxBytesToRead); return readBytes(aData, nMaxBytesToRead);
} }
void SAL_CALL OInputStreamHelper::skipBytes(sal_Int32 nBytesToSkip) void SAL_CALL OInputStreamHelper::skipBytes(sal_Int32 nBytesToSkip)
throw (stario::NotConnectedException, stario::BufferSizeExceededException, stario::IOException, css::uno::RuntimeException, std::exception) throw (css::io::NotConnectedException, css::io::BufferSizeExceededException, css::io::IOException, css::uno::RuntimeException, std::exception)
{ {
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
if (!m_xLockBytes.Is()) if (!m_xLockBytes.Is())
throw stario::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this)); throw css::io::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this));
if (nBytesToSkip < 0) if (nBytesToSkip < 0)
throw stario::BufferSizeExceededException(OUString(), static_cast<css::uno::XWeak*>(this)); throw css::io::BufferSizeExceededException(OUString(), static_cast<css::uno::XWeak*>(this));
m_nActPos += nBytesToSkip; m_nActPos += nBytesToSkip;
} }
sal_Int32 SAL_CALL OInputStreamHelper::available() sal_Int32 SAL_CALL OInputStreamHelper::available()
throw (stario::NotConnectedException, stario::IOException, css::uno::RuntimeException, std::exception) throw (css::io::NotConnectedException, css::io::IOException, css::uno::RuntimeException, std::exception)
{ {
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
if (!m_xLockBytes.Is()) if (!m_xLockBytes.Is())
throw stario::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this)); throw css::io::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this));
return m_nAvailable; return m_nAvailable;
} }
void SAL_CALL OInputStreamHelper::closeInput() void SAL_CALL OInputStreamHelper::closeInput()
throw (stario::NotConnectedException, stario::IOException, css::uno::RuntimeException, std::exception) throw (css::io::NotConnectedException, css::io::IOException, css::uno::RuntimeException, std::exception)
{ {
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
if (!m_xLockBytes.Is()) if (!m_xLockBytes.Is())
throw stario::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this)); throw css::io::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this));
m_xLockBytes = NULL; m_xLockBytes = NULL;
} }
......
...@@ -46,12 +46,12 @@ OInputStreamWrapper::~OInputStreamWrapper() ...@@ -46,12 +46,12 @@ OInputStreamWrapper::~OInputStreamWrapper()
} }
sal_Int32 SAL_CALL OInputStreamWrapper::readBytes(css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) sal_Int32 SAL_CALL OInputStreamWrapper::readBytes(css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead)
throw( stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception ) throw( css::io::NotConnectedException, css::io::BufferSizeExceededException, css::uno::RuntimeException, std::exception )
{ {
checkConnected(); checkConnected();
if (nBytesToRead < 0) if (nBytesToRead < 0)
throw stario::BufferSizeExceededException(OUString(),static_cast<css::uno::XWeak*>(this)); throw css::io::BufferSizeExceededException(OUString(),static_cast<css::uno::XWeak*>(this));
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
...@@ -67,12 +67,12 @@ sal_Int32 SAL_CALL OInputStreamWrapper::readBytes(css::uno::Sequence< sal_Int8 > ...@@ -67,12 +67,12 @@ sal_Int32 SAL_CALL OInputStreamWrapper::readBytes(css::uno::Sequence< sal_Int8 >
return nRead; return nRead;
} }
sal_Int32 SAL_CALL OInputStreamWrapper::readSomeBytes(css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) throw( stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception ) sal_Int32 SAL_CALL OInputStreamWrapper::readSomeBytes(css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) throw( css::io::NotConnectedException, css::io::BufferSizeExceededException, css::uno::RuntimeException, std::exception )
{ {
checkError(); checkError();
if (nMaxBytesToRead < 0) if (nMaxBytesToRead < 0)
throw stario::BufferSizeExceededException(OUString(),static_cast<css::uno::XWeak*>(this)); throw css::io::BufferSizeExceededException(OUString(),static_cast<css::uno::XWeak*>(this));
if (m_pSvStream->IsEof()) if (m_pSvStream->IsEof())
{ {
...@@ -83,7 +83,7 @@ sal_Int32 SAL_CALL OInputStreamWrapper::readSomeBytes(css::uno::Sequence< sal_In ...@@ -83,7 +83,7 @@ sal_Int32 SAL_CALL OInputStreamWrapper::readSomeBytes(css::uno::Sequence< sal_In
return readBytes(aData, nMaxBytesToRead); return readBytes(aData, nMaxBytesToRead);
} }
void SAL_CALL OInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip) throw( stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception ) void SAL_CALL OInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip) throw( css::io::NotConnectedException, css::io::BufferSizeExceededException, css::uno::RuntimeException, std::exception )
{ {
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
checkError(); checkError();
...@@ -92,7 +92,7 @@ void SAL_CALL OInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip) throw( star ...@@ -92,7 +92,7 @@ void SAL_CALL OInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip) throw( star
checkError(); checkError();
} }
sal_Int32 SAL_CALL OInputStreamWrapper::available() throw( stario::NotConnectedException, css::uno::RuntimeException, std::exception ) sal_Int32 SAL_CALL OInputStreamWrapper::available() throw( css::io::NotConnectedException, css::uno::RuntimeException, std::exception )
{ {
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
checkConnected(); checkConnected();
...@@ -110,7 +110,7 @@ sal_Int32 SAL_CALL OInputStreamWrapper::available() throw( stario::NotConnectedE ...@@ -110,7 +110,7 @@ sal_Int32 SAL_CALL OInputStreamWrapper::available() throw( stario::NotConnectedE
return nAvailable; return nAvailable;
} }
void SAL_CALL OInputStreamWrapper::closeInput() throw( stario::NotConnectedException, css::uno::RuntimeException, std::exception ) void SAL_CALL OInputStreamWrapper::closeInput() throw( css::io::NotConnectedException, css::uno::RuntimeException, std::exception )
{ {
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
checkConnected(); checkConnected();
...@@ -124,7 +124,7 @@ void SAL_CALL OInputStreamWrapper::closeInput() throw( stario::NotConnectedExcep ...@@ -124,7 +124,7 @@ void SAL_CALL OInputStreamWrapper::closeInput() throw( stario::NotConnectedExcep
void OInputStreamWrapper::checkConnected() const void OInputStreamWrapper::checkConnected() const
{ {
if (!m_pSvStream) if (!m_pSvStream)
throw stario::NotConnectedException(OUString(), const_cast<css::uno::XWeak*>(static_cast<const css::uno::XWeak*>(this))); throw css::io::NotConnectedException(OUString(), const_cast<css::uno::XWeak*>(static_cast<const css::uno::XWeak*>(this)));
} }
void OInputStreamWrapper::checkError() const void OInputStreamWrapper::checkError() const
...@@ -133,7 +133,7 @@ void OInputStreamWrapper::checkError() const ...@@ -133,7 +133,7 @@ void OInputStreamWrapper::checkError() const
if (m_pSvStream->SvStream::GetError() != ERRCODE_NONE) if (m_pSvStream->SvStream::GetError() != ERRCODE_NONE)
// TODO: really evaluate the error // TODO: really evaluate the error
throw stario::NotConnectedException(OUString(), const_cast<css::uno::XWeak*>(static_cast<const css::uno::XWeak*>(this))); throw css::io::NotConnectedException(OUString(), const_cast<css::uno::XWeak*>(static_cast<const css::uno::XWeak*>(this)));
} }
//= OSeekableInputStreamWrapper //= OSeekableInputStreamWrapper
...@@ -192,7 +192,7 @@ OOutputStreamWrapper::OOutputStreamWrapper(SvStream& _rStream): ...@@ -192,7 +192,7 @@ OOutputStreamWrapper::OOutputStreamWrapper(SvStream& _rStream):
OOutputStreamWrapper::~OOutputStreamWrapper() {} OOutputStreamWrapper::~OOutputStreamWrapper() {}
void SAL_CALL OOutputStreamWrapper::writeBytes(const css::uno::Sequence< sal_Int8 >& aData) throw( stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception ) void SAL_CALL OOutputStreamWrapper::writeBytes(const css::uno::Sequence< sal_Int8 >& aData) throw( css::io::NotConnectedException, css::io::BufferSizeExceededException, css::uno::RuntimeException, std::exception )
{ {
sal_uInt32 nWritten = rStream.Write(aData.getConstArray(),aData.getLength()); sal_uInt32 nWritten = rStream.Write(aData.getConstArray(),aData.getLength());
ErrCode err = rStream.GetError(); ErrCode err = rStream.GetError();
...@@ -200,17 +200,17 @@ void SAL_CALL OOutputStreamWrapper::writeBytes(const css::uno::Sequence< sal_Int ...@@ -200,17 +200,17 @@ void SAL_CALL OOutputStreamWrapper::writeBytes(const css::uno::Sequence< sal_Int
|| (nWritten != (sal_uInt32)aData.getLength()) || (nWritten != (sal_uInt32)aData.getLength())
) )
{ {
throw stario::BufferSizeExceededException(OUString(),static_cast<css::uno::XWeak*>(this)); throw css::io::BufferSizeExceededException(OUString(),static_cast<css::uno::XWeak*>(this));
} }
} }
void SAL_CALL OOutputStreamWrapper::flush() throw( stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception ) void SAL_CALL OOutputStreamWrapper::flush() throw( css::io::NotConnectedException, css::io::BufferSizeExceededException, css::uno::RuntimeException, std::exception )
{ {
rStream.Flush(); rStream.Flush();
checkError(); checkError();
} }
void SAL_CALL OOutputStreamWrapper::closeOutput() throw( stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception ) void SAL_CALL OOutputStreamWrapper::closeOutput() throw( css::io::NotConnectedException, css::io::BufferSizeExceededException, css::uno::RuntimeException, std::exception )
{ {
} }
...@@ -218,7 +218,7 @@ void OOutputStreamWrapper::checkError() const ...@@ -218,7 +218,7 @@ void OOutputStreamWrapper::checkError() const
{ {
if (rStream.GetError() != ERRCODE_NONE) if (rStream.GetError() != ERRCODE_NONE)
// TODO: really evaluate the error // TODO: really evaluate the error
throw stario::NotConnectedException(OUString(), const_cast<css::uno::XWeak*>(static_cast<const css::uno::XWeak*>(this))); throw css::io::NotConnectedException(OUString(), const_cast<css::uno::XWeak*>(static_cast<const css::uno::XWeak*>(this)));
} }
//= OSeekableOutputStreamWrapper //= OSeekableOutputStreamWrapper
...@@ -290,7 +290,7 @@ OStreamWrapper::OStreamWrapper(SvStream& _rStream) ...@@ -290,7 +290,7 @@ OStreamWrapper::OStreamWrapper(SvStream& _rStream)
return this; return this;
} }
void SAL_CALL OStreamWrapper::writeBytes(const css::uno::Sequence< sal_Int8 >& aData) throw(stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception) void SAL_CALL OStreamWrapper::writeBytes(const css::uno::Sequence< sal_Int8 >& aData) throw(css::io::NotConnectedException, css::io::BufferSizeExceededException, css::uno::RuntimeException, std::exception)
{ {
sal_uInt32 nWritten = m_pSvStream->Write(aData.getConstArray(),aData.getLength()); sal_uInt32 nWritten = m_pSvStream->Write(aData.getConstArray(),aData.getLength());
ErrCode err = m_pSvStream->GetError(); ErrCode err = m_pSvStream->GetError();
...@@ -298,18 +298,18 @@ void SAL_CALL OStreamWrapper::writeBytes(const css::uno::Sequence< sal_Int8 >& a ...@@ -298,18 +298,18 @@ void SAL_CALL OStreamWrapper::writeBytes(const css::uno::Sequence< sal_Int8 >& a
|| (nWritten != (sal_uInt32)aData.getLength()) || (nWritten != (sal_uInt32)aData.getLength())
) )
{ {
throw stario::BufferSizeExceededException(OUString(),static_cast<css::uno::XWeak*>(this)); throw css::io::BufferSizeExceededException(OUString(),static_cast<css::uno::XWeak*>(this));
} }
} }
void SAL_CALL OStreamWrapper::flush() throw(stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception) void SAL_CALL OStreamWrapper::flush() throw(css::io::NotConnectedException, css::io::BufferSizeExceededException, css::uno::RuntimeException, std::exception)
{ {
m_pSvStream->Flush(); m_pSvStream->Flush();
if (m_pSvStream->GetError() != ERRCODE_NONE) if (m_pSvStream->GetError() != ERRCODE_NONE)
throw stario::NotConnectedException(OUString(),static_cast<css::uno::XWeak*>(this)); throw css::io::NotConnectedException(OUString(),static_cast<css::uno::XWeak*>(this));
} }
void SAL_CALL OStreamWrapper::closeOutput() throw(stario::NotConnectedException, stario::BufferSizeExceededException, css::uno::RuntimeException, std::exception) void SAL_CALL OStreamWrapper::closeOutput() throw(css::io::NotConnectedException, css::io::BufferSizeExceededException, css::uno::RuntimeException, std::exception)
{ {
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment