diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-25 21:31:58 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-26 18:22:20 +0100 |
commit | 5e21a413c788f839a66d9e4c14e745ed18058db8 (patch) | |
tree | d4451246461346a425ad6f796e08bf1514cdd942 /comphelper/source/streaming | |
parent | 6fc2bd0094a23aafadeef3f4a8c2803d621a588d (diff) |
cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
Diffstat (limited to 'comphelper/source/streaming')
-rw-r--r-- | comphelper/source/streaming/memorystream.cxx | 56 | ||||
-rw-r--r-- | comphelper/source/streaming/oslfile2streamwrap.cxx | 16 | ||||
-rw-r--r-- | comphelper/source/streaming/seekableinput.cxx | 16 | ||||
-rw-r--r-- | comphelper/source/streaming/seqinputstreamserv.cxx | 48 | ||||
-rw-r--r-- | comphelper/source/streaming/seqoutputstreamserv.cxx | 28 | ||||
-rw-r--r-- | comphelper/source/streaming/seqstream.cxx | 22 |
6 files changed, 93 insertions, 93 deletions
diff --git a/comphelper/source/streaming/memorystream.cxx b/comphelper/source/streaming/memorystream.cxx index 906e62e513d3..380e64ca3623 100644 --- a/comphelper/source/streaming/memorystream.cxx +++ b/comphelper/source/streaming/memorystream.cxx @@ -46,28 +46,28 @@ public: virtual ~UNOMemoryStream(); // XStream - virtual Reference< XInputStream > SAL_CALL getInputStream( ) throw (RuntimeException); - virtual Reference< XOutputStream > SAL_CALL getOutputStream( ) throw (RuntimeException); + virtual Reference< XInputStream > SAL_CALL getInputStream( ) throw (RuntimeException, std::exception); + virtual Reference< XOutputStream > SAL_CALL getOutputStream( ) throw (RuntimeException, std::exception); // XInputStream - virtual sal_Int32 SAL_CALL readBytes( Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException); - virtual sal_Int32 SAL_CALL readSomeBytes( Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException); - virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException); - virtual sal_Int32 SAL_CALL available() throw (NotConnectedException, IOException, RuntimeException); - virtual void SAL_CALL closeInput() throw (NotConnectedException, IOException, RuntimeException); + virtual sal_Int32 SAL_CALL readBytes( Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception); + virtual sal_Int32 SAL_CALL readSomeBytes( Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception); + virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception); + virtual sal_Int32 SAL_CALL available() throw (NotConnectedException, IOException, RuntimeException, std::exception); + virtual void SAL_CALL closeInput() throw (NotConnectedException, IOException, RuntimeException, std::exception); // XSeekable - virtual void SAL_CALL seek( sal_Int64 location ) throw (IllegalArgumentException, IOException, RuntimeException); - virtual sal_Int64 SAL_CALL getPosition() throw (IOException, RuntimeException); - virtual sal_Int64 SAL_CALL getLength() throw (IOException, RuntimeException); + virtual void SAL_CALL seek( sal_Int64 location ) throw (IllegalArgumentException, IOException, RuntimeException, std::exception); + virtual sal_Int64 SAL_CALL getPosition() throw (IOException, RuntimeException, std::exception); + virtual sal_Int64 SAL_CALL getLength() throw (IOException, RuntimeException, std::exception); // XOutputStream - virtual void SAL_CALL writeBytes( const Sequence< sal_Int8 >& aData ) throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException); - virtual void SAL_CALL flush() throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException); - virtual void SAL_CALL closeOutput() throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException); + virtual void SAL_CALL writeBytes( const Sequence< sal_Int8 >& aData ) throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception); + virtual void SAL_CALL flush() throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception); + virtual void SAL_CALL closeOutput() throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception); // XTruncate - virtual void SAL_CALL truncate() throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL truncate() throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception); // XServiceInfo - static versions (used for component registration) static OUString SAL_CALL getImplementationName_static(); @@ -89,18 +89,18 @@ UNOMemoryStream::~UNOMemoryStream() } // XStream -Reference< XInputStream > SAL_CALL UNOMemoryStream::getInputStream( ) throw (RuntimeException) +Reference< XInputStream > SAL_CALL UNOMemoryStream::getInputStream( ) throw (RuntimeException, std::exception) { return this; } -Reference< XOutputStream > SAL_CALL UNOMemoryStream::getOutputStream( ) throw (RuntimeException) +Reference< XOutputStream > SAL_CALL UNOMemoryStream::getOutputStream( ) throw (RuntimeException, std::exception) { return this; } // XInputStream -sal_Int32 SAL_CALL UNOMemoryStream::readBytes( Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException) +sal_Int32 SAL_CALL UNOMemoryStream::readBytes( Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) { if( nBytesToRead < 0 ) throw IOException(); @@ -120,12 +120,12 @@ sal_Int32 SAL_CALL UNOMemoryStream::readBytes( Sequence< sal_Int8 >& aData, sal_ return nBytesToRead; } -sal_Int32 SAL_CALL UNOMemoryStream::readSomeBytes( Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException) +sal_Int32 SAL_CALL UNOMemoryStream::readSomeBytes( Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) { return readBytes( aData, nMaxBytesToRead ); } -void SAL_CALL UNOMemoryStream::skipBytes( sal_Int32 nBytesToSkip ) throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException) +void SAL_CALL UNOMemoryStream::skipBytes( sal_Int32 nBytesToSkip ) throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) { if( nBytesToSkip < 0 ) throw IOException(); @@ -133,18 +133,18 @@ void SAL_CALL UNOMemoryStream::skipBytes( sal_Int32 nBytesToSkip ) throw (NotCon mnCursor += std::min( nBytesToSkip, available() ); } -sal_Int32 SAL_CALL UNOMemoryStream::available() throw (NotConnectedException, IOException, RuntimeException) +sal_Int32 SAL_CALL UNOMemoryStream::available() throw (NotConnectedException, IOException, RuntimeException, std::exception) { return static_cast< sal_Int32 >( maData.size() ) - mnCursor; } -void SAL_CALL UNOMemoryStream::closeInput() throw (NotConnectedException, IOException, RuntimeException) +void SAL_CALL UNOMemoryStream::closeInput() throw (NotConnectedException, IOException, RuntimeException, std::exception) { mnCursor = 0; } // XSeekable -void SAL_CALL UNOMemoryStream::seek( sal_Int64 location ) throw (IllegalArgumentException, IOException, RuntimeException) +void SAL_CALL UNOMemoryStream::seek( sal_Int64 location ) throw (IllegalArgumentException, IOException, RuntimeException, std::exception) { if( (location < 0) || (location > SAL_MAX_INT32) ) throw IllegalArgumentException("this implementation does not support more than 2GB!", Reference< XInterface >(static_cast<OWeakObject*>(this)), 0 ); @@ -159,18 +159,18 @@ void SAL_CALL UNOMemoryStream::seek( sal_Int64 location ) throw (IllegalArgument mnCursor = static_cast< sal_Int32 >( location ); } -sal_Int64 SAL_CALL UNOMemoryStream::getPosition() throw (IOException, RuntimeException) +sal_Int64 SAL_CALL UNOMemoryStream::getPosition() throw (IOException, RuntimeException, std::exception) { return static_cast< sal_Int64 >( mnCursor ); } -sal_Int64 SAL_CALL UNOMemoryStream::getLength() throw (IOException, RuntimeException) +sal_Int64 SAL_CALL UNOMemoryStream::getLength() throw (IOException, RuntimeException, std::exception) { return static_cast< sal_Int64 >( maData.size() ); } // XOutputStream -void SAL_CALL UNOMemoryStream::writeBytes( const Sequence< sal_Int8 >& aData ) throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException) +void SAL_CALL UNOMemoryStream::writeBytes( const Sequence< sal_Int8 >& aData ) throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) { const sal_Int32 nBytesToWrite( aData.getLength() ); if( nBytesToWrite ) @@ -193,17 +193,17 @@ void SAL_CALL UNOMemoryStream::writeBytes( const Sequence< sal_Int8 >& aData ) t } } -void SAL_CALL UNOMemoryStream::flush() throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException) +void SAL_CALL UNOMemoryStream::flush() throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) { } -void SAL_CALL UNOMemoryStream::closeOutput() throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException) +void SAL_CALL UNOMemoryStream::closeOutput() throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) { mnCursor = 0; } //XTruncate -void SAL_CALL UNOMemoryStream::truncate() throw (IOException, RuntimeException) +void SAL_CALL UNOMemoryStream::truncate() throw (IOException, RuntimeException, std::exception) { maData.resize( 0 ); mnCursor = 0; diff --git a/comphelper/source/streaming/oslfile2streamwrap.cxx b/comphelper/source/streaming/oslfile2streamwrap.cxx index f49a9d653f1f..03f169dd9b0c 100644 --- a/comphelper/source/streaming/oslfile2streamwrap.cxx +++ b/comphelper/source/streaming/oslfile2streamwrap.cxx @@ -38,7 +38,7 @@ OSLInputStreamWrapper::~OSLInputStreamWrapper() sal_Int32 SAL_CALL OSLInputStreamWrapper::readBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) - throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException ) + throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException, std::exception ) { if (!m_pFile) throw stario::NotConnectedException(OUString(), static_cast<staruno::XWeak*>(this)); @@ -63,7 +63,7 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::readBytes(staruno::Sequence< sal_Int8 } -sal_Int32 SAL_CALL OSLInputStreamWrapper::readSomeBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException ) +sal_Int32 SAL_CALL OSLInputStreamWrapper::readSomeBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException, std::exception ) { if (!m_pFile) throw stario::NotConnectedException(OUString(), static_cast<staruno::XWeak*>(this)); @@ -75,7 +75,7 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::readSomeBytes(staruno::Sequence< sal_I } -void SAL_CALL OSLInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip) throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException ) +void SAL_CALL OSLInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip) throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); if (!m_pFile) @@ -93,7 +93,7 @@ void SAL_CALL OSLInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip) throw( st } -sal_Int32 SAL_CALL OSLInputStreamWrapper::available() throw( stario::NotConnectedException, staruno::RuntimeException ) +sal_Int32 SAL_CALL OSLInputStreamWrapper::available() throw( stario::NotConnectedException, staruno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); if (!m_pFile) @@ -123,7 +123,7 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::available() throw( stario::NotConnecte } -void SAL_CALL OSLInputStreamWrapper::closeInput() throw( stario::NotConnectedException, staruno::RuntimeException ) +void SAL_CALL OSLInputStreamWrapper::closeInput() throw( stario::NotConnectedException, staruno::RuntimeException, std::exception ) { if (!m_pFile) throw stario::NotConnectedException(OUString(), static_cast<staruno::XWeak*>(this)); @@ -143,7 +143,7 @@ OSLOutputStreamWrapper::OSLOutputStreamWrapper(osl::File & _rFile): OSLOutputStreamWrapper::~OSLOutputStreamWrapper() {} -void SAL_CALL OSLOutputStreamWrapper::writeBytes(const staruno::Sequence< sal_Int8 >& aData) throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException ) +void SAL_CALL OSLOutputStreamWrapper::writeBytes(const staruno::Sequence< sal_Int8 >& aData) throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException, std::exception ) { sal_uInt64 nWritten; FileBase::RC eError = rFile.write(aData.getConstArray(),aData.getLength(), nWritten); @@ -155,12 +155,12 @@ void SAL_CALL OSLOutputStreamWrapper::writeBytes(const staruno::Sequence< sal_In } -void SAL_CALL OSLOutputStreamWrapper::flush() throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException ) +void SAL_CALL OSLOutputStreamWrapper::flush() throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException, std::exception ) { } -void SAL_CALL OSLOutputStreamWrapper::closeOutput() throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException ) +void SAL_CALL OSLOutputStreamWrapper::closeOutput() throw( stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException, std::exception ) { rFile.close(); } diff --git a/comphelper/source/streaming/seekableinput.cxx b/comphelper/source/streaming/seekableinput.cxx index 3f0f49c3f284..da3b3690516f 100644 --- a/comphelper/source/streaming/seekableinput.cxx +++ b/comphelper/source/streaming/seekableinput.cxx @@ -119,7 +119,7 @@ sal_Int32 SAL_CALL OSeekableInputWrapper::readBytes( uno::Sequence< sal_Int8 >& throw ( io::NotConnectedException, io::BufferSizeExceededException, io::IOException, - uno::RuntimeException ) + uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -136,7 +136,7 @@ sal_Int32 SAL_CALL OSeekableInputWrapper::readSomeBytes( uno::Sequence< sal_Int8 throw ( io::NotConnectedException, io::BufferSizeExceededException, io::IOException, - uno::RuntimeException ) + uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -153,7 +153,7 @@ void SAL_CALL OSeekableInputWrapper::skipBytes( sal_Int32 nBytesToSkip ) throw ( io::NotConnectedException, io::BufferSizeExceededException, io::IOException, - uno::RuntimeException ) + uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -169,7 +169,7 @@ void SAL_CALL OSeekableInputWrapper::skipBytes( sal_Int32 nBytesToSkip ) sal_Int32 SAL_CALL OSeekableInputWrapper::available() throw ( io::NotConnectedException, io::IOException, - uno::RuntimeException ) + uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -185,7 +185,7 @@ sal_Int32 SAL_CALL OSeekableInputWrapper::available() void SAL_CALL OSeekableInputWrapper::closeInput() throw ( io::NotConnectedException, io::IOException, - uno::RuntimeException ) + uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -210,7 +210,7 @@ void SAL_CALL OSeekableInputWrapper::closeInput() void SAL_CALL OSeekableInputWrapper::seek( sal_Int64 location ) throw ( lang::IllegalArgumentException, io::IOException, - uno::RuntimeException ) + uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -225,7 +225,7 @@ void SAL_CALL OSeekableInputWrapper::seek( sal_Int64 location ) sal_Int64 SAL_CALL OSeekableInputWrapper::getPosition() throw ( io::IOException, - uno::RuntimeException ) + uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -240,7 +240,7 @@ sal_Int64 SAL_CALL OSeekableInputWrapper::getPosition() sal_Int64 SAL_CALL OSeekableInputWrapper::getLength() throw ( io::IOException, - uno::RuntimeException ) + uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); diff --git a/comphelper/source/streaming/seqinputstreamserv.cxx b/comphelper/source/streaming/seqinputstreamserv.cxx index 80c07a51b809..fd39398445b2 100644 --- a/comphelper/source/streaming/seqinputstreamserv.cxx +++ b/comphelper/source/streaming/seqinputstreamserv.cxx @@ -49,9 +49,9 @@ public: explicit SequenceInputStreamService(); // ::com::sun::star::lang::XServiceInfo: - virtual OUString SAL_CALL getImplementationName() throw ( uno::RuntimeException ); - virtual ::sal_Bool SAL_CALL supportsService( const OUString & ServiceName ) throw ( uno::RuntimeException ); - virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw ( uno::RuntimeException ); + virtual OUString SAL_CALL getImplementationName() throw ( uno::RuntimeException, std::exception ); + virtual ::sal_Bool SAL_CALL supportsService( const OUString & ServiceName ) throw ( uno::RuntimeException, std::exception ); + virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw ( uno::RuntimeException, std::exception ); // XServiceInfo - static versions (used for component registration) static OUString SAL_CALL getImplementationName_static(); @@ -59,19 +59,19 @@ public: static uno::Reference< uno::XInterface > SAL_CALL Create( const uno::Reference< uno::XComponentContext >& ); // ::com::sun::star::io::XInputStream: - virtual ::sal_Int32 SAL_CALL readBytes( uno::Sequence< ::sal_Int8 > & aData, ::sal_Int32 nBytesToRead ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException ); - virtual ::sal_Int32 SAL_CALL readSomeBytes( uno::Sequence< ::sal_Int8 > & aData, ::sal_Int32 nMaxBytesToRead ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException ); - virtual void SAL_CALL skipBytes( ::sal_Int32 nBytesToSkip ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException ); - virtual ::sal_Int32 SAL_CALL available() throw ( uno::RuntimeException, io::NotConnectedException, io::IOException ); - virtual void SAL_CALL closeInput() throw ( uno::RuntimeException, io::NotConnectedException, io::IOException ); + virtual ::sal_Int32 SAL_CALL readBytes( uno::Sequence< ::sal_Int8 > & aData, ::sal_Int32 nBytesToRead ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException, std::exception ); + virtual ::sal_Int32 SAL_CALL readSomeBytes( uno::Sequence< ::sal_Int8 > & aData, ::sal_Int32 nMaxBytesToRead ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException, std::exception ); + virtual void SAL_CALL skipBytes( ::sal_Int32 nBytesToSkip ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException, std::exception ); + virtual ::sal_Int32 SAL_CALL available() throw ( uno::RuntimeException, io::NotConnectedException, io::IOException, std::exception ); + virtual void SAL_CALL closeInput() throw ( uno::RuntimeException, io::NotConnectedException, io::IOException, std::exception ); // ::com::sun::star::io::XSeekable: - virtual void SAL_CALL seek( ::sal_Int64 location ) throw ( uno::RuntimeException, lang::IllegalArgumentException, io::IOException ); - virtual ::sal_Int64 SAL_CALL getPosition() throw ( uno::RuntimeException, io::IOException ); - virtual ::sal_Int64 SAL_CALL getLength() throw ( uno::RuntimeException, io::IOException ); + virtual void SAL_CALL seek( ::sal_Int64 location ) throw ( uno::RuntimeException, lang::IllegalArgumentException, io::IOException, std::exception ); + virtual ::sal_Int64 SAL_CALL getPosition() throw ( uno::RuntimeException, io::IOException, std::exception ); + virtual ::sal_Int64 SAL_CALL getLength() throw ( uno::RuntimeException, io::IOException, std::exception ); // ::com::sun::star::lang::XInitialization: - virtual void SAL_CALL initialize( const uno::Sequence< ::com::sun::star::uno::Any > & aArguments ) throw ( uno::RuntimeException, uno::Exception ); + virtual void SAL_CALL initialize( const uno::Sequence< ::com::sun::star::uno::Any > & aArguments ) throw ( uno::RuntimeException, uno::Exception, std::exception ); private: SequenceInputStreamService( SequenceInputStreamService & ); // not defined @@ -91,7 +91,7 @@ SequenceInputStreamService::SequenceInputStreamService() {} // com.sun.star.uno.XServiceInfo: -OUString SAL_CALL SequenceInputStreamService::getImplementationName() throw ( uno::RuntimeException ) +OUString SAL_CALL SequenceInputStreamService::getImplementationName() throw ( uno::RuntimeException, std::exception ) { return getImplementationName_static(); } @@ -101,12 +101,12 @@ OUString SAL_CALL SequenceInputStreamService::getImplementationName_static() return OUString( "com.sun.star.comp.SequenceInputStreamService" ); } -::sal_Bool SAL_CALL SequenceInputStreamService::supportsService( OUString const & serviceName ) throw ( uno::RuntimeException ) +::sal_Bool SAL_CALL SequenceInputStreamService::supportsService( OUString const & serviceName ) throw ( uno::RuntimeException, std::exception ) { return cppu::supportsService(this, serviceName); } -uno::Sequence< OUString > SAL_CALL SequenceInputStreamService::getSupportedServiceNames() throw ( uno::RuntimeException ) +uno::Sequence< OUString > SAL_CALL SequenceInputStreamService::getSupportedServiceNames() throw ( uno::RuntimeException, std::exception ) { return getSupportedServiceNames_static(); } @@ -125,7 +125,7 @@ uno::Reference< uno::XInterface > SAL_CALL SequenceInputStreamService::Create( } // ::com::sun::star::io::XInputStream: -::sal_Int32 SAL_CALL SequenceInputStreamService::readBytes( uno::Sequence< ::sal_Int8 > & aData, ::sal_Int32 nBytesToRead ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException ) +::sal_Int32 SAL_CALL SequenceInputStreamService::readBytes( uno::Sequence< ::sal_Int8 > & aData, ::sal_Int32 nBytesToRead ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); if ( !m_xInputStream.is() ) @@ -134,7 +134,7 @@ uno::Reference< uno::XInterface > SAL_CALL SequenceInputStreamService::Create( return m_xInputStream->readBytes( aData, nBytesToRead ); } -::sal_Int32 SAL_CALL SequenceInputStreamService::readSomeBytes( uno::Sequence< ::sal_Int8 > & aData, ::sal_Int32 nMaxBytesToRead ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException ) +::sal_Int32 SAL_CALL SequenceInputStreamService::readSomeBytes( uno::Sequence< ::sal_Int8 > & aData, ::sal_Int32 nMaxBytesToRead ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); if ( !m_xInputStream.is() ) @@ -143,7 +143,7 @@ uno::Reference< uno::XInterface > SAL_CALL SequenceInputStreamService::Create( return m_xInputStream->readSomeBytes( aData, nMaxBytesToRead ); } -void SAL_CALL SequenceInputStreamService::skipBytes( ::sal_Int32 nBytesToSkip ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException ) +void SAL_CALL SequenceInputStreamService::skipBytes( ::sal_Int32 nBytesToSkip ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); if ( !m_xInputStream.is() ) @@ -152,7 +152,7 @@ void SAL_CALL SequenceInputStreamService::skipBytes( ::sal_Int32 nBytesToSkip ) return m_xInputStream->skipBytes( nBytesToSkip ); } -::sal_Int32 SAL_CALL SequenceInputStreamService::available() throw ( uno::RuntimeException, io::NotConnectedException, io::IOException ) +::sal_Int32 SAL_CALL SequenceInputStreamService::available() throw ( uno::RuntimeException, io::NotConnectedException, io::IOException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); if ( !m_xInputStream.is() ) @@ -161,7 +161,7 @@ void SAL_CALL SequenceInputStreamService::skipBytes( ::sal_Int32 nBytesToSkip ) return m_xInputStream->available(); } -void SAL_CALL SequenceInputStreamService::closeInput() throw ( uno::RuntimeException, io::NotConnectedException, io::IOException ) +void SAL_CALL SequenceInputStreamService::closeInput() throw ( uno::RuntimeException, io::NotConnectedException, io::IOException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); if ( !m_xInputStream.is() ) @@ -173,7 +173,7 @@ void SAL_CALL SequenceInputStreamService::closeInput() throw ( uno::RuntimeExcep } // ::com::sun::star::io::XSeekable: -void SAL_CALL SequenceInputStreamService::seek( ::sal_Int64 location ) throw ( uno::RuntimeException, lang::IllegalArgumentException, io::IOException ) +void SAL_CALL SequenceInputStreamService::seek( ::sal_Int64 location ) throw ( uno::RuntimeException, lang::IllegalArgumentException, io::IOException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); if ( !m_xSeekable.is() ) @@ -182,7 +182,7 @@ void SAL_CALL SequenceInputStreamService::seek( ::sal_Int64 location ) throw ( u m_xSeekable->seek( location ); } -::sal_Int64 SAL_CALL SequenceInputStreamService::getPosition() throw ( uno::RuntimeException, io::IOException ) +::sal_Int64 SAL_CALL SequenceInputStreamService::getPosition() throw ( uno::RuntimeException, io::IOException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); if ( !m_xSeekable.is() ) @@ -191,7 +191,7 @@ void SAL_CALL SequenceInputStreamService::seek( ::sal_Int64 location ) throw ( u return m_xSeekable->getPosition(); } -::sal_Int64 SAL_CALL SequenceInputStreamService::getLength() throw ( uno::RuntimeException, io::IOException ) +::sal_Int64 SAL_CALL SequenceInputStreamService::getLength() throw ( uno::RuntimeException, io::IOException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); if ( !m_xSeekable.is() ) @@ -201,7 +201,7 @@ void SAL_CALL SequenceInputStreamService::seek( ::sal_Int64 location ) throw ( u } // ::com::sun::star::lang::XInitialization: -void SAL_CALL SequenceInputStreamService::initialize( const uno::Sequence< ::com::sun::star::uno::Any > & aArguments ) throw ( uno::RuntimeException, uno::Exception ) +void SAL_CALL SequenceInputStreamService::initialize( const uno::Sequence< ::com::sun::star::uno::Any > & aArguments ) throw ( uno::RuntimeException, uno::Exception, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); if ( m_bInitialized ) diff --git a/comphelper/source/streaming/seqoutputstreamserv.cxx b/comphelper/source/streaming/seqoutputstreamserv.cxx index c5026f84d99b..8a74a6ee18de 100644 --- a/comphelper/source/streaming/seqoutputstreamserv.cxx +++ b/comphelper/source/streaming/seqoutputstreamserv.cxx @@ -43,9 +43,9 @@ public: explicit SequenceOutputStreamService(); // ::com::sun::star::lang::XServiceInfo: - virtual OUString SAL_CALL getImplementationName() throw ( uno::RuntimeException ); - virtual ::sal_Bool SAL_CALL supportsService( const OUString & ServiceName ) throw ( uno::RuntimeException ); - virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw ( uno::RuntimeException ); + virtual OUString SAL_CALL getImplementationName() throw ( uno::RuntimeException, std::exception ); + virtual ::sal_Bool SAL_CALL supportsService( const OUString & ServiceName ) throw ( uno::RuntimeException, std::exception ); + virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw ( uno::RuntimeException, std::exception ); // XServiceInfo - static versions (used for component registration) static OUString SAL_CALL getImplementationName_static(); @@ -53,12 +53,12 @@ public: static uno::Reference< uno::XInterface > SAL_CALL Create( const uno::Reference< uno::XComponentContext >& ); // ::com::sun::star::io::XOutputStream: - virtual void SAL_CALL writeBytes( const uno::Sequence< ::sal_Int8 > & aData ) throw ( io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException ); - virtual void SAL_CALL flush() throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException ); - virtual void SAL_CALL closeOutput() throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException ); + virtual void SAL_CALL writeBytes( const uno::Sequence< ::sal_Int8 > & aData ) throw ( io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException, std::exception ); + virtual void SAL_CALL flush() throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException, std::exception ); + virtual void SAL_CALL closeOutput() throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException, std::exception ); // ::com::sun::star::io::XSequenceOutputStream: - virtual uno::Sequence< ::sal_Int8 > SAL_CALL getWrittenBytes( ) throw ( io::NotConnectedException, io::IOException, uno::RuntimeException); + virtual uno::Sequence< ::sal_Int8 > SAL_CALL getWrittenBytes( ) throw ( io::NotConnectedException, io::IOException, uno::RuntimeException, std::exception); private: SequenceOutputStreamService( SequenceOutputStreamService & ); //not defined @@ -77,7 +77,7 @@ SequenceOutputStreamService::SequenceOutputStreamService() } // com.sun.star.uno.XServiceInfo: -OUString SAL_CALL SequenceOutputStreamService::getImplementationName() throw ( uno::RuntimeException ) +OUString SAL_CALL SequenceOutputStreamService::getImplementationName() throw ( uno::RuntimeException, std::exception ) { return getImplementationName_static(); } @@ -87,12 +87,12 @@ OUString SAL_CALL SequenceOutputStreamService::getImplementationName_static() return OUString("com.sun.star.comp.SequenceOutputStreamService"); } -::sal_Bool SAL_CALL SequenceOutputStreamService::supportsService( OUString const & serviceName ) throw ( uno::RuntimeException ) +::sal_Bool SAL_CALL SequenceOutputStreamService::supportsService( OUString const & serviceName ) throw ( uno::RuntimeException, std::exception ) { return cppu::supportsService(this, serviceName); } -uno::Sequence< OUString > SAL_CALL SequenceOutputStreamService::getSupportedServiceNames() throw ( uno::RuntimeException ) +uno::Sequence< OUString > SAL_CALL SequenceOutputStreamService::getSupportedServiceNames() throw ( uno::RuntimeException, std::exception ) { return getSupportedServiceNames_static(); } @@ -111,7 +111,7 @@ uno::Reference< uno::XInterface > SAL_CALL SequenceOutputStreamService::Create( } // ::com::sun::star::io::XOutputStream: -void SAL_CALL SequenceOutputStreamService::writeBytes( const uno::Sequence< ::sal_Int8 > & aData ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException ) +void SAL_CALL SequenceOutputStreamService::writeBytes( const uno::Sequence< ::sal_Int8 > & aData ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); if ( !m_xOutputStream.is() ) @@ -121,7 +121,7 @@ void SAL_CALL SequenceOutputStreamService::writeBytes( const uno::Sequence< ::sa m_aSequence = aData; } -void SAL_CALL SequenceOutputStreamService::flush() throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException ) +void SAL_CALL SequenceOutputStreamService::flush() throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); if ( !m_xOutputStream.is() ) @@ -130,7 +130,7 @@ void SAL_CALL SequenceOutputStreamService::flush() throw ( uno::RuntimeException m_xOutputStream->flush(); }; -void SAL_CALL SequenceOutputStreamService::closeOutput() throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException ) +void SAL_CALL SequenceOutputStreamService::closeOutput() throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutex ); if ( !m_xOutputStream.is() ) @@ -141,7 +141,7 @@ void SAL_CALL SequenceOutputStreamService::closeOutput() throw ( uno::RuntimeExc } // ::com::sun::star::io::XSequenceOutputStream: -uno::Sequence< ::sal_Int8 > SAL_CALL SequenceOutputStreamService::getWrittenBytes() throw ( io::NotConnectedException, io::IOException, uno::RuntimeException) +uno::Sequence< ::sal_Int8 > SAL_CALL SequenceOutputStreamService::getWrittenBytes() throw ( io::NotConnectedException, io::IOException, uno::RuntimeException, std::exception) { ::osl::MutexGuard aGuard( m_aMutex ); if ( !m_xOutputStream.is() ) diff --git a/comphelper/source/streaming/seqstream.cxx b/comphelper/source/streaming/seqstream.cxx index fefc42b716fe..2e1552a26af5 100644 --- a/comphelper/source/streaming/seqstream.cxx +++ b/comphelper/source/streaming/seqstream.cxx @@ -54,7 +54,7 @@ inline sal_Int32 SequenceInputStream::avail() sal_Int32 SAL_CALL SequenceInputStream::readBytes( Sequence<sal_Int8>& aData, sal_Int32 nBytesToRead ) throw(NotConnectedException, BufferSizeExceededException, - IOException, RuntimeException) + IOException, RuntimeException, std::exception) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -76,7 +76,7 @@ sal_Int32 SAL_CALL SequenceInputStream::readBytes( Sequence<sal_Int8>& aData, sa sal_Int32 SAL_CALL SequenceInputStream::readSomeBytes( Sequence<sal_Int8>& aData, sal_Int32 nMaxBytesToRead ) throw(NotConnectedException, BufferSizeExceededException, - IOException, RuntimeException) + IOException, RuntimeException, std::exception) { // all data is available at once return readBytes(aData, nMaxBytesToRead); @@ -85,7 +85,7 @@ sal_Int32 SAL_CALL SequenceInputStream::readSomeBytes( Sequence<sal_Int8>& aData void SAL_CALL SequenceInputStream::skipBytes( sal_Int32 nBytesToSkip ) throw(NotConnectedException, BufferSizeExceededException, - IOException, RuntimeException) + IOException, RuntimeException, std::exception) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -102,7 +102,7 @@ void SAL_CALL SequenceInputStream::skipBytes( sal_Int32 nBytesToSkip ) sal_Int32 SAL_CALL SequenceInputStream::available( ) - throw(NotConnectedException, IOException, RuntimeException) + throw(NotConnectedException, IOException, RuntimeException, std::exception) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -111,7 +111,7 @@ sal_Int32 SAL_CALL SequenceInputStream::available( ) void SAL_CALL SequenceInputStream::closeInput( ) - throw(NotConnectedException, IOException, RuntimeException) + throw(NotConnectedException, IOException, RuntimeException, std::exception) { if (m_nPos == -1) throw NotConnectedException(OUString(), *this); @@ -119,19 +119,19 @@ void SAL_CALL SequenceInputStream::closeInput( ) m_nPos = -1; } -void SAL_CALL SequenceInputStream::seek( sal_Int64 location ) throw (IllegalArgumentException, IOException, RuntimeException) +void SAL_CALL SequenceInputStream::seek( sal_Int64 location ) throw (IllegalArgumentException, IOException, RuntimeException, std::exception) { if ( location > m_aData.getLength() || location < 0 || location > SAL_MAX_INT32 ) throw IllegalArgumentException(); m_nPos = (sal_Int32) location; } -sal_Int64 SAL_CALL SequenceInputStream::getPosition() throw (IOException, RuntimeException) +sal_Int64 SAL_CALL SequenceInputStream::getPosition() throw (IOException, RuntimeException, std::exception) { return m_nPos; } -sal_Int64 SAL_CALL SequenceInputStream::getLength( ) throw (IOException, RuntimeException) +sal_Int64 SAL_CALL SequenceInputStream::getLength( ) throw (IOException, RuntimeException, std::exception) { return m_aData.getLength(); } @@ -157,7 +157,7 @@ OSequenceOutputStream::OSequenceOutputStream(Sequence< sal_Int8 >& _rSeq, double } -void SAL_CALL OSequenceOutputStream::writeBytes( const Sequence< sal_Int8 >& _rData ) throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException) +void SAL_CALL OSequenceOutputStream::writeBytes( const Sequence< sal_Int8 >& _rData ) throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) { MutexGuard aGuard(m_aMutex); if (!m_bConnected) @@ -208,7 +208,7 @@ void SAL_CALL OSequenceOutputStream::writeBytes( const Sequence< sal_Int8 >& _rD } -void SAL_CALL OSequenceOutputStream::flush( ) throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException) +void SAL_CALL OSequenceOutputStream::flush( ) throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) { MutexGuard aGuard(m_aMutex); if (!m_bConnected) @@ -219,7 +219,7 @@ void SAL_CALL OSequenceOutputStream::flush( ) throw(NotConnectedException, Buff } -void SAL_CALL OSequenceOutputStream::closeOutput( ) throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException) +void SAL_CALL OSequenceOutputStream::closeOutput( ) throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) { MutexGuard aGuard(m_aMutex); if (!m_bConnected) |