diff options
Diffstat (limited to 'io')
-rw-r--r-- | io/qa/textinputstream.cxx | 26 | ||||
-rw-r--r-- | io/source/TextInputStream/TextInputStream.cxx | 62 | ||||
-rw-r--r-- | io/source/TextOutputStream/TextOutputStream.cxx | 43 | ||||
-rw-r--r-- | io/source/acceptor/acc_pipe.cxx | 28 | ||||
-rw-r--r-- | io/source/acceptor/acc_socket.cxx | 38 | ||||
-rw-r--r-- | io/source/acceptor/acceptor.cxx | 28 | ||||
-rw-r--r-- | io/source/connector/connector.cxx | 16 | ||||
-rw-r--r-- | io/source/connector/connector.hxx | 44 | ||||
-rw-r--r-- | io/source/connector/ctr_pipe.cxx | 9 | ||||
-rw-r--r-- | io/source/connector/ctr_socket.cxx | 13 | ||||
-rw-r--r-- | io/source/services.hxx | 16 | ||||
-rw-r--r-- | io/source/stm/odata.cxx | 350 | ||||
-rw-r--r-- | io/source/stm/omark.cxx | 203 | ||||
-rw-r--r-- | io/source/stm/opipe.cxx | 87 | ||||
-rw-r--r-- | io/source/stm/opump.cxx | 61 | ||||
-rw-r--r-- | io/source/stm/streamhelper.cxx | 11 | ||||
-rw-r--r-- | io/source/stm/streamhelper.hxx | 19 |
17 files changed, 330 insertions, 724 deletions
diff --git a/io/qa/textinputstream.cxx b/io/qa/textinputstream.cxx index d887f379c66b..e8b390ef85e1 100644 --- a/io/qa/textinputstream.cxx +++ b/io/qa/textinputstream.cxx @@ -42,19 +42,11 @@ private: virtual ~Input() override {} sal_Int32 SAL_CALL readBytes(css::uno::Sequence<sal_Int8> &, sal_Int32) - throw ( - css::io::NotConnectedException, - css::io::BufferSizeExceededException, css::io::IOException, - css::uno::RuntimeException, std::exception) override { CPPUNIT_FAIL("readLine is supposed to call readSomeBytes instead"); return 0;} 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) override + css::uno::Sequence<sal_Int8 > & aData, sal_Int32 nMaxBytesToRead) override { assert(nMaxBytesToRead >= 0); osl::MutexGuard g(mutex_); @@ -70,11 +62,7 @@ private: return n; } - void SAL_CALL skipBytes(sal_Int32 nBytesToSkip) - throw ( - css::io::NotConnectedException, - css::io::BufferSizeExceededException, css::io::IOException, - css::uno::RuntimeException, std::exception) override + void SAL_CALL skipBytes(sal_Int32 nBytesToSkip) override { assert(nBytesToSkip >= 0); osl::MutexGuard g(mutex_); @@ -84,10 +72,7 @@ private: assert(index_ >= 0 && index_ <= SIZE); } - sal_Int32 SAL_CALL available() - throw ( - css::io::NotConnectedException, css::io::IOException, - css::uno::RuntimeException, std::exception) override + sal_Int32 SAL_CALL available() override { osl::MutexGuard g(mutex_); checkClosed(); @@ -95,10 +80,7 @@ private: return SIZE - index_; } - void SAL_CALL closeInput() - throw ( - css::io::NotConnectedException, css::io::IOException, - css::uno::RuntimeException, std::exception) override + void SAL_CALL closeInput() override { osl::MutexGuard g(mutex_); checkClosed(); diff --git a/io/source/TextInputStream/TextInputStream.cxx b/io/source/TextInputStream/TextInputStream.cxx index 9ae0dcd65c1d..f948480b56ec 100644 --- a/io/source/TextInputStream/TextInputStream.cxx +++ b/io/source/TextInputStream/TextInputStream.cxx @@ -74,47 +74,36 @@ class OTextInputStream : public WeakImplHelper< XTextInputStream2, XServiceInfo /// @throws IOException /// @throws RuntimeException OUString implReadString( const Sequence< sal_Unicode >& Delimiters, - bool bRemoveDelimiter, bool bFindLineEnd ) - throw(IOException, RuntimeException); + bool bRemoveDelimiter, bool bFindLineEnd ); /// @throws IOException /// @throws RuntimeException - sal_Int32 implReadNext() throw(IOException, RuntimeException); + sal_Int32 implReadNext(); public: OTextInputStream(); virtual ~OTextInputStream() override; // Methods XTextInputStream - virtual OUString SAL_CALL readLine( ) - throw(IOException, RuntimeException, std::exception) override; - virtual OUString SAL_CALL readString( const Sequence< sal_Unicode >& Delimiters, sal_Bool bRemoveDelimiter ) - throw(IOException, RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL isEOF( ) - throw(IOException, RuntimeException, std::exception) override; - virtual void SAL_CALL setEncoding( const OUString& Encoding ) throw(RuntimeException, std::exception) override; + virtual OUString SAL_CALL readLine( ) override; + virtual OUString SAL_CALL readString( const Sequence< sal_Unicode >& Delimiters, sal_Bool bRemoveDelimiter ) override; + virtual sal_Bool SAL_CALL isEOF( ) override; + virtual void SAL_CALL setEncoding( const OUString& Encoding ) override; // Methods XInputStream - virtual sal_Int32 SAL_CALL readBytes( Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) - throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL readSomeBytes( Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) - throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) override; - virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) - throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL available( ) - throw(NotConnectedException, IOException, RuntimeException, std::exception) override; - virtual void SAL_CALL closeInput( ) - throw(NotConnectedException, IOException, RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL readBytes( Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) override; + virtual sal_Int32 SAL_CALL readSomeBytes( Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) override; + virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) override; + virtual sal_Int32 SAL_CALL available( ) override; + virtual void SAL_CALL closeInput( ) override; // Methods XActiveDataSink - virtual void SAL_CALL setInputStream( const Reference< XInputStream >& aStream ) - throw(RuntimeException, std::exception) override; - virtual Reference< XInputStream > SAL_CALL getInputStream() - throw(RuntimeException, std::exception) override; + virtual void SAL_CALL setInputStream( const Reference< XInputStream >& aStream ) override; + virtual Reference< XInputStream > SAL_CALL getInputStream() override; // Methods XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw(std::exception) override; - virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(std::exception) override; - virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(std::exception) override; + virtual OUString SAL_CALL getImplementationName() override; + virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() override; + virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; }; OTextInputStream::OTextInputStream() @@ -154,20 +143,17 @@ void OTextInputStream::implResizeBuffer() // XTextInputStream OUString OTextInputStream::readLine( ) - throw(IOException, RuntimeException, std::exception) { static Sequence< sal_Unicode > aDummySeq; return implReadString( aDummySeq, true, true ); } OUString OTextInputStream::readString( const Sequence< sal_Unicode >& Delimiters, sal_Bool bRemoveDelimiter ) - throw(IOException, RuntimeException, std::exception) { return implReadString( Delimiters, bRemoveDelimiter, false ); } sal_Bool OTextInputStream::isEOF() - throw(IOException, RuntimeException, std::exception) { bool bRet = false; if( mnCharsInBuffer == 0 && mbReachedEOF ) @@ -178,7 +164,6 @@ sal_Bool OTextInputStream::isEOF() OUString OTextInputStream::implReadString( const Sequence< sal_Unicode >& Delimiters, bool bRemoveDelimiter, bool bFindLineEnd ) - throw(IOException, RuntimeException) { OUString aRetStr; if( !mbEncodingInitialized ) @@ -283,7 +268,6 @@ OUString OTextInputStream::implReadString( const Sequence< sal_Unicode >& Delimi sal_Int32 OTextInputStream::implReadNext() - throw(IOException, RuntimeException) { sal_Int32 nFreeBufferSize = mnBufferSize - mnCharsInBuffer; if( nFreeBufferSize < READ_BYTE_COUNT ) @@ -370,7 +354,6 @@ sal_Int32 OTextInputStream::implReadNext() } void OTextInputStream::setEncoding( const OUString& Encoding ) - throw(RuntimeException, std::exception) { OString aOEncodingStr = OUStringToOString( Encoding, RTL_TEXTENCODING_ASCII_US ); rtl_TextEncoding encoding = rtl_getTextEncodingFromMimeCharset( aOEncodingStr.getStr() ); @@ -387,31 +370,26 @@ void OTextInputStream::setEncoding( const OUString& Encoding ) // XInputStream sal_Int32 OTextInputStream::readBytes( Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) - throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) { return mxStream->readBytes( aData, nBytesToRead ); } sal_Int32 OTextInputStream::readSomeBytes( Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) - throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) { return mxStream->readSomeBytes( aData, nMaxBytesToRead ); } void OTextInputStream::skipBytes( sal_Int32 nBytesToSkip ) - throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) { mxStream->skipBytes( nBytesToSkip ); } sal_Int32 OTextInputStream::available( ) - throw(NotConnectedException, IOException, RuntimeException, std::exception) { return mxStream->available(); } void OTextInputStream::closeInput( ) - throw(NotConnectedException, IOException, RuntimeException, std::exception) { mxStream->closeInput(); } @@ -420,13 +398,11 @@ void OTextInputStream::closeInput( ) // XActiveDataSink void OTextInputStream::setInputStream( const Reference< XInputStream >& aStream ) - throw(RuntimeException, std::exception) { mxStream = aStream; } Reference< XInputStream > OTextInputStream::getInputStream() - throw(RuntimeException, std::exception) { return mxStream; } @@ -449,17 +425,17 @@ Sequence< OUString > TextInputStream_getSupportedServiceNames() return seqNames; } -OUString OTextInputStream::getImplementationName() throw(std::exception) +OUString OTextInputStream::getImplementationName() { return TextInputStream_getImplementationName(); } -sal_Bool OTextInputStream::supportsService(const OUString& ServiceName) throw(std::exception) +sal_Bool OTextInputStream::supportsService(const OUString& ServiceName) { return cppu::supportsService(this, ServiceName); } -Sequence< OUString > OTextInputStream::getSupportedServiceNames() throw(std::exception) +Sequence< OUString > OTextInputStream::getSupportedServiceNames() { return TextInputStream_getSupportedServiceNames(); } diff --git a/io/source/TextOutputStream/TextOutputStream.cxx b/io/source/TextOutputStream/TextOutputStream.cxx index bd2004e26a3d..323eb88e820b 100644 --- a/io/source/TextOutputStream/TextOutputStream.cxx +++ b/io/source/TextOutputStream/TextOutputStream.cxx @@ -62,36 +62,29 @@ class OTextOutputStream : public WeakImplHelper< XTextOutputStream2, XServiceInf Sequence<sal_Int8> implConvert( const OUString& rSource ); /// @throws IOException - void checkOutputStream() throw(IOException); + void checkOutputStream(); public: OTextOutputStream(); virtual ~OTextOutputStream() override; // Methods XTextOutputStream - virtual void SAL_CALL writeString( const OUString& aString ) - throw(IOException, RuntimeException, std::exception) override; - virtual void SAL_CALL setEncoding( const OUString& Encoding ) - throw(RuntimeException, std::exception) override; + virtual void SAL_CALL writeString( const OUString& aString ) override; + virtual void SAL_CALL setEncoding( const OUString& Encoding ) override; // Methods XOutputStream - virtual void SAL_CALL writeBytes( const Sequence< sal_Int8 >& aData ) - throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) override; - virtual void SAL_CALL flush( ) - throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) override; - virtual void SAL_CALL closeOutput( ) - throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) override; + virtual void SAL_CALL writeBytes( const Sequence< sal_Int8 >& aData ) override; + virtual void SAL_CALL flush( ) override; + virtual void SAL_CALL closeOutput( ) override; // Methods XActiveDataSource - virtual void SAL_CALL setOutputStream( const Reference< XOutputStream >& aStream ) - throw(RuntimeException, std::exception) override; - virtual Reference< XOutputStream > SAL_CALL getOutputStream( ) - throw(RuntimeException, std::exception) override; + virtual void SAL_CALL setOutputStream( const Reference< XOutputStream >& aStream ) override; + virtual Reference< XOutputStream > SAL_CALL getOutputStream( ) override; // Methods XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw(std::exception) override; - virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(std::exception) override; - virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(std::exception) override; + virtual OUString SAL_CALL getImplementationName() override; + virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() override; + virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; }; OTextOutputStream::OTextOutputStream() @@ -162,7 +155,6 @@ Sequence<sal_Int8> OTextOutputStream::implConvert( const OUString& rSource ) // XTextOutputStream void OTextOutputStream::writeString( const OUString& aString ) - throw(IOException, RuntimeException, std::exception) { checkOutputStream(); if( !mbEncodingInitialized ) @@ -178,7 +170,6 @@ void OTextOutputStream::writeString( const OUString& aString ) } void OTextOutputStream::setEncoding( const OUString& Encoding ) - throw(RuntimeException, std::exception) { OString aOEncodingStr = OUStringToOString( Encoding, RTL_TEXTENCODING_ASCII_US ); rtl_TextEncoding encoding = rtl_getTextEncodingFromMimeCharset( aOEncodingStr.getStr() ); @@ -194,21 +185,18 @@ void OTextOutputStream::setEncoding( const OUString& Encoding ) // XOutputStream void OTextOutputStream::writeBytes( const Sequence< sal_Int8 >& aData ) - throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) { checkOutputStream(); mxStream->writeBytes( aData ); } void OTextOutputStream::flush( ) - throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) { checkOutputStream(); mxStream->flush(); } void OTextOutputStream::closeOutput( ) - throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) { checkOutputStream(); mxStream->closeOutput(); @@ -216,7 +204,6 @@ void OTextOutputStream::closeOutput( ) void OTextOutputStream::checkOutputStream() - throw(IOException) { if (! mxStream.is() ) throw IOException("output stream is not initialized, you have to use setOutputStream first"); @@ -226,13 +213,11 @@ void OTextOutputStream::checkOutputStream() // XActiveDataSource void OTextOutputStream::setOutputStream( const Reference< XOutputStream >& aStream ) - throw(RuntimeException, std::exception) { mxStream = aStream; } Reference< XOutputStream > OTextOutputStream::getOutputStream() - throw(RuntimeException, std::exception) { return mxStream; } @@ -256,17 +241,17 @@ Sequence< OUString > TextOutputStream_getSupportedServiceNames() return seqNames; } -OUString OTextOutputStream::getImplementationName() throw(std::exception) +OUString OTextOutputStream::getImplementationName() { return TextOutputStream_getImplementationName(); } -sal_Bool OTextOutputStream::supportsService(const OUString& ServiceName) throw(std::exception) +sal_Bool OTextOutputStream::supportsService(const OUString& ServiceName) { return cppu::supportsService(this, ServiceName); } -Sequence< OUString > OTextOutputStream::getSupportedServiceNames() throw(std::exception) +Sequence< OUString > OTextOutputStream::getSupportedServiceNames() { return TextOutputStream_getSupportedServiceNames(); } diff --git a/io/source/acceptor/acc_pipe.cxx b/io/source/acceptor/acc_pipe.cxx index 1819ff5616b6..a7e02f8e2af4 100644 --- a/io/source/acceptor/acc_pipe.cxx +++ b/io/source/acceptor/acc_pipe.cxx @@ -44,20 +44,11 @@ namespace io_acceptor public: explicit PipeConnection( const OUString &sConnectionDescription); - virtual sal_Int32 SAL_CALL read( Sequence< sal_Int8 >& aReadBytes, sal_Int32 nBytesToRead ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL write( const Sequence< sal_Int8 >& aData ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL flush( ) throw( - css::io::IOException, - css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL close( ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getDescription( ) - throw(css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL read( Sequence< sal_Int8 >& aReadBytes, sal_Int32 nBytesToRead ) override; + virtual void SAL_CALL write( const Sequence< sal_Int8 >& aData ) override; + virtual void SAL_CALL flush( ) override; + virtual void SAL_CALL close( ) override; + virtual OUString SAL_CALL getDescription( ) override; public: ::osl::StreamPipe m_pipe; oslInterlockedCount m_nStatus; @@ -77,8 +68,6 @@ namespace io_acceptor } sal_Int32 PipeConnection::read( Sequence < sal_Int8 > & aReadBytes , sal_Int32 nBytesToRead ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) { if( ! m_nStatus ) { @@ -100,8 +89,6 @@ namespace io_acceptor } void PipeConnection::write( const Sequence < sal_Int8 > &seq ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) { if( ! m_nStatus ) { @@ -116,14 +103,10 @@ namespace io_acceptor } void PipeConnection::flush( ) - throw( css::io::IOException, - css::uno::RuntimeException, std::exception) { } void PipeConnection::close() - throw( css::io::IOException, - css::uno::RuntimeException, std::exception) { if( 1 == osl_atomic_increment( (&m_nStatus) ) ) { @@ -132,7 +115,6 @@ namespace io_acceptor } OUString PipeConnection::getDescription() - throw(css::uno::RuntimeException, std::exception) { return m_sDescription; } diff --git a/io/source/acceptor/acc_socket.cxx b/io/source/acceptor/acc_socket.cxx index 75764022c907..6d6a7b17bf5e 100644 --- a/io/source/acceptor/acc_socket.cxx +++ b/io/source/acceptor/acc_socket.cxx @@ -72,26 +72,15 @@ namespace io_acceptor { explicit SocketConnection( const OUString & sConnectionDescription ); virtual sal_Int32 SAL_CALL read( css::uno::Sequence< sal_Int8 >& aReadBytes, - sal_Int32 nBytesToRead ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL write( const css::uno::Sequence< sal_Int8 >& aData ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL flush( ) throw( - css::io::IOException, - css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL close( ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getDescription( ) - throw(css::uno::RuntimeException, std::exception) override; + sal_Int32 nBytesToRead ) override; + virtual void SAL_CALL write( const css::uno::Sequence< sal_Int8 >& aData ) override; + virtual void SAL_CALL flush( ) override; + virtual void SAL_CALL close( ) override; + virtual OUString SAL_CALL getDescription( ) override; // XConnectionBroadcaster - virtual void SAL_CALL addStreamListener(const css::uno::Reference< css::io::XStreamListener>& aListener) - throw(css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL removeStreamListener(const css::uno::Reference< css::io::XStreamListener>& aListener) - throw(css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL addStreamListener(const css::uno::Reference< css::io::XStreamListener>& aListener) override; + virtual void SAL_CALL removeStreamListener(const css::uno::Reference< css::io::XStreamListener>& aListener) override; public: void completeConnectionString(); @@ -186,8 +175,6 @@ namespace io_acceptor { } sal_Int32 SocketConnection::read( Sequence < sal_Int8 > & aReadBytes , sal_Int32 nBytesToRead ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) { if( ! m_nStatus ) { @@ -234,8 +221,6 @@ namespace io_acceptor { } void SocketConnection::write( const Sequence < sal_Int8 > &seq ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) { if( ! m_nStatus ) { @@ -270,15 +255,11 @@ namespace io_acceptor { } void SocketConnection::flush( ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) { } void SocketConnection::close() - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) { // ensure close is called only once if( 1 == osl_atomic_increment( (&m_nStatus) ) ) @@ -289,21 +270,20 @@ namespace io_acceptor { } OUString SocketConnection::getDescription() - throw( css::uno::RuntimeException, std::exception) { return m_sDescription; } // XConnectionBroadcaster - void SAL_CALL SocketConnection::addStreamListener(const Reference<XStreamListener> & aListener) throw(RuntimeException, std::exception) + void SAL_CALL SocketConnection::addStreamListener(const Reference<XStreamListener> & aListener) { MutexGuard guard(_mutex); _listeners.insert(aListener); } - void SAL_CALL SocketConnection::removeStreamListener(const Reference<XStreamListener> & aListener) throw(RuntimeException, std::exception) + void SAL_CALL SocketConnection::removeStreamListener(const Reference<XStreamListener> & aListener) { MutexGuard guard(_mutex); diff --git a/io/source/acceptor/acceptor.cxx b/io/source/acceptor/acceptor.cxx index 61ad3c6879bd..c8871a814701 100644 --- a/io/source/acceptor/acceptor.cxx +++ b/io/source/acceptor/acceptor.cxx @@ -53,17 +53,13 @@ namespace io_acceptor virtual ~OAcceptor() override; public: // Methods - virtual Reference< XConnection > SAL_CALL accept( const OUString& sConnectionDescription ) - throw( AlreadyAcceptingException, - ConnectionSetupException, - IllegalArgumentException, - RuntimeException, std::exception) override; - virtual void SAL_CALL stopAccepting( ) throw( RuntimeException, std::exception) override; + virtual Reference< XConnection > SAL_CALL accept( const OUString& sConnectionDescription ) override; + virtual void SAL_CALL stopAccepting( ) override; public: // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw(std::exception) override; - virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(std::exception) override; - virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(std::exception) override; + virtual OUString SAL_CALL getImplementationName() override; + virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() override; + virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; private: PipeAcceptor *m_pPipe; @@ -101,7 +97,7 @@ namespace io_acceptor struct BeingInAccept { /// @throws AlreadyAcceptingException - BeingInAccept( bool *pFlag,const OUString & sConnectionDescription ) throw( AlreadyAcceptingException) + BeingInAccept( bool *pFlag,const OUString & sConnectionDescription ) : m_pFlag( pFlag ) { if( *m_pFlag ) @@ -120,10 +116,6 @@ namespace io_acceptor }; Reference< XConnection > OAcceptor::accept( const OUString &sConnectionDescription ) - throw( AlreadyAcceptingException, - ConnectionSetupException, - IllegalArgumentException, - RuntimeException, std::exception) { // if there is a thread alread accepting in this object, throw an exception. struct BeingInAccept guard( &m_bInAccept, sConnectionDescription ); @@ -239,7 +231,7 @@ namespace io_acceptor return r; } - void SAL_CALL OAcceptor::stopAccepting( ) throw( RuntimeException, std::exception) + void SAL_CALL OAcceptor::stopAccepting( ) { MutexGuard guard( m_mutex ); @@ -274,17 +266,17 @@ namespace io_acceptor return seqNames; } - OUString OAcceptor::getImplementationName() throw(std::exception) + OUString OAcceptor::getImplementationName() { return acceptor_getImplementationName(); } - sal_Bool OAcceptor::supportsService(const OUString& ServiceName) throw(std::exception) + sal_Bool OAcceptor::supportsService(const OUString& ServiceName) { return cppu::supportsService(this, ServiceName); } - Sequence< OUString > OAcceptor::getSupportedServiceNames() throw(std::exception) + Sequence< OUString > OAcceptor::getSupportedServiceNames() { return acceptor_getSupportedServiceNames(); } diff --git a/io/source/connector/connector.cxx b/io/source/connector/connector.cxx index d12296295700..c5f9c7935044 100644 --- a/io/source/connector/connector.cxx +++ b/io/source/connector/connector.cxx @@ -56,13 +56,12 @@ namespace stoc_connector // Methods virtual Reference< XConnection > SAL_CALL connect( - const OUString& sConnectionDescription ) - throw( NoConnectException, ConnectionSetupException, RuntimeException, std::exception) override; + const OUString& sConnectionDescription ) override; public: // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw(std::exception) override; - virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(std::exception) override; - virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(std::exception) override; + virtual OUString SAL_CALL getImplementationName() override; + virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() override; + virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; }; OConnector::OConnector(const Reference< XComponentContext > &xCtx) @@ -71,7 +70,6 @@ namespace stoc_connector {} Reference< XConnection > SAL_CALL OConnector::connect( const OUString& sConnectionDescription ) - throw( NoConnectException, ConnectionSetupException, RuntimeException, std::exception) { // split string into tokens try @@ -174,17 +172,17 @@ namespace stoc_connector return OUString( IMPLEMENTATION_NAME ); } - OUString OConnector::getImplementationName() throw(std::exception) + OUString OConnector::getImplementationName() { return connector_getImplementationName(); } - sal_Bool OConnector::supportsService(const OUString& ServiceName) throw(std::exception) + sal_Bool OConnector::supportsService(const OUString& ServiceName) { return cppu::supportsService(this, ServiceName); } - Sequence< OUString > OConnector::getSupportedServiceNames() throw(std::exception) + Sequence< OUString > OConnector::getSupportedServiceNames() { return connector_getSupportedServiceNames(); } diff --git a/io/source/connector/connector.hxx b/io/source/connector/connector.hxx index 3381cf0cdc22..1c5b585c5e68 100644 --- a/io/source/connector/connector.hxx +++ b/io/source/connector/connector.hxx @@ -64,20 +64,11 @@ namespace stoc_connector virtual ~PipeConnection() override; virtual sal_Int32 SAL_CALL read( css::uno::Sequence< sal_Int8 >& aReadBytes, - sal_Int32 nBytesToRead ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL write( const css::uno::Sequence< sal_Int8 >& aData ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL flush( ) throw( - css::io::IOException, - css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL close( ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getDescription( ) - throw(css::uno::RuntimeException, std::exception) override; + sal_Int32 nBytesToRead ) override; + virtual void SAL_CALL write( const css::uno::Sequence< sal_Int8 >& aData ) override; + virtual void SAL_CALL flush( ) override; + virtual void SAL_CALL close( ) override; + virtual OUString SAL_CALL getDescription( ) override; public: ::osl::StreamPipe m_pipe; oslInterlockedCount m_nStatus; @@ -93,27 +84,16 @@ namespace stoc_connector virtual ~SocketConnection() override; virtual sal_Int32 SAL_CALL read( css::uno::Sequence< sal_Int8 >& aReadBytes, - sal_Int32 nBytesToRead ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL write( const css::uno::Sequence< sal_Int8 >& aData ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL flush( ) throw( - css::io::IOException, - css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL close( ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getDescription( ) - throw(css::uno::RuntimeException, std::exception) override; + sal_Int32 nBytesToRead ) override; + virtual void SAL_CALL write( const css::uno::Sequence< sal_Int8 >& aData ) override; + virtual void SAL_CALL flush( ) override; + virtual void SAL_CALL close( ) override; + virtual OUString SAL_CALL getDescription( ) override; // XConnectionBroadcaster - virtual void SAL_CALL addStreamListener(const css::uno::Reference< css::io::XStreamListener>& aListener) - throw(css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL removeStreamListener(const css::uno::Reference< css::io::XStreamListener>& aListener) - throw(css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL addStreamListener(const css::uno::Reference< css::io::XStreamListener>& aListener) override; + virtual void SAL_CALL removeStreamListener(const css::uno::Reference< css::io::XStreamListener>& aListener) override; public: void completeConnectionString(); diff --git a/io/source/connector/ctr_pipe.cxx b/io/source/connector/ctr_pipe.cxx index df1529173ba6..48aad0b39260 100644 --- a/io/source/connector/ctr_pipe.cxx +++ b/io/source/connector/ctr_pipe.cxx @@ -44,8 +44,6 @@ namespace stoc_connector { } sal_Int32 PipeConnection::read( Sequence < sal_Int8 > & aReadBytes , sal_Int32 nBytesToRead ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) { if( ! m_nStatus ) { @@ -61,8 +59,6 @@ namespace stoc_connector { } void PipeConnection::write( const Sequence < sal_Int8 > &seq ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) { if( ! m_nStatus ) { @@ -77,15 +73,11 @@ namespace stoc_connector { } void PipeConnection::flush( ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) { } void PipeConnection::close() - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) { // ensure that close is called only once if(1 == osl_atomic_increment( (&m_nStatus) ) ) @@ -95,7 +87,6 @@ namespace stoc_connector { } OUString PipeConnection::getDescription() - throw( css::uno::RuntimeException, std::exception) { return m_sDescription; } diff --git a/io/source/connector/ctr_socket.cxx b/io/source/connector/ctr_socket.cxx index 00f35eb627f3..53ce96ae3131 100644 --- a/io/source/connector/ctr_socket.cxx +++ b/io/source/connector/ctr_socket.cxx @@ -116,8 +116,6 @@ namespace stoc_connector { } sal_Int32 SocketConnection::read( Sequence < sal_Int8 > & aReadBytes , sal_Int32 nBytesToRead ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) { if( ! m_nStatus ) { @@ -162,8 +160,6 @@ namespace stoc_connector { } void SocketConnection::write( const Sequence < sal_Int8 > &seq ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) { if( ! m_nStatus ) { @@ -198,15 +194,11 @@ namespace stoc_connector { } void SocketConnection::flush( ) - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) { } void SocketConnection::close() - throw(css::io::IOException, - css::uno::RuntimeException, std::exception) { // ensure that close is called only once if( 1 == osl_atomic_increment( (&m_nStatus) ) ) @@ -217,21 +209,20 @@ namespace stoc_connector { } OUString SocketConnection::getDescription() - throw( css::uno::RuntimeException, std::exception) { return m_sDescription; } // XConnectionBroadcaster - void SAL_CALL SocketConnection::addStreamListener(const Reference<XStreamListener> & aListener) throw(RuntimeException, std::exception) + void SAL_CALL SocketConnection::addStreamListener(const Reference<XStreamListener> & aListener) { MutexGuard guard(_mutex); _listeners.insert(aListener); } - void SAL_CALL SocketConnection::removeStreamListener(const Reference<XStreamListener> & aListener) throw(RuntimeException, std::exception) + void SAL_CALL SocketConnection::removeStreamListener(const Reference<XStreamListener> & aListener) { MutexGuard guard(_mutex); diff --git a/io/source/services.hxx b/io/source/services.hxx index a81fd9422b5b..ff7d9ff0cb87 100644 --- a/io/source/services.hxx +++ b/io/source/services.hxx @@ -57,42 +57,42 @@ namespace io_TextOutputStream { namespace io_stm { /// @throws Exception - Reference< XInterface > SAL_CALL OPipeImpl_CreateInstance( const Reference< XComponentContext > & rSMgr ) throw (Exception); + Reference< XInterface > SAL_CALL OPipeImpl_CreateInstance( const Reference< XComponentContext > & rSMgr ); OUString OPipeImpl_getImplementationName(); Sequence<OUString> OPipeImpl_getSupportedServiceNames(); /// @throws Exception - Reference< XInterface > SAL_CALL ODataInputStream_CreateInstance( const Reference< XComponentContext > & rSMgr ) throw (Exception); + Reference< XInterface > SAL_CALL ODataInputStream_CreateInstance( const Reference< XComponentContext > & rSMgr ); OUString ODataInputStream_getImplementationName(); Sequence<OUString> ODataInputStream_getSupportedServiceNames(); /// @throws Exception - Reference< XInterface > SAL_CALL ODataOutputStream_CreateInstance( const Reference< XComponentContext > & rSMgr ) throw (Exception); + Reference< XInterface > SAL_CALL ODataOutputStream_CreateInstance( const Reference< XComponentContext > & rSMgr ); OUString ODataOutputStream_getImplementationName(); Sequence<OUString> ODataOutputStream_getSupportedServiceNames(); /// @throws Exception - Reference< XInterface > SAL_CALL OMarkableOutputStream_CreateInstance( const Reference< XComponentContext > & rSMgr ) throw (Exception); + Reference< XInterface > SAL_CALL OMarkableOutputStream_CreateInstance( const Reference< XComponentContext > & rSMgr ); OUString OMarkableOutputStream_getImplementationName(); Sequence<OUString> OMarkableOutputStream_getSupportedServiceNames(); /// @throws Exception - Reference< XInterface > SAL_CALL OMarkableInputStream_CreateInstance( const Reference< XComponentContext > & rSMgr ) throw (Exception); + Reference< XInterface > SAL_CALL OMarkableInputStream_CreateInstance( const Reference< XComponentContext > & rSMgr ); OUString OMarkableInputStream_getImplementationName() ; Sequence<OUString> OMarkableInputStream_getSupportedServiceNames(); /// @throws Exception - Reference< XInterface > SAL_CALL OObjectOutputStream_CreateInstance( const Reference< XComponentContext > & rSMgr ) throw(Exception); + Reference< XInterface > SAL_CALL OObjectOutputStream_CreateInstance( const Reference< XComponentContext > & rSMgr ); OUString OObjectOutputStream_getImplementationName(); Sequence<OUString> OObjectOutputStream_getSupportedServiceNames(); /// @throws Exception - Reference< XInterface > SAL_CALL OObjectInputStream_CreateInstance( const Reference< XComponentContext > & rSMgr ) throw(Exception); + Reference< XInterface > SAL_CALL OObjectInputStream_CreateInstance( const Reference< XComponentContext > & rSMgr ); OUString OObjectInputStream_getImplementationName() ; Sequence<OUString> OObjectInputStream_getSupportedServiceNames(); /// @throws Exception - Reference< XInterface > SAL_CALL OPumpImpl_CreateInstance( const Reference< XComponentContext > & rSMgr ) throw (Exception); + Reference< XInterface > SAL_CALL OPumpImpl_CreateInstance( const Reference< XComponentContext > & rSMgr ); OUString OPumpImpl_getImplementationName(); Sequence<OUString> OPumpImpl_getSupportedServiceNames(); } diff --git a/io/source/stm/odata.cxx b/io/source/stm/odata.cxx index 64e1800af279..ff2307bc91a7 100644 --- a/io/source/stm/odata.cxx +++ b/io/source/stm/odata.cxx @@ -63,50 +63,39 @@ public: } public: // XInputStream - virtual sal_Int32 SAL_CALL readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) override; - virtual void SAL_CALL skipBytes(sal_Int32 nBytesToSkip) throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL available() throw ( NotConnectedException, - RuntimeException, std::exception) override; - virtual void SAL_CALL closeInput() throw ( NotConnectedException, - RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) override; + virtual sal_Int32 SAL_CALL readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) override; + virtual void SAL_CALL skipBytes(sal_Int32 nBytesToSkip) override; + virtual sal_Int32 SAL_CALL available() override; + virtual void SAL_CALL closeInput() override; public: // XDataInputStream - virtual sal_Int8 SAL_CALL readBoolean() throw (IOException, RuntimeException, std::exception) override; - virtual sal_Int8 SAL_CALL readByte() throw (IOException, RuntimeException, std::exception) override; - virtual sal_Unicode SAL_CALL readChar() throw (IOException, RuntimeException, std::exception) override; - virtual sal_Int16 SAL_CALL readShort() throw (IOException, RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL readLong() throw (IOException, RuntimeException, std::exception) override; - virtual sal_Int64 SAL_CALL readHyper() throw (IOException, RuntimeException, std::exception) override; - virtual float SAL_CALL readFloat() throw (IOException, RuntimeException, std::exception) override; - virtual double SAL_CALL readDouble() throw (IOException, RuntimeException, std::exception) override; - virtual OUString SAL_CALL readUTF() throw (IOException, RuntimeException, std::exception) override; + virtual sal_Int8 SAL_CALL readBoolean() override; + virtual sal_Int8 SAL_CALL readByte() override; + virtual sal_Unicode SAL_CALL readChar() override; + virtual sal_Int16 SAL_CALL readShort() override; + virtual sal_Int32 SAL_CALL readLong() override; + virtual sal_Int64 SAL_CALL readHyper() override; + virtual float SAL_CALL readFloat() override; + virtual double SAL_CALL readDouble() override; + virtual OUString SAL_CALL readUTF() override; public: // XActiveDataSink - virtual void SAL_CALL setInputStream(const Reference< XInputStream > & aStream) - throw (RuntimeException, std::exception) override; - virtual Reference< XInputStream > SAL_CALL getInputStream() throw (RuntimeException, std::exception) override; + virtual void SAL_CALL setInputStream(const Reference< XInputStream > & aStream) override; + virtual Reference< XInputStream > SAL_CALL getInputStream() override; public: // XConnectable - virtual void SAL_CALL setPredecessor(const Reference < XConnectable >& aPredecessor) throw (RuntimeException, std::exception) override; - virtual Reference < XConnectable > SAL_CALL getPredecessor() throw (RuntimeException, std::exception) override; - virtual void SAL_CALL setSuccessor(const Reference < XConnectable >& aSuccessor) throw (RuntimeException, std::exception) override; - virtual Reference < XConnectable > SAL_CALL getSuccessor() throw (RuntimeException, std::exception) override ; + virtual void SAL_CALL setPredecessor(const Reference < XConnectable >& aPredecessor) override; + virtual Reference < XConnectable > SAL_CALL getPredecessor() override; + virtual void SAL_CALL setSuccessor(const Reference < XConnectable >& aSuccessor) override; + virtual Reference < XConnectable > SAL_CALL getSuccessor() override ; public: // XServiceInfo - OUString SAL_CALL getImplementationName() throw (std::exception) override; - Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (std::exception) override; - sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw (std::exception) override; + OUString SAL_CALL getImplementationName() override; + Sequence< OUString > SAL_CALL getSupportedServiceNames() override; + sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; protected: @@ -118,9 +107,6 @@ protected: // XInputStream sal_Int32 ODataInputStream::readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) { sal_Int32 nRead; @@ -137,9 +123,6 @@ sal_Int32 ODataInputStream::readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBy } sal_Int32 ODataInputStream::readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) { sal_Int32 nRead; if( m_bValidStream ) { @@ -152,9 +135,6 @@ sal_Int32 ODataInputStream::readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 return nRead; } void ODataInputStream::skipBytes(sal_Int32 nBytesToSkip) - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) { if( m_bValidStream ) { m_input->skipBytes( nBytesToSkip ); @@ -167,8 +147,6 @@ void ODataInputStream::skipBytes(sal_Int32 nBytesToSkip) sal_Int32 ODataInputStream::available() - throw ( NotConnectedException, - RuntimeException, std::exception) { sal_Int32 nAvail; @@ -184,8 +162,6 @@ sal_Int32 ODataInputStream::available() } void ODataInputStream::closeInput() - throw ( NotConnectedException, - RuntimeException, std::exception) { if( m_bValidStream ) { m_input->closeInput( ); @@ -204,12 +180,12 @@ void ODataInputStream::closeInput() //== XDataInputStream =========================================== // XDataInputStream -sal_Int8 ODataInputStream::readBoolean() throw (IOException, RuntimeException, std::exception) +sal_Int8 ODataInputStream::readBoolean() { return readByte(); } -sal_Int8 ODataInputStream::readByte() throw (IOException, RuntimeException, std::exception) +sal_Int8 ODataInputStream::readByte() { Sequence<sal_Int8> aTmp(1); if( 1 != readBytes( aTmp, 1 ) ) @@ -219,7 +195,7 @@ sal_Int8 ODataInputStream::readByte() throw (IOException, RuntimeException, s return aTmp.getArray()[0]; } -sal_Unicode ODataInputStream::readChar() throw (IOException, RuntimeException, std::exception) +sal_Unicode ODataInputStream::readChar() { Sequence<sal_Int8> aTmp(2); if( 2 != readBytes( aTmp, 2 ) ) @@ -231,7 +207,7 @@ sal_Unicode ODataInputStream::readChar() throw (IOException, RuntimeException, s return ((sal_Unicode)pBytes[0] << 8) + pBytes[1]; } -sal_Int16 ODataInputStream::readShort() throw (IOException, RuntimeException, std::exception) +sal_Int16 ODataInputStream::readShort() { Sequence<sal_Int8> aTmp(2); if( 2 != readBytes( aTmp, 2 ) ) @@ -244,7 +220,7 @@ sal_Int16 ODataInputStream::readShort() throw (IOException, RuntimeException, st } -sal_Int32 ODataInputStream::readLong() throw (IOException, RuntimeException, std::exception) +sal_Int32 ODataInputStream::readLong() { Sequence<sal_Int8> aTmp(4); if( 4 != readBytes( aTmp, 4 ) ) @@ -257,7 +233,7 @@ sal_Int32 ODataInputStream::readLong() throw (IOException, RuntimeException, std } -sal_Int64 ODataInputStream::readHyper() throw (IOException, RuntimeException, std::exception) +sal_Int64 ODataInputStream::readHyper() { Sequence<sal_Int8> aTmp(8); if( 8 != readBytes( aTmp, 8 ) ) @@ -277,14 +253,14 @@ sal_Int64 ODataInputStream::readHyper() throw (IOException, RuntimeException, st pBytes[7]; } -float ODataInputStream::readFloat() throw (IOException, RuntimeException, std::exception) +float ODataInputStream::readFloat() { union { float f; sal_uInt32 n; } a; a.n = readLong(); return a.f; } -double ODataInputStream::readDouble() throw (IOException, RuntimeException, std::exception) +double ODataInputStream::readDouble() { union { double d; struct { sal_uInt32 n1; sal_uInt32 n2; } ad; } a; #if defined OSL_LITENDIAN @@ -297,7 +273,7 @@ double ODataInputStream::readDouble() throw (IOException, RuntimeException, std: return a.d; } -OUString ODataInputStream::readUTF() throw (IOException, RuntimeException, std::exception) +OUString ODataInputStream::readUTF() { sal_uInt16 nShortLen = (sal_uInt16)readShort(); sal_Int32 nUTFLen; @@ -378,7 +354,6 @@ OUString ODataInputStream::readUTF() throw (IOException, RuntimeException, std:: // XActiveDataSource void ODataInputStream::setInputStream(const Reference< XInputStream > & aStream) - throw (RuntimeException, std::exception) { if( m_input != aStream ) { @@ -391,14 +366,14 @@ void ODataInputStream::setInputStream(const Reference< XInputStream > & aStream) m_bValidStream = m_input.is(); } -Reference< XInputStream > ODataInputStream::getInputStream() throw (RuntimeException, std::exception) +Reference< XInputStream > ODataInputStream::getInputStream() { return m_input; } // XDataSink -void ODataInputStream::setSuccessor( const Reference < XConnectable > &r ) throw (RuntimeException, std::exception) +void ODataInputStream::setSuccessor( const Reference < XConnectable > &r ) { /// if the references match, nothing needs to be done if( m_succ != r ) { @@ -413,7 +388,7 @@ void ODataInputStream::setSuccessor( const Reference < XConnectable > &r ) throw } } -Reference < XConnectable > ODataInputStream::getSuccessor() throw (RuntimeException, std::exception) +Reference < XConnectable > ODataInputStream::getSuccessor() { return m_succ; } @@ -421,7 +396,6 @@ Reference < XConnectable > ODataInputStream::getSuccessor() throw (RuntimeExcept // XDataSource void ODataInputStream::setPredecessor( const Reference < XConnectable > &r ) - throw (RuntimeException, std::exception) { if( r != m_pred ) { m_pred = r; @@ -431,25 +405,25 @@ void ODataInputStream::setPredecessor( const Reference < XConnectable > &r ) } } } -Reference < XConnectable > ODataInputStream::getPredecessor() throw (RuntimeException, std::exception) +Reference < XConnectable > ODataInputStream::getPredecessor() { return m_pred; } // XServiceInfo -OUString ODataInputStream::getImplementationName() throw (std::exception) +OUString ODataInputStream::getImplementationName() { return ODataInputStream_getImplementationName(); } // XServiceInfo -sal_Bool ODataInputStream::supportsService(const OUString& ServiceName) throw (std::exception) +sal_Bool ODataInputStream::supportsService(const OUString& ServiceName) { return cppu::supportsService(this, ServiceName); } // XServiceInfo -Sequence< OUString > ODataInputStream::getSupportedServiceNames() throw (std::exception) +Sequence< OUString > ODataInputStream::getSupportedServiceNames() { return ODataInputStream_getSupportedServiceNames(); } @@ -463,7 +437,6 @@ Sequence< OUString > ODataInputStream::getSupportedServiceNames() throw (std::ex Reference< XInterface > SAL_CALL ODataInputStream_CreateInstance( SAL_UNUSED_PARAMETER const Reference < XComponentContext > & ) - throw( Exception) { ODataInputStream *p = new ODataInputStream; return Reference< XInterface > ( static_cast<OWeakObject *>(p) ); @@ -495,49 +468,35 @@ public: } public: // XOutputStream - virtual void SAL_CALL writeBytes(const Sequence< sal_Int8 >& aData) - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) override; - virtual void SAL_CALL flush() - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) override; - virtual void SAL_CALL closeOutput() - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) override; + virtual void SAL_CALL writeBytes(const Sequence< sal_Int8 >& aData) override; + virtual void SAL_CALL flush() override; + virtual void SAL_CALL closeOutput() override; public: // XDataOutputStream - virtual void SAL_CALL writeBoolean(sal_Bool Value) throw (IOException, RuntimeException, std::exception) override; - virtual void SAL_CALL writeByte(sal_Int8 Value) throw (IOException, RuntimeException, std::exception) override; - virtual void SAL_CALL writeChar(sal_Unicode Value) throw (IOException, RuntimeException, std::exception) override; - virtual void SAL_CALL writeShort(sal_Int16 Value) throw (IOException, RuntimeException, std::exception) override; - virtual void SAL_CALL writeLong(sal_Int32 Value) throw (IOException, RuntimeException, std::exception) override; - virtual void SAL_CALL writeHyper(sal_Int64 Value) throw (IOException, RuntimeException, std::exception) override; - virtual void SAL_CALL writeFloat(float Value) throw (IOException, RuntimeException, std::exception) override; - virtual void SAL_CALL writeDouble(double Value) throw (IOException, RuntimeException, std::exception) override; - virtual void SAL_CALL writeUTF(const OUString& Value) throw (IOException, RuntimeException, std::exception) override; + virtual void SAL_CALL writeBoolean(sal_Bool Value) override; + virtual void SAL_CALL writeByte(sal_Int8 Value) override; + virtual void SAL_CALL writeChar(sal_Unicode Value) override; + virtual void SAL_CALL writeShort(sal_Int16 Value) override; + virtual void SAL_CALL writeLong(sal_Int32 Value) override; + virtual void SAL_CALL writeHyper(sal_Int64 Value) override; + virtual void SAL_CALL writeFloat(float Value) override; + virtual void SAL_CALL writeDouble(double Value) override; + virtual void SAL_CALL writeUTF(const OUString& Value) override; public: // XActiveDataSource - virtual void SAL_CALL setOutputStream(const Reference< XOutputStream > & aStream) - throw (RuntimeException, std::exception) override; - virtual Reference < XOutputStream > SAL_CALL getOutputStream() throw (RuntimeException, std::exception) override; + virtual void SAL_CALL setOutputStream(const Reference< XOutputStream > & aStream) override; + virtual Reference < XOutputStream > SAL_CALL getOutputStream() override; public: // XConnectable - virtual void SAL_CALL setPredecessor(const Reference < XConnectable >& aPredecessor) - throw (RuntimeException, std::exception) override; - virtual Reference < XConnectable > SAL_CALL getPredecessor() - throw (RuntimeException, std::exception) override; - virtual void SAL_CALL setSuccessor(const Reference < XConnectable >& aSuccessor) - throw (RuntimeException, std::exception) override; - virtual Reference < XConnectable > SAL_CALL getSuccessor() - throw (RuntimeException, std::exception) override; + virtual void SAL_CALL setPredecessor(const Reference < XConnectable >& aPredecessor) override; + virtual Reference < XConnectable > SAL_CALL getPredecessor() override; + virtual void SAL_CALL setSuccessor(const Reference < XConnectable >& aSuccessor) override; + virtual Reference < XConnectable > SAL_CALL getSuccessor() override; public: // XServiceInfo - OUString SAL_CALL getImplementationName() throw (std::exception) override; - Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (std::exception) override; - sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw (std::exception) override; + OUString SAL_CALL getImplementationName() override; + Sequence< OUString > SAL_CALL getSupportedServiceNames() override; + sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; protected: Reference < XConnectable > m_succ; @@ -548,9 +507,6 @@ protected: // XOutputStream void ODataOutputStream::writeBytes(const Sequence< sal_Int8 >& aData) - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) { if( m_bValidStream ) { @@ -562,9 +518,6 @@ void ODataOutputStream::writeBytes(const Sequence< sal_Int8 >& aData) } void ODataOutputStream::flush() - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) { if( m_bValidStream ) { @@ -579,9 +532,6 @@ void ODataOutputStream::flush() void ODataOutputStream::closeOutput() - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) { if( m_bValidStream ) { @@ -598,8 +548,6 @@ void ODataOutputStream::closeOutput() // XDataOutputStream void ODataOutputStream::writeBoolean(sal_Bool Value) - throw ( IOException, - RuntimeException, std::exception) { if( Value ) { @@ -613,8 +561,6 @@ void ODataOutputStream::writeBoolean(sal_Bool Value) void ODataOutputStream::writeByte(sal_Int8 Value) - throw ( IOException, - RuntimeException, std::exception) { Sequence<sal_Int8> aTmp( 1 ); aTmp.getArray()[0] = Value; @@ -622,8 +568,6 @@ void ODataOutputStream::writeByte(sal_Int8 Value) } void ODataOutputStream::writeChar(sal_Unicode Value) - throw ( IOException, - RuntimeException, std::exception) { Sequence<sal_Int8> aTmp( 2 ); sal_Int8 * pBytes = aTmp.getArray(); @@ -634,8 +578,6 @@ void ODataOutputStream::writeChar(sal_Unicode Value) void ODataOutputStream::writeShort(sal_Int16 Value) - throw ( IOException, - RuntimeException, std::exception) { Sequence<sal_Int8> aTmp( 2 ); sal_Int8 * pBytes = aTmp.getArray(); @@ -645,8 +587,6 @@ void ODataOutputStream::writeShort(sal_Int16 Value) } void ODataOutputStream::writeLong(sal_Int32 Value) - throw ( IOException, - RuntimeException, std::exception) { Sequence<sal_Int8> aTmp( 4 ); sal_Int8 * pBytes = aTmp.getArray(); @@ -658,8 +598,6 @@ void ODataOutputStream::writeLong(sal_Int32 Value) } void ODataOutputStream::writeHyper(sal_Int64 Value) - throw ( IOException, - RuntimeException, std::exception) { Sequence<sal_Int8> aTmp( 8 ); sal_Int8 * pBytes = aTmp.getArray(); @@ -676,8 +614,6 @@ void ODataOutputStream::writeHyper(sal_Int64 Value) void ODataOutputStream::writeFloat(float Value) - throw ( IOException, - RuntimeException, std::exception) { union { float f; sal_uInt32 n; } a; a.f = Value; @@ -685,8 +621,6 @@ void ODataOutputStream::writeFloat(float Value) } void ODataOutputStream::writeDouble(double Value) - throw ( IOException, - RuntimeException, std::exception) { union { double d; struct { sal_uInt32 n1; sal_uInt32 n2; } ad; } a; a.d = Value; @@ -700,8 +634,6 @@ void ODataOutputStream::writeDouble(double Value) } void ODataOutputStream::writeUTF(const OUString& Value) - throw ( IOException, - RuntimeException, std::exception) { sal_Int32 nStrLen = Value.getLength(); const sal_Unicode * pStr = Value.getStr(); @@ -760,7 +692,6 @@ void ODataOutputStream::writeUTF(const OUString& Value) // XActiveDataSource void ODataOutputStream::setOutputStream(const Reference< XOutputStream > & aStream) - throw (RuntimeException, std::exception) { if( m_output != aStream ) { m_output = aStream; @@ -772,7 +703,6 @@ void ODataOutputStream::setOutputStream(const Reference< XOutputStream > & aStre } Reference< XOutputStream > ODataOutputStream::getOutputStream() - throw (RuntimeException, std::exception) { return m_output; } @@ -780,7 +710,6 @@ Reference< XOutputStream > ODataOutputStream::getOutputStream() // XDataSink void ODataOutputStream::setSuccessor( const Reference < XConnectable > &r ) - throw (RuntimeException, std::exception) { /// if the references match, nothing needs to be done if( m_succ != r ) @@ -796,14 +725,14 @@ void ODataOutputStream::setSuccessor( const Reference < XConnectable > &r ) } } } -Reference < XConnectable > ODataOutputStream::getSuccessor() throw (RuntimeException, std::exception) +Reference < XConnectable > ODataOutputStream::getSuccessor() { return m_succ; } // XDataSource -void ODataOutputStream::setPredecessor( const Reference < XConnectable > &r ) throw (RuntimeException, std::exception) +void ODataOutputStream::setPredecessor( const Reference < XConnectable > &r ) { if( r != m_pred ) { m_pred = r; @@ -813,33 +742,32 @@ void ODataOutputStream::setPredecessor( const Reference < XConnectable > &r ) } } } -Reference < XConnectable > ODataOutputStream::getPredecessor() throw (RuntimeException, std::exception) +Reference < XConnectable > ODataOutputStream::getPredecessor() { return m_pred; } // XServiceInfo -OUString ODataOutputStream::getImplementationName() throw (std::exception) +OUString ODataOutputStream::getImplementationName() { return ODataOutputStream_getImplementationName(); } // XServiceInfo -sal_Bool ODataOutputStream::supportsService(const OUString& ServiceName) throw (std::exception) +sal_Bool ODataOutputStream::supportsService(const OUString& ServiceName) { return cppu::supportsService(this, ServiceName); } // XServiceInfo -Sequence< OUString > ODataOutputStream::getSupportedServiceNames() throw (std::exception) +Sequence< OUString > ODataOutputStream::getSupportedServiceNames() { return ODataOutputStream_getSupportedServiceNames(); } Reference< XInterface > SAL_CALL ODataOutputStream_CreateInstance( SAL_UNUSED_PARAMETER const Reference < XComponentContext > & ) - throw(Exception) { ODataOutputStream *p = new ODataOutputStream; Reference< XInterface > xService = *p; @@ -899,60 +827,50 @@ public: public: // XOutputStream - virtual void SAL_CALL writeBytes(const Sequence< sal_Int8 >& aData) - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) override + virtual void SAL_CALL writeBytes(const Sequence< sal_Int8 >& aData) override { ODataOutputStream::writeBytes( aData ); } - virtual void SAL_CALL flush() - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) override + virtual void SAL_CALL flush() override { ODataOutputStream::flush(); } - virtual void SAL_CALL closeOutput() - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) override + virtual void SAL_CALL closeOutput() override { ODataOutputStream::closeOutput(); } public: // XDataOutputStream - virtual void SAL_CALL writeBoolean(sal_Bool Value) throw (IOException, RuntimeException, std::exception) override + virtual void SAL_CALL writeBoolean(sal_Bool Value) override { ODataOutputStream::writeBoolean( Value ); } - virtual void SAL_CALL writeByte(sal_Int8 Value) throw (IOException, RuntimeException, std::exception) override + virtual void SAL_CALL writeByte(sal_Int8 Value) override { ODataOutputStream::writeByte( Value ); } - virtual void SAL_CALL writeChar(sal_Unicode Value) throw (IOException, RuntimeException, std::exception) override + virtual void SAL_CALL writeChar(sal_Unicode Value) override { ODataOutputStream::writeChar( Value ); } - virtual void SAL_CALL writeShort(sal_Int16 Value) throw (IOException, RuntimeException, std::exception) override + virtual void SAL_CALL writeShort(sal_Int16 Value) override { ODataOutputStream::writeShort( Value ); } - virtual void SAL_CALL writeLong(sal_Int32 Value) throw (IOException, RuntimeException, std::exception) override + virtual void SAL_CALL writeLong(sal_Int32 Value) override { ODataOutputStream::writeLong( Value ); } - virtual void SAL_CALL writeHyper(sal_Int64 Value) throw (IOException, RuntimeException, std::exception) override + virtual void SAL_CALL writeHyper(sal_Int64 Value) override { ODataOutputStream::writeHyper( Value ); } - virtual void SAL_CALL writeFloat(float Value) throw (IOException, RuntimeException, std::exception) override + virtual void SAL_CALL writeFloat(float Value) override { ODataOutputStream::writeFloat( Value ); } - virtual void SAL_CALL writeDouble(double Value) throw (IOException, RuntimeException, std::exception) override + virtual void SAL_CALL writeDouble(double Value) override { ODataOutputStream::writeDouble( Value ); } - virtual void SAL_CALL writeUTF(const OUString& Value) throw (IOException, RuntimeException, std::exception) override + virtual void SAL_CALL writeUTF(const OUString& Value) override { ODataOutputStream::writeUTF( Value );} // XObjectOutputStream - virtual void SAL_CALL writeObject( const Reference< XPersistObject > & r ) throw (css::io::IOException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL writeObject( const Reference< XPersistObject > & r ) override; public: // XMarkableStream - virtual sal_Int32 SAL_CALL createMark() throw (IOException, RuntimeException, std::exception) override; - virtual void SAL_CALL deleteMark(sal_Int32 Mark) throw (IOException, IllegalArgumentException, RuntimeException, std::exception) override; - virtual void SAL_CALL jumpToMark(sal_Int32 nMark) throw (IOException, IllegalArgumentException, RuntimeException, std::exception) override; - virtual void SAL_CALL jumpToFurthest() throw (IOException, RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL offsetToMark(sal_Int32 nMark) - throw (IOException, IllegalArgumentException, RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL createMark() override; + virtual void SAL_CALL deleteMark(sal_Int32 Mark) override; + virtual void SAL_CALL jumpToMark(sal_Int32 nMark) override; + virtual void SAL_CALL jumpToFurthest() override; + virtual sal_Int32 SAL_CALL offsetToMark(sal_Int32 nMark) override; public: // XServiceInfo - OUString SAL_CALL getImplementationName() throw (std::exception) override; - Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (std::exception) override; - sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw (std::exception) override; + OUString SAL_CALL getImplementationName() override; + Sequence< OUString > SAL_CALL getSupportedServiceNames() override; + sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; private: void connectToMarkable(); @@ -963,7 +881,7 @@ private: bool m_bValidMarkable; }; -void OObjectOutputStream::writeObject( const Reference< XPersistObject > & xPObj ) throw (css::io::IOException, css::uno::RuntimeException, std::exception) +void OObjectOutputStream::writeObject( const Reference< XPersistObject > & xPObj ) { connectToMarkable(); @@ -1059,7 +977,6 @@ void OObjectOutputStream::connectToMarkable() sal_Int32 OObjectOutputStream::createMark() - throw (IOException, RuntimeException, std::exception) { connectToMarkable(); // throws an exception, if a markable is not connected ! @@ -1067,7 +984,6 @@ sal_Int32 OObjectOutputStream::createMark() } void OObjectOutputStream::deleteMark(sal_Int32 Mark) - throw (IOException, IllegalArgumentException, RuntimeException, std::exception) { if( ! m_bValidMarkable ) { @@ -1077,7 +993,6 @@ void OObjectOutputStream::deleteMark(sal_Int32 Mark) } void OObjectOutputStream::jumpToMark(sal_Int32 nMark) - throw (IOException, IllegalArgumentException, RuntimeException, std::exception) { if( ! m_bValidMarkable ) { @@ -1088,14 +1003,12 @@ void OObjectOutputStream::jumpToMark(sal_Int32 nMark) void OObjectOutputStream::jumpToFurthest() - throw (IOException, RuntimeException, std::exception) { connectToMarkable(); m_rMarkable->jumpToFurthest(); } sal_Int32 OObjectOutputStream::offsetToMark(sal_Int32 nMark) - throw (IOException, IllegalArgumentException, RuntimeException, std::exception) { if( ! m_bValidMarkable ) { @@ -1107,7 +1020,6 @@ sal_Int32 OObjectOutputStream::offsetToMark(sal_Int32 nMark) Reference< XInterface > SAL_CALL OObjectOutputStream_CreateInstance( SAL_UNUSED_PARAMETER const Reference < XComponentContext > & ) - throw(Exception) { OObjectOutputStream *p = new OObjectOutputStream; return Reference< XInterface > ( (static_cast< OWeakObject * >(p)) ); @@ -1125,19 +1037,19 @@ Sequence<OUString> OObjectOutputStream_getSupportedServiceNames() } // XServiceInfo -OUString OObjectOutputStream::getImplementationName() throw (std::exception) +OUString OObjectOutputStream::getImplementationName() { return OObjectOutputStream_getImplementationName(); } // XServiceInfo -sal_Bool OObjectOutputStream::supportsService(const OUString& ServiceName) throw (std::exception) +sal_Bool OObjectOutputStream::supportsService(const OUString& ServiceName) { return cppu::supportsService(this, ServiceName); } // XServiceInfo -Sequence< OUString > OObjectOutputStream::getSupportedServiceNames() throw (std::exception) +Sequence< OUString > OObjectOutputStream::getSupportedServiceNames() { return OObjectOutputStream_getSupportedServiceNames(); } @@ -1156,70 +1068,55 @@ public: } public: // XInputStream - virtual sal_Int32 SAL_CALL readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) override + virtual sal_Int32 SAL_CALL readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) override { return ODataInputStream::readBytes( aData , nBytesToRead ); } - virtual sal_Int32 SAL_CALL readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) override + virtual sal_Int32 SAL_CALL readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) override { return ODataInputStream::readSomeBytes( aData, nMaxBytesToRead ); } - virtual void SAL_CALL skipBytes(sal_Int32 nBytesToSkip) - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) override + virtual void SAL_CALL skipBytes(sal_Int32 nBytesToSkip) override { ODataInputStream::skipBytes( nBytesToSkip ); } - virtual sal_Int32 SAL_CALL available() - throw ( NotConnectedException, - RuntimeException, std::exception) override + virtual sal_Int32 SAL_CALL available() override { return ODataInputStream::available(); } - virtual void SAL_CALL closeInput() - throw ( NotConnectedException, - RuntimeException, std::exception) override + virtual void SAL_CALL closeInput() override { ODataInputStream::closeInput(); } public: // XDataInputStream - virtual sal_Int8 SAL_CALL readBoolean() throw (IOException, RuntimeException, std::exception) override + virtual sal_Int8 SAL_CALL readBoolean() override { return ODataInputStream::readBoolean(); } - virtual sal_Int8 SAL_CALL readByte() throw (IOException, RuntimeException, std::exception) override + virtual sal_Int8 SAL_CALL readByte() override { return ODataInputStream::readByte(); } - virtual sal_Unicode SAL_CALL readChar() throw (IOException, RuntimeException, std::exception) override + virtual sal_Unicode SAL_CALL readChar() override { return ODataInputStream::readChar(); } - virtual sal_Int16 SAL_CALL readShort() throw (IOException, RuntimeException, std::exception) override + virtual sal_Int16 SAL_CALL readShort() override { return ODataInputStream::readShort(); } - virtual sal_Int32 SAL_CALL readLong() throw (IOException, RuntimeException, std::exception) override + virtual sal_Int32 SAL_CALL readLong() override { return ODataInputStream::readLong(); } - virtual sal_Int64 SAL_CALL readHyper() throw (IOException, RuntimeException, std::exception) override + virtual sal_Int64 SAL_CALL readHyper() override { return ODataInputStream::readHyper(); } - virtual float SAL_CALL readFloat() throw (IOException, RuntimeException, std::exception) override + virtual float SAL_CALL readFloat() override { return ODataInputStream::readFloat(); } - virtual double SAL_CALL readDouble() throw (IOException, RuntimeException, std::exception) override + virtual double SAL_CALL readDouble() override { return ODataInputStream::readDouble(); } - virtual OUString SAL_CALL readUTF() throw (IOException, RuntimeException, std::exception) override + virtual OUString SAL_CALL readUTF() override { return ODataInputStream::readUTF(); } public: // XObjectInputStream - virtual Reference< XPersistObject > SAL_CALL readObject( ) throw (css::io::IOException, css::uno::RuntimeException, std::exception) override; + virtual Reference< XPersistObject > SAL_CALL readObject( ) override; public: // XMarkableStream - virtual sal_Int32 SAL_CALL createMark() - throw (IOException, RuntimeException, std::exception) override; - virtual void SAL_CALL deleteMark(sal_Int32 Mark) throw (IOException, IllegalArgumentException, RuntimeException, std::exception) override; - virtual void SAL_CALL jumpToMark(sal_Int32 nMark) throw (IOException, IllegalArgumentException, RuntimeException, std::exception) override; - virtual void SAL_CALL jumpToFurthest() throw (IOException, RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL offsetToMark(sal_Int32 nMark) - throw (IOException, IllegalArgumentException, RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL createMark() override; + virtual void SAL_CALL deleteMark(sal_Int32 Mark) override; + virtual void SAL_CALL jumpToMark(sal_Int32 nMark) override; + virtual void SAL_CALL jumpToFurthest() override; + virtual sal_Int32 SAL_CALL offsetToMark(sal_Int32 nMark) override; public: // XServiceInfo - OUString SAL_CALL getImplementationName() throw (std::exception) override; - Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (std::exception) override; - sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw (std::exception) override; + OUString SAL_CALL getImplementationName() override; + Sequence< OUString > SAL_CALL getSupportedServiceNames() override; + sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; private: void connectToMarkable(); @@ -1232,7 +1129,7 @@ private: }; -Reference< XPersistObject > OObjectInputStream::readObject() throw (css::io::IOException, css::uno::RuntimeException, std::exception) +Reference< XPersistObject > OObjectInputStream::readObject() { // check if chain contains a XMarkableStream connectToMarkable(); @@ -1347,14 +1244,14 @@ void OObjectInputStream::connectToMarkable() } } -sal_Int32 OObjectInputStream::createMark() throw (IOException, RuntimeException, std::exception) +sal_Int32 OObjectInputStream::createMark() { connectToMarkable(); // throws an exception, if a markable is not connected ! return m_rMarkable->createMark(); } -void OObjectInputStream::deleteMark(sal_Int32 Mark) throw (IOException, IllegalArgumentException, RuntimeException, std::exception) +void OObjectInputStream::deleteMark(sal_Int32 Mark) { if( ! m_bValidMarkable ) { @@ -1363,7 +1260,7 @@ void OObjectInputStream::deleteMark(sal_Int32 Mark) throw (IOException, m_rMarkable->deleteMark( Mark ); } -void OObjectInputStream::jumpToMark(sal_Int32 nMark) throw (IOException, IllegalArgumentException, RuntimeException, std::exception) +void OObjectInputStream::jumpToMark(sal_Int32 nMark) { if( ! m_bValidMarkable ) { @@ -1371,14 +1268,13 @@ void OObjectInputStream::jumpToMark(sal_Int32 nMark) throw (IOException, } m_rMarkable->jumpToMark( nMark ); } -void OObjectInputStream::jumpToFurthest() throw (IOException, RuntimeException, std::exception) +void OObjectInputStream::jumpToFurthest() { connectToMarkable(); m_rMarkable->jumpToFurthest(); } sal_Int32 OObjectInputStream::offsetToMark(sal_Int32 nMark) - throw (IOException, IllegalArgumentException, RuntimeException, std::exception) { if( ! m_bValidMarkable ) { @@ -1388,24 +1284,24 @@ sal_Int32 OObjectInputStream::offsetToMark(sal_Int32 nMark) } // XServiceInfo -OUString OObjectInputStream::getImplementationName() throw (std::exception) +OUString OObjectInputStream::getImplementationName() { return OObjectInputStream_getImplementationName(); } // XServiceInfo -sal_Bool OObjectInputStream::supportsService(const OUString& ServiceName) throw (std::exception) +sal_Bool OObjectInputStream::supportsService(const OUString& ServiceName) { return cppu::supportsService(this, ServiceName); } // XServiceInfo -Sequence< OUString > OObjectInputStream::getSupportedServiceNames() throw (std::exception) +Sequence< OUString > OObjectInputStream::getSupportedServiceNames() { return OObjectInputStream_getSupportedServiceNames(); } -Reference< XInterface > SAL_CALL OObjectInputStream_CreateInstance( const Reference < XComponentContext > & rCtx ) throw(Exception) +Reference< XInterface > SAL_CALL OObjectInputStream_CreateInstance( const Reference < XComponentContext > & rCtx ) { OObjectInputStream *p = new OObjectInputStream( rCtx ); return Reference< XInterface> ( (static_cast< OWeakObject * >(p)) ); diff --git a/io/source/stm/omark.cxx b/io/source/stm/omark.cxx index af4e9f248456..dc9fbb8b260a 100644 --- a/io/source/stm/omark.cxx +++ b/io/source/stm/omark.cxx @@ -78,61 +78,37 @@ public: OMarkableOutputStream( ); public: // XOutputStream - virtual void SAL_CALL writeBytes(const Sequence< sal_Int8 >& aData) - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) override; - virtual void SAL_CALL flush() - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) override; - virtual void SAL_CALL closeOutput() - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) override; + virtual void SAL_CALL writeBytes(const Sequence< sal_Int8 >& aData) override; + virtual void SAL_CALL flush() override; + virtual void SAL_CALL closeOutput() override; public: // XMarkable - virtual sal_Int32 SAL_CALL createMark() - throw (IOException, RuntimeException, std::exception) override; - virtual void SAL_CALL deleteMark(sal_Int32 Mark) - throw (IOException, - IllegalArgumentException, - RuntimeException, std::exception) override; - virtual void SAL_CALL jumpToMark(sal_Int32 nMark) - throw (IOException, - IllegalArgumentException, - RuntimeException, std::exception) override; - virtual void SAL_CALL jumpToFurthest() - throw (IOException, RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL offsetToMark(sal_Int32 nMark) - throw (IOException, - IllegalArgumentException, - RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL createMark() override; + virtual void SAL_CALL deleteMark(sal_Int32 Mark) override; + virtual void SAL_CALL jumpToMark(sal_Int32 nMark) override; + virtual void SAL_CALL jumpToFurthest() override; + virtual sal_Int32 SAL_CALL offsetToMark(sal_Int32 nMark) override; public: // XActiveDataSource - virtual void SAL_CALL setOutputStream(const Reference < XOutputStream > & aStream) - throw (RuntimeException, std::exception) override; - virtual Reference < XOutputStream > SAL_CALL getOutputStream() - throw (RuntimeException, std::exception) override; + virtual void SAL_CALL setOutputStream(const Reference < XOutputStream > & aStream) override; + virtual Reference < XOutputStream > SAL_CALL getOutputStream() override; public: // XConnectable - virtual void SAL_CALL setPredecessor(const Reference < XConnectable > & aPredecessor) - throw (RuntimeException, std::exception) override; - virtual Reference < XConnectable > SAL_CALL getPredecessor() throw (RuntimeException, std::exception) override; - virtual void SAL_CALL setSuccessor(const Reference < XConnectable >& aSuccessor) - throw (RuntimeException, std::exception) override; - virtual Reference< XConnectable > SAL_CALL getSuccessor() throw (RuntimeException, std::exception) override; + virtual void SAL_CALL setPredecessor(const Reference < XConnectable > & aPredecessor) override; + virtual Reference < XConnectable > SAL_CALL getPredecessor() override; + virtual void SAL_CALL setSuccessor(const Reference < XConnectable >& aSuccessor) override; + virtual Reference< XConnectable > SAL_CALL getSuccessor() override; public: // XServiceInfo - OUString SAL_CALL getImplementationName() throw (std::exception) override; - Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (std::exception) override; - sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw (std::exception) override; + OUString SAL_CALL getImplementationName() override; + Sequence< OUString > SAL_CALL getSupportedServiceNames() override; + sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; private: // helper methods /// @throws NotConnectedException /// @throws BufferSizeExceededException - void checkMarksAndFlush() throw( NotConnectedException, BufferSizeExceededException); + void checkMarksAndFlush(); Reference< XConnectable > m_succ; Reference< XConnectable > m_pred; @@ -158,9 +134,6 @@ OMarkableOutputStream::OMarkableOutputStream( ) // XOutputStream void OMarkableOutputStream::writeBytes(const Sequence< sal_Int8 >& aData) - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) { if( m_bValidStream ) { if( m_mapMarks.empty() && ( m_pBuffer->getSize() == 0 ) ) { @@ -181,9 +154,6 @@ void OMarkableOutputStream::writeBytes(const Sequence< sal_Int8 >& aData) } void OMarkableOutputStream::flush() - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) { Reference< XOutputStream > output; { @@ -201,9 +171,6 @@ void OMarkableOutputStream::flush() } void OMarkableOutputStream::closeOutput() - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) { if( m_bValidStream ) { MutexGuard guard( m_mutex ); @@ -229,8 +196,6 @@ void OMarkableOutputStream::closeOutput() sal_Int32 OMarkableOutputStream::createMark() - throw ( IOException, - RuntimeException, std::exception) { MutexGuard guard( m_mutex ); sal_Int32 nMark = m_nCurrentMark; @@ -242,9 +207,6 @@ sal_Int32 OMarkableOutputStream::createMark() } void OMarkableOutputStream::deleteMark(sal_Int32 Mark) - throw( IOException, - IllegalArgumentException, - RuntimeException, std::exception) { MutexGuard guard( m_mutex ); map<sal_Int32,sal_Int32,less<sal_Int32> >::iterator ii = m_mapMarks.find( Mark ); @@ -263,9 +225,6 @@ void OMarkableOutputStream::deleteMark(sal_Int32 Mark) } void OMarkableOutputStream::jumpToMark(sal_Int32 nMark) - throw (IOException, - IllegalArgumentException, - RuntimeException, std::exception) { MutexGuard guard( m_mutex ); map<sal_Int32,sal_Int32,less<sal_Int32> >::iterator ii = m_mapMarks.find( nMark ); @@ -283,8 +242,6 @@ void OMarkableOutputStream::jumpToMark(sal_Int32 nMark) } void OMarkableOutputStream::jumpToFurthest() - throw (IOException, - RuntimeException, std::exception) { MutexGuard guard( m_mutex ); m_nCurrentPos = m_pBuffer->getSize(); @@ -292,9 +249,6 @@ void OMarkableOutputStream::jumpToFurthest() } sal_Int32 OMarkableOutputStream::offsetToMark(sal_Int32 nMark) - throw (IOException, - IllegalArgumentException, - RuntimeException, std::exception) { MutexGuard guard( m_mutex ); @@ -314,7 +268,6 @@ sal_Int32 OMarkableOutputStream::offsetToMark(sal_Int32 nMark) // XActiveDataSource2 void OMarkableOutputStream::setOutputStream(const Reference < XOutputStream >& aStream) - throw (RuntimeException, std::exception) { if( m_output != aStream ) { m_output = aStream; @@ -325,14 +278,13 @@ void OMarkableOutputStream::setOutputStream(const Reference < XOutputStream >& a m_bValidStream = m_output.is(); } -Reference< XOutputStream > OMarkableOutputStream::getOutputStream() throw (RuntimeException, std::exception) +Reference< XOutputStream > OMarkableOutputStream::getOutputStream() { return m_output; } void OMarkableOutputStream::setSuccessor( const Reference< XConnectable > &r ) - throw (RuntimeException, std::exception) { /// if the references match, nothing needs to be done if( m_succ != r ) { @@ -345,7 +297,7 @@ void OMarkableOutputStream::setSuccessor( const Reference< XConnectable > &r ) } } } -Reference <XConnectable > OMarkableOutputStream::getSuccessor() throw (RuntimeException, std::exception) +Reference <XConnectable > OMarkableOutputStream::getSuccessor() { return m_succ; } @@ -353,7 +305,6 @@ Reference <XConnectable > OMarkableOutputStream::getSuccessor() throw (Runti // XDataSource void OMarkableOutputStream::setPredecessor( const Reference< XConnectable > &r ) - throw (RuntimeException, std::exception) { if( r != m_pred ) { m_pred = r; @@ -363,7 +314,7 @@ void OMarkableOutputStream::setPredecessor( const Reference< XConnectable > &r ) } } } -Reference < XConnectable > OMarkableOutputStream::getPredecessor() throw (RuntimeException, std::exception) +Reference < XConnectable > OMarkableOutputStream::getPredecessor() { return m_pred; } @@ -371,8 +322,7 @@ Reference < XConnectable > OMarkableOutputStream::getPredecessor() throw (Runtim // private methods -void OMarkableOutputStream::checkMarksAndFlush() throw( NotConnectedException, - BufferSizeExceededException) +void OMarkableOutputStream::checkMarksAndFlush() { map<sal_Int32,sal_Int32,less<sal_Int32> >::iterator ii; @@ -406,19 +356,19 @@ void OMarkableOutputStream::checkMarksAndFlush() throw( NotConnectedExceptio // XServiceInfo -OUString OMarkableOutputStream::getImplementationName() throw (std::exception) +OUString OMarkableOutputStream::getImplementationName() { return OMarkableOutputStream_getImplementationName(); } // XServiceInfo -sal_Bool OMarkableOutputStream::supportsService(const OUString& ServiceName) throw (std::exception) +sal_Bool OMarkableOutputStream::supportsService(const OUString& ServiceName) { return cppu::supportsService(this, ServiceName); } // XServiceInfo -Sequence< OUString > OMarkableOutputStream::getSupportedServiceNames() throw (std::exception) +Sequence< OUString > OMarkableOutputStream::getSupportedServiceNames() { return OMarkableOutputStream_getSupportedServiceNames(); } @@ -430,7 +380,6 @@ Sequence< OUString > OMarkableOutputStream::getSupportedServiceNames() throw (st *------------------------*/ Reference< XInterface > SAL_CALL OMarkableOutputStream_CreateInstance( SAL_UNUSED_PARAMETER const Reference < XComponentContext > & ) - throw(Exception) { OMarkableOutputStream *p = new OMarkableOutputStream( ); @@ -469,55 +418,34 @@ public: public: // XInputStream - virtual sal_Int32 SAL_CALL readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) override ; - virtual sal_Int32 SAL_CALL readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) override; - virtual void SAL_CALL skipBytes(sal_Int32 nBytesToSkip) - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) override; - - virtual sal_Int32 SAL_CALL available() - throw ( NotConnectedException, - RuntimeException, std::exception) override; - virtual void SAL_CALL closeInput() throw (NotConnectedException, RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) override ; + virtual sal_Int32 SAL_CALL readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) override; + virtual void SAL_CALL skipBytes(sal_Int32 nBytesToSkip) override; + + virtual sal_Int32 SAL_CALL available() override; + virtual void SAL_CALL closeInput() override; public: // XMarkable - virtual sal_Int32 SAL_CALL createMark() - throw (IOException, RuntimeException, std::exception) override; - virtual void SAL_CALL deleteMark(sal_Int32 Mark) - throw (IOException, IllegalArgumentException, RuntimeException, std::exception) override; - virtual void SAL_CALL jumpToMark(sal_Int32 nMark) - throw (IOException, IllegalArgumentException, RuntimeException, std::exception) override; - virtual void SAL_CALL jumpToFurthest() - throw (IOException, RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL offsetToMark(sal_Int32 nMark) - throw (IOException, IllegalArgumentException,RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL createMark() override; + virtual void SAL_CALL deleteMark(sal_Int32 Mark) override; + virtual void SAL_CALL jumpToMark(sal_Int32 nMark) override; + virtual void SAL_CALL jumpToFurthest() override; + virtual sal_Int32 SAL_CALL offsetToMark(sal_Int32 nMark) override; public: // XActiveDataSink - virtual void SAL_CALL setInputStream(const Reference < XInputStream > & aStream) - throw (RuntimeException, std::exception) override; - virtual Reference < XInputStream > SAL_CALL getInputStream() - throw (RuntimeException, std::exception) override; + virtual void SAL_CALL setInputStream(const Reference < XInputStream > & aStream) override; + virtual Reference < XInputStream > SAL_CALL getInputStream() override; public: // XConnectable - virtual void SAL_CALL setPredecessor(const Reference < XConnectable > & aPredecessor) - throw (RuntimeException, std::exception) override; - virtual Reference < XConnectable > SAL_CALL getPredecessor() - throw (RuntimeException, std::exception) override; - virtual void SAL_CALL setSuccessor(const Reference < XConnectable > & aSuccessor) - throw (RuntimeException, std::exception) override; - virtual Reference < XConnectable > SAL_CALL getSuccessor() throw (RuntimeException, std::exception) override; + virtual void SAL_CALL setPredecessor(const Reference < XConnectable > & aPredecessor) override; + virtual Reference < XConnectable > SAL_CALL getPredecessor() override; + virtual void SAL_CALL setSuccessor(const Reference < XConnectable > & aSuccessor) override; + virtual Reference < XConnectable > SAL_CALL getSuccessor() override; public: // XServiceInfo - OUString SAL_CALL getImplementationName() throw (std::exception) override; - Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (std::exception) override; - sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw (std::exception) override; + OUString SAL_CALL getImplementationName() override; + Sequence< OUString > SAL_CALL getSupportedServiceNames() override; + sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; private: void checkMarksAndFlush(); @@ -555,9 +483,6 @@ OMarkableInputStream::~OMarkableInputStream() // XInputStream sal_Int32 OMarkableInputStream::readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) { sal_Int32 nBytesRead; @@ -603,9 +528,6 @@ sal_Int32 OMarkableInputStream::readBytes(Sequence< sal_Int8 >& aData, sal_Int32 sal_Int32 OMarkableInputStream::readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) { sal_Int32 nBytesRead; @@ -656,9 +578,6 @@ sal_Int32 OMarkableInputStream::readSomeBytes(Sequence< sal_Int8 >& aData, sal_I void OMarkableInputStream::skipBytes(sal_Int32 nBytesToSkip) - throw ( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) { if ( nBytesToSkip < 0 ) throw BufferSizeExceededException( @@ -671,7 +590,7 @@ void OMarkableInputStream::skipBytes(sal_Int32 nBytesToSkip) readBytes( seqDummy , nBytesToSkip ); } -sal_Int32 OMarkableInputStream::available() throw (NotConnectedException, RuntimeException, std::exception) +sal_Int32 OMarkableInputStream::available() { sal_Int32 nAvail; if( m_bValidStream ) { @@ -689,7 +608,7 @@ sal_Int32 OMarkableInputStream::available() throw (NotConnectedException, Runtim } -void OMarkableInputStream::closeInput() throw (NotConnectedException, RuntimeException, std::exception) +void OMarkableInputStream::closeInput() { if( m_bValidStream ) { MutexGuard guard( m_mutex ); @@ -714,7 +633,7 @@ void OMarkableInputStream::closeInput() throw (NotConnectedException, RuntimeExc // XMarkable -sal_Int32 OMarkableInputStream::createMark() throw (IOException, RuntimeException, std::exception) +sal_Int32 OMarkableInputStream::createMark() { MutexGuard guard( m_mutex ); sal_Int32 nMark = m_nCurrentMark; @@ -725,7 +644,7 @@ sal_Int32 OMarkableInputStream::createMark() throw (IOException, Runt return nMark; } -void OMarkableInputStream::deleteMark(sal_Int32 Mark) throw (IOException, IllegalArgumentException, RuntimeException, std::exception) +void OMarkableInputStream::deleteMark(sal_Int32 Mark) { MutexGuard guard( m_mutex ); map<sal_Int32,sal_Int32,less<sal_Int32> >::iterator ii = m_mapMarks.find( Mark ); @@ -744,9 +663,6 @@ void OMarkableInputStream::deleteMark(sal_Int32 Mark) throw (IOException, } void OMarkableInputStream::jumpToMark(sal_Int32 nMark) - throw (IOException, - IllegalArgumentException, - RuntimeException, std::exception) { MutexGuard guard( m_mutex ); map<sal_Int32,sal_Int32,less<sal_Int32> >::iterator ii = m_mapMarks.find( nMark ); @@ -765,7 +681,7 @@ void OMarkableInputStream::jumpToMark(sal_Int32 nMark) } } -void OMarkableInputStream::jumpToFurthest() throw (IOException, RuntimeException, std::exception) +void OMarkableInputStream::jumpToFurthest() { MutexGuard guard( m_mutex ); m_nCurrentPos = m_pBuffer->getSize(); @@ -773,9 +689,6 @@ void OMarkableInputStream::jumpToFurthest() throw (IOException, RuntimeE } sal_Int32 OMarkableInputStream::offsetToMark(sal_Int32 nMark) - throw (IOException, - IllegalArgumentException, - RuntimeException, std::exception) { MutexGuard guard( m_mutex ); map<sal_Int32,sal_Int32,less<sal_Int32> >::const_iterator ii = m_mapMarks.find( nMark ); @@ -794,7 +707,6 @@ sal_Int32 OMarkableInputStream::offsetToMark(sal_Int32 nMark) // XActiveDataSource void OMarkableInputStream::setInputStream(const Reference< XInputStream > & aStream) - throw (RuntimeException, std::exception) { if( m_input != aStream ) { @@ -808,7 +720,7 @@ void OMarkableInputStream::setInputStream(const Reference< XInputStream > & aStr } -Reference< XInputStream > OMarkableInputStream::getInputStream() throw (RuntimeException, std::exception) +Reference< XInputStream > OMarkableInputStream::getInputStream() { return m_input; } @@ -816,7 +728,6 @@ Reference< XInputStream > OMarkableInputStream::getInputStream() throw (RuntimeE // XDataSink void OMarkableInputStream::setSuccessor( const Reference< XConnectable > &r ) - throw (RuntimeException, std::exception) { /// if the references match, nothing needs to be done if( m_succ != r ) { @@ -831,7 +742,7 @@ void OMarkableInputStream::setSuccessor( const Reference< XConnectable > &r ) } } -Reference < XConnectable > OMarkableInputStream::getSuccessor() throw (RuntimeException, std::exception) +Reference < XConnectable > OMarkableInputStream::getSuccessor() { return m_succ; } @@ -839,7 +750,6 @@ Reference < XConnectable > OMarkableInputStream::getSuccessor() throw (RuntimeE // XDataSource void OMarkableInputStream::setPredecessor( const Reference < XConnectable > &r ) - throw (RuntimeException, std::exception) { if( r != m_pred ) { m_pred = r; @@ -849,7 +759,7 @@ void OMarkableInputStream::setPredecessor( const Reference < XConnectable > &r } } } -Reference< XConnectable > OMarkableInputStream::getPredecessor() throw (RuntimeException, std::exception) +Reference< XConnectable > OMarkableInputStream::getPredecessor() { return m_pred; } @@ -884,19 +794,19 @@ void OMarkableInputStream::checkMarksAndFlush() } // XServiceInfo -OUString OMarkableInputStream::getImplementationName() throw (std::exception) +OUString OMarkableInputStream::getImplementationName() { return OMarkableInputStream_getImplementationName(); } // XServiceInfo -sal_Bool OMarkableInputStream::supportsService(const OUString& ServiceName) throw (std::exception) +sal_Bool OMarkableInputStream::supportsService(const OUString& ServiceName) { return cppu::supportsService(this, ServiceName); } // XServiceInfo -Sequence< OUString > OMarkableInputStream::getSupportedServiceNames() throw (std::exception) +Sequence< OUString > OMarkableInputStream::getSupportedServiceNames() { return OMarkableInputStream_getSupportedServiceNames(); } @@ -908,7 +818,6 @@ Sequence< OUString > OMarkableInputStream::getSupportedServiceNames() throw (std *------------------------*/ Reference < XInterface > SAL_CALL OMarkableInputStream_CreateInstance( SAL_UNUSED_PARAMETER const Reference < XComponentContext > & ) - throw(Exception) { OMarkableInputStream *p = new OMarkableInputStream( ); return Reference< XInterface > ( static_cast<OWeakObject *>(p) ); diff --git a/io/source/stm/opipe.cxx b/io/source/stm/opipe.cxx index 4d70e6709ad3..abba00fa8bad 100644 --- a/io/source/stm/opipe.cxx +++ b/io/source/stm/opipe.cxx @@ -58,53 +58,29 @@ public: OPipeImpl( ); public: // XInputStream - virtual sal_Int32 SAL_CALL readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) - throw( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception ) override; - virtual sal_Int32 SAL_CALL readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) - throw( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception ) override; - virtual void SAL_CALL skipBytes(sal_Int32 nBytesToSkip) - throw( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception ) override; - virtual sal_Int32 SAL_CALL available() - throw( NotConnectedException, - RuntimeException, std::exception ) override; - virtual void SAL_CALL closeInput() - throw( NotConnectedException, - RuntimeException, std::exception ) override; + virtual sal_Int32 SAL_CALL readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) override; + virtual sal_Int32 SAL_CALL readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) override; + virtual void SAL_CALL skipBytes(sal_Int32 nBytesToSkip) override; + virtual sal_Int32 SAL_CALL available() override; + virtual void SAL_CALL closeInput() override; public: // XOutputStream - virtual void SAL_CALL writeBytes(const Sequence< sal_Int8 >& aData) - throw( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception ) override; - virtual void SAL_CALL flush() - throw( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception ) override; - virtual void SAL_CALL closeOutput() - throw( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception ) override; + virtual void SAL_CALL writeBytes(const Sequence< sal_Int8 >& aData) override; + virtual void SAL_CALL flush() override; + virtual void SAL_CALL closeOutput() override; public: // XConnectable - virtual void SAL_CALL setPredecessor(const Reference< XConnectable >& aPredecessor) - throw( RuntimeException, std::exception ) override; - virtual Reference< XConnectable > SAL_CALL getPredecessor() throw( RuntimeException, std::exception ) override; - virtual void SAL_CALL setSuccessor(const Reference < XConnectable > & aSuccessor) - throw( RuntimeException, std::exception ) override; - virtual Reference < XConnectable > SAL_CALL getSuccessor() throw( RuntimeException, std::exception ) override ; + virtual void SAL_CALL setPredecessor(const Reference< XConnectable >& aPredecessor) override; + virtual Reference< XConnectable > SAL_CALL getPredecessor() override; + virtual void SAL_CALL setSuccessor(const Reference < XConnectable > & aSuccessor) override; + virtual Reference < XConnectable > SAL_CALL getSuccessor() override ; public: // XServiceInfo - OUString SAL_CALL getImplementationName() throw(std::exception ) override; - Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(std::exception ) override; - sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(std::exception ) override; + OUString SAL_CALL getImplementationName() override; + Sequence< OUString > SAL_CALL getSupportedServiceNames() override; + sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; private: @@ -133,7 +109,6 @@ OPipeImpl::OPipeImpl() sal_Int32 OPipeImpl::readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) - throw( NotConnectedException, BufferSizeExceededException,RuntimeException, std::exception ) { while( true ) { @@ -171,9 +146,6 @@ sal_Int32 OPipeImpl::readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRe sal_Int32 OPipeImpl::readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) - throw( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception ) { while( true ) { { @@ -205,9 +177,6 @@ sal_Int32 OPipeImpl::readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBy void OPipeImpl::skipBytes(sal_Int32 nBytesToSkip) - throw( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception ) { MutexGuard guard( m_mutexAccess ); if( m_bInputStreamClosed ) @@ -234,8 +203,6 @@ void OPipeImpl::skipBytes(sal_Int32 nBytesToSkip) sal_Int32 OPipeImpl::available() - throw( NotConnectedException, - RuntimeException, std::exception ) { MutexGuard guard( m_mutexAccess ); if( m_bInputStreamClosed ) @@ -248,8 +215,6 @@ sal_Int32 OPipeImpl::available() } void OPipeImpl::closeInput() - throw( NotConnectedException, - RuntimeException, std::exception) { MutexGuard guard( m_mutexAccess ); @@ -266,9 +231,6 @@ void OPipeImpl::closeInput() void OPipeImpl::writeBytes(const Sequence< sal_Int8 >& aData) - throw( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) { MutexGuard guard( m_mutexAccess ); @@ -313,18 +275,12 @@ void OPipeImpl::writeBytes(const Sequence< sal_Int8 >& aData) void OPipeImpl::flush() - throw( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) { // nothing to do for a pipe return; } void OPipeImpl::closeOutput() - throw( NotConnectedException, - BufferSizeExceededException, - RuntimeException, std::exception) { MutexGuard guard( m_mutexAccess ); @@ -336,7 +292,6 @@ void OPipeImpl::closeOutput() void OPipeImpl::setSuccessor( const Reference < XConnectable > &r ) - throw( RuntimeException, std::exception ) { /// if the references match, nothing needs to be done if( m_succ != r ) { @@ -351,7 +306,7 @@ void OPipeImpl::setSuccessor( const Reference < XConnectable > &r ) } } -Reference < XConnectable > OPipeImpl::getSuccessor() throw( RuntimeException, std::exception ) +Reference < XConnectable > OPipeImpl::getSuccessor() { return m_succ; } @@ -359,7 +314,6 @@ Reference < XConnectable > OPipeImpl::getSuccessor() throw( RuntimeException, // XDataSource void OPipeImpl::setPredecessor( const Reference < XConnectable > &r ) - throw( RuntimeException, std::exception ) { if( r != m_pred ) { m_pred = r; @@ -370,26 +324,26 @@ void OPipeImpl::setPredecessor( const Reference < XConnectable > &r ) } } -Reference < XConnectable > OPipeImpl::getPredecessor() throw( RuntimeException, std::exception ) +Reference < XConnectable > OPipeImpl::getPredecessor() { return m_pred; } // XServiceInfo -OUString OPipeImpl::getImplementationName() throw(std::exception ) +OUString OPipeImpl::getImplementationName() { return OPipeImpl_getImplementationName(); } // XServiceInfo -sal_Bool OPipeImpl::supportsService(const OUString& ServiceName) throw(std::exception ) +sal_Bool OPipeImpl::supportsService(const OUString& ServiceName) { return cppu::supportsService(this, ServiceName); } // XServiceInfo -Sequence< OUString > OPipeImpl::getSupportedServiceNames() throw(std::exception ) +Sequence< OUString > OPipeImpl::getSupportedServiceNames() { return OPipeImpl_getSupportedServiceNames(); } @@ -402,7 +356,6 @@ Sequence< OUString > OPipeImpl::getSupportedServiceNames() throw(std::exception Reference < XInterface > SAL_CALL OPipeImpl_CreateInstance( SAL_UNUSED_PARAMETER const Reference < XComponentContext > & ) - throw(Exception) { OPipeImpl *p = new OPipeImpl; diff --git a/io/source/stm/opump.cxx b/io/source/stm/opump.cxx index 147ba94be334..26ecb927e497 100644 --- a/io/source/stm/opump.cxx +++ b/io/source/stm/opump.cxx @@ -80,29 +80,29 @@ namespace io_stm { virtual ~Pump() override; // XActiveDataSource - virtual void SAL_CALL setOutputStream( const Reference< css::io::XOutputStream >& xOutput ) throw(std::exception) override; - virtual Reference< css::io::XOutputStream > SAL_CALL getOutputStream() throw(std::exception) override; + virtual void SAL_CALL setOutputStream( const Reference< css::io::XOutputStream >& xOutput ) override; + virtual Reference< css::io::XOutputStream > SAL_CALL getOutputStream() override; // XActiveDataSink - virtual void SAL_CALL setInputStream( const Reference< css::io::XInputStream >& xStream ) throw(std::exception) override; - virtual Reference< css::io::XInputStream > SAL_CALL getInputStream() throw(std::exception) override; + virtual void SAL_CALL setInputStream( const Reference< css::io::XInputStream >& xStream ) override; + virtual Reference< css::io::XInputStream > SAL_CALL getInputStream() override; // XActiveDataControl - virtual void SAL_CALL addListener( const Reference< css::io::XStreamListener >& xListener ) throw(std::exception) override; - virtual void SAL_CALL removeListener( const Reference< css::io::XStreamListener >& xListener ) throw(std::exception) override; - virtual void SAL_CALL start() throw( RuntimeException, std::exception ) override; - virtual void SAL_CALL terminate() throw(std::exception) override; + virtual void SAL_CALL addListener( const Reference< css::io::XStreamListener >& xListener ) override; + virtual void SAL_CALL removeListener( const Reference< css::io::XStreamListener >& xListener ) override; + virtual void SAL_CALL start() override; + virtual void SAL_CALL terminate() override; // XConnectable - virtual void SAL_CALL setPredecessor( const Reference< css::io::XConnectable >& xPred ) throw(std::exception) override; - virtual Reference< css::io::XConnectable > SAL_CALL getPredecessor() throw(std::exception) override; - virtual void SAL_CALL setSuccessor( const Reference< css::io::XConnectable >& xSucc ) throw(std::exception) override; - virtual Reference< css::io::XConnectable > SAL_CALL getSuccessor() throw(std::exception) override; + virtual void SAL_CALL setPredecessor( const Reference< css::io::XConnectable >& xPred ) override; + virtual Reference< css::io::XConnectable > SAL_CALL getPredecessor() override; + virtual void SAL_CALL setSuccessor( const Reference< css::io::XConnectable >& xSucc ) override; + virtual Reference< css::io::XConnectable > SAL_CALL getSuccessor() override; public: // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw(std::exception ) override; - virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(std::exception ) override; - virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(std::exception ) override; + virtual OUString SAL_CALL getImplementationName() override; + virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() override; + virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; }; Pump::Pump() : m_aThread( nullptr ), @@ -304,28 +304,28 @@ void Pump::run() * XConnectable */ -void Pump::setPredecessor( const Reference< XConnectable >& xPred ) throw(std::exception) +void Pump::setPredecessor( const Reference< XConnectable >& xPred ) { Guard< Mutex > aGuard( m_aMutex ); m_xPred = xPred; } -Reference< XConnectable > Pump::getPredecessor() throw(std::exception) +Reference< XConnectable > Pump::getPredecessor() { Guard< Mutex > aGuard( m_aMutex ); return m_xPred; } -void Pump::setSuccessor( const Reference< XConnectable >& xSucc ) throw(std::exception) +void Pump::setSuccessor( const Reference< XConnectable >& xSucc ) { Guard< Mutex > aGuard( m_aMutex ); m_xSucc = xSucc; } -Reference< XConnectable > Pump::getSuccessor() throw(std::exception) +Reference< XConnectable > Pump::getSuccessor() { Guard< Mutex > aGuard( m_aMutex ); return m_xSucc; @@ -336,19 +336,19 @@ Reference< XConnectable > Pump::getSuccessor() throw(std::exception) * XActiveDataControl */ -void Pump::addListener( const Reference< XStreamListener >& xListener ) throw(std::exception) +void Pump::addListener( const Reference< XStreamListener >& xListener ) { m_cnt.addInterface( xListener ); } -void Pump::removeListener( const Reference< XStreamListener >& xListener ) throw(std::exception) +void Pump::removeListener( const Reference< XStreamListener >& xListener ) { m_cnt.removeInterface( xListener ); } -void Pump::start() throw( RuntimeException, std::exception ) +void Pump::start() { Guard< Mutex > aGuard( m_aMutex ); m_aThread = osl_createSuspendedThread(Pump::static_run,this); @@ -367,7 +367,7 @@ void Pump::start() throw( RuntimeException, std::exception ) } -void Pump::terminate() throw(std::exception) +void Pump::terminate() { close(); @@ -384,7 +384,7 @@ void Pump::terminate() throw(std::exception) * XActiveDataSink */ -void Pump::setInputStream( const Reference< XInputStream >& xStream ) throw(std::exception) +void Pump::setInputStream( const Reference< XInputStream >& xStream ) { Guard< Mutex > aGuard( m_aMutex ); m_xInput = xStream; @@ -395,7 +395,7 @@ void Pump::setInputStream( const Reference< XInputStream >& xStream ) throw(std: } -Reference< XInputStream > Pump::getInputStream() throw(std::exception) +Reference< XInputStream > Pump::getInputStream() { Guard< Mutex > aGuard( m_aMutex ); return m_xInput; @@ -406,7 +406,7 @@ Reference< XInputStream > Pump::getInputStream() throw(std::exception) * XActiveDataSource */ -void Pump::setOutputStream( const Reference< XOutputStream >& xOut ) throw(std::exception) +void Pump::setOutputStream( const Reference< XOutputStream >& xOut ) { Guard< Mutex > aGuard( m_aMutex ); m_xOutput = xOut; @@ -416,26 +416,26 @@ void Pump::setOutputStream( const Reference< XOutputStream >& xOut ) throw(std:: // data transfer starts in XActiveDataControl::start } -Reference< XOutputStream > Pump::getOutputStream() throw(std::exception) +Reference< XOutputStream > Pump::getOutputStream() { Guard< Mutex > aGuard( m_aMutex ); return m_xOutput; } // XServiceInfo -OUString Pump::getImplementationName() throw(std::exception ) +OUString Pump::getImplementationName() { return OPumpImpl_getImplementationName(); } // XServiceInfo -sal_Bool Pump::supportsService(const OUString& ServiceName) throw(std::exception ) +sal_Bool Pump::supportsService(const OUString& ServiceName) { return cppu::supportsService(this, ServiceName); } // XServiceInfo -Sequence< OUString > Pump::getSupportedServiceNames() throw(std::exception ) +Sequence< OUString > Pump::getSupportedServiceNames() { return OPumpImpl_getSupportedServiceNames(); } @@ -443,7 +443,6 @@ Sequence< OUString > Pump::getSupportedServiceNames() throw(std::exception ) Reference< XInterface > SAL_CALL OPumpImpl_CreateInstance( SAL_UNUSED_PARAMETER const Reference< XComponentContext > & ) - throw (Exception) { return Reference< XInterface >( *new Pump ); } diff --git a/io/source/stm/streamhelper.cxx b/io/source/stm/streamhelper.cxx index ac06afae1529..efe53dcc42ab 100644 --- a/io/source/stm/streamhelper.cxx +++ b/io/source/stm/streamhelper.cxx @@ -33,18 +33,17 @@ using namespace ::com::sun::star::uno; namespace io_stm { void MemFIFO::write( const Sequence< sal_Int8 > &seq ) - throw ( css::io::BufferSizeExceededException ) { writeAt(getSize(), seq); } -void MemFIFO::read( Sequence<sal_Int8> &seq , sal_Int32 nBufferLen ) throw (css::io::BufferSizeExceededException) +void MemFIFO::read( Sequence<sal_Int8> &seq , sal_Int32 nBufferLen ) { readAt(0, seq , nBufferLen); forgetFromStart( nBufferLen ); } -void MemFIFO::skip( sal_Int32 nBytesToSkip ) throw ( css::io::BufferSizeExceededException ) +void MemFIFO::skip( sal_Int32 nBytesToSkip ) { forgetFromStart( nBytesToSkip ); } @@ -64,7 +63,7 @@ MemRingBuffer::~MemRingBuffer() } } -void MemRingBuffer::resizeBuffer( sal_Int32 nMinSize ) throw(css::io::BufferSizeExceededException) +void MemRingBuffer::resizeBuffer( sal_Int32 nMinSize ) { sal_Int32 nNewLen = 1; @@ -94,7 +93,6 @@ void MemRingBuffer::resizeBuffer( sal_Int32 nMinSize ) throw(css::io::BufferSize void MemRingBuffer::readAt( sal_Int32 nPos, Sequence<sal_Int8> &seq , sal_Int32 nBytesToRead ) const - throw(css::io::BufferSizeExceededException) { if( nPos + nBytesToRead > m_nOccupiedBuffer ) { throw css::io::BufferSizeExceededException( @@ -120,7 +118,6 @@ void MemRingBuffer::readAt( sal_Int32 nPos, Sequence<sal_Int8> &seq , sal_Int32 void MemRingBuffer::writeAt( sal_Int32 nPos, const Sequence<sal_Int8> &seq ) - throw (css::io::BufferSizeExceededException) { checkInvariants(); sal_Int32 nLen = seq.getLength(); @@ -161,7 +158,7 @@ sal_Int32 MemRingBuffer::getSize() const throw() return m_nOccupiedBuffer; } -void MemRingBuffer::forgetFromStart( sal_Int32 nBytesToForget ) throw (css::io::BufferSizeExceededException) +void MemRingBuffer::forgetFromStart( sal_Int32 nBytesToForget ) { checkInvariants(); if( nBytesToForget > m_nOccupiedBuffer ) { diff --git a/io/source/stm/streamhelper.hxx b/io/source/stm/streamhelper.hxx index d175b46c9764..17d12210e32c 100644 --- a/io/source/stm/streamhelper.hxx +++ b/io/source/stm/streamhelper.hxx @@ -41,18 +41,16 @@ public: * data is written beyond end. ***/ /// @throws css::io::BufferSizeExceededException - void writeAt( sal_Int32 nPos, const Sequence<sal_Int8> &) - throw(css::io::BufferSizeExceededException); + void writeAt( sal_Int32 nPos, const Sequence<sal_Int8> &); /// @throws css::io::BufferSizeExceededException - void readAt( sal_Int32 nPos, Sequence<sal_Int8> & , sal_Int32 nBytesToRead ) const - throw(css::io::BufferSizeExceededException); + void readAt( sal_Int32 nPos, Sequence<sal_Int8> & , sal_Int32 nBytesToRead ) const; sal_Int32 getSize() const throw(); /// @throws css::io::BufferSizeExceededException - void forgetFromStart(sal_Int32 nBytesToForget) throw(css::io::BufferSizeExceededException); + void forgetFromStart(sal_Int32 nBytesToForget); private: /// @throws css::io::BufferSizeExceededException - void resizeBuffer(sal_Int32 nMinSize) throw(css::io::BufferSizeExceededException); + void resizeBuffer(sal_Int32 nMinSize); inline void checkInvariants() { assert( m_nBufferLen >= 0 ); assert( m_nOccupiedBuffer >= 0 ); @@ -74,14 +72,11 @@ class MemFIFO : { public: /// @throws css::io::BufferSizeExceededException - void write( const Sequence<sal_Int8> &) - throw( css::io::BufferSizeExceededException ); + void write( const Sequence<sal_Int8> &); /// @throws css::io::BufferSizeExceededException - void read( Sequence<sal_Int8> & , sal_Int32 nBytesToRead ) - throw( css::io::BufferSizeExceededException ); + void read( Sequence<sal_Int8> & , sal_Int32 nBytesToRead ); /// @throws css::io::BufferSizeExceededException - void skip( sal_Int32 nBytesToSkip ) - throw( css::io::BufferSizeExceededException ); + void skip( sal_Int32 nBytesToSkip ); sal_Int32 getSize() const throw() { return MemRingBuffer::getSize(); } |