summaryrefslogtreecommitdiff
path: root/unotools/source/ucbhelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-01-26 12:28:58 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-01-26 12:54:43 +0000
commite57ca02849c3d87142ff5ff9099a212e72b8139c (patch)
treebcce66b27261553c308779f3e8663a269ed3a671 /unotools/source/ucbhelper
parent8802ebd5172ec4bc412a59d136c82b77ab452281 (diff)
Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'unotools/source/ucbhelper')
-rw-r--r--unotools/source/ucbhelper/XTempFile.hxx60
-rw-r--r--unotools/source/ucbhelper/progresshandlerwrap.cxx3
-rw-r--r--unotools/source/ucbhelper/ucblockbytes.cxx70
-rw-r--r--unotools/source/ucbhelper/xtempfile.cxx20
4 files changed, 41 insertions, 112 deletions
diff --git a/unotools/source/ucbhelper/XTempFile.hxx b/unotools/source/ucbhelper/XTempFile.hxx
index 38b38167547b..43150b675f07 100644
--- a/unotools/source/ucbhelper/XTempFile.hxx
+++ b/unotools/source/ucbhelper/XTempFile.hxx
@@ -63,59 +63,39 @@ public:
//Methods
// XInterface
- virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType )
- throw (css::uno::RuntimeException, std::exception) override;
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
virtual void SAL_CALL acquire( )
throw () override;
virtual void SAL_CALL release( )
throw () override;
// XTypeProvider
- virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( )
- throw (css::uno::RuntimeException, std::exception) override;
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
// XTempFile
- virtual sal_Bool SAL_CALL getRemoveFile()
- throw (css::uno::RuntimeException, std::exception) override;
- virtual void SAL_CALL setRemoveFile( sal_Bool _removefile )
- throw (css::uno::RuntimeException, std::exception) override;
- virtual OUString SAL_CALL getUri()
- throw (css::uno::RuntimeException, std::exception) override;
- virtual OUString SAL_CALL getResourceName()
- throw (css::uno::RuntimeException, std::exception) override;
+ virtual sal_Bool SAL_CALL getRemoveFile() override;
+ virtual void SAL_CALL setRemoveFile( sal_Bool _removefile ) override;
+ virtual OUString SAL_CALL getUri() override;
+ virtual OUString SAL_CALL getResourceName() override;
// XInputStream
- virtual ::sal_Int32 SAL_CALL readBytes( css::uno::Sequence< ::sal_Int8 >& aData, ::sal_Int32 nBytesToRead )
- throw (css::io::NotConnectedException, css::io::BufferSizeExceededException, css::io::IOException, css::uno::RuntimeException, std::exception) override;
- virtual ::sal_Int32 SAL_CALL readSomeBytes( css::uno::Sequence< ::sal_Int8 >& aData, ::sal_Int32 nMaxBytesToRead )
- throw (css::io::NotConnectedException, css::io::BufferSizeExceededException, css::io::IOException, css::uno::RuntimeException, std::exception) override;
- virtual void SAL_CALL skipBytes( ::sal_Int32 nBytesToSkip )
- throw (css::io::NotConnectedException, css::io::BufferSizeExceededException, css::io::IOException, css::uno::RuntimeException, std::exception) override;
- virtual ::sal_Int32 SAL_CALL available( )
- throw (css::io::NotConnectedException, css::io::IOException, css::uno::RuntimeException, std::exception) override;
- virtual void SAL_CALL closeInput( )
- throw (css::io::NotConnectedException, css::io::IOException, css::uno::RuntimeException, std::exception) override;
+ virtual ::sal_Int32 SAL_CALL readBytes( css::uno::Sequence< ::sal_Int8 >& aData, ::sal_Int32 nBytesToRead ) override;
+ virtual ::sal_Int32 SAL_CALL readSomeBytes( css::uno::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;
// XOutputStream
- virtual void SAL_CALL writeBytes( const css::uno::Sequence< ::sal_Int8 >& aData )
- throw (css::io::NotConnectedException, css::io::BufferSizeExceededException, css::io::IOException, css::uno::RuntimeException, std::exception) override;
- virtual void SAL_CALL flush( )
- throw (css::io::NotConnectedException, css::io::BufferSizeExceededException, css::io::IOException, css::uno::RuntimeException, std::exception) override;
- virtual void SAL_CALL closeOutput( )
- throw (css::io::NotConnectedException, css::io::BufferSizeExceededException, css::io::IOException, css::uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL writeBytes( const css::uno::Sequence< ::sal_Int8 >& aData ) override;
+ virtual void SAL_CALL flush( ) override;
+ virtual void SAL_CALL closeOutput( ) override;
// XSeekable
- virtual void SAL_CALL seek( sal_Int64 location )
- throw (css::lang::IllegalArgumentException, css::io::IOException, css::uno::RuntimeException, std::exception) override;
- virtual sal_Int64 SAL_CALL getPosition( )
- throw (css::io::IOException, css::uno::RuntimeException, std::exception) override;
- virtual sal_Int64 SAL_CALL getLength( )
- throw (css::io::IOException, css::uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL seek( sal_Int64 location ) override;
+ virtual sal_Int64 SAL_CALL getPosition( ) override;
+ virtual sal_Int64 SAL_CALL getLength( ) override;
// XStream
- virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getInputStream( )
- throw (css::uno::RuntimeException, std::exception) override;
- virtual css::uno::Reference< css::io::XOutputStream > SAL_CALL getOutputStream( )
- throw (css::uno::RuntimeException, std::exception) override;
+ virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getInputStream( ) override;
+ virtual css::uno::Reference< css::io::XOutputStream > SAL_CALL getOutputStream( ) override;
// XTruncate
- virtual void SAL_CALL truncate()
- throw (css::io::IOException, css::uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL truncate() override;
virtual ~OTempFileService () override;
};
diff --git a/unotools/source/ucbhelper/progresshandlerwrap.cxx b/unotools/source/ucbhelper/progresshandlerwrap.cxx
index f3edf6185dfd..05e6a6131518 100644
--- a/unotools/source/ucbhelper/progresshandlerwrap.cxx
+++ b/unotools/source/ucbhelper/progresshandlerwrap.cxx
@@ -49,7 +49,6 @@ bool getStatusFromAny_Impl( const Any& aAny, OUString& aText, sal_Int32& nNum )
}
void SAL_CALL ProgressHandlerWrap::push( const Any& Status )
- throw( RuntimeException, std::exception )
{
if( !m_xStatusIndicator.is() )
return;
@@ -62,7 +61,6 @@ void SAL_CALL ProgressHandlerWrap::push( const Any& Status )
}
void SAL_CALL ProgressHandlerWrap::update( const Any& Status )
- throw( RuntimeException, std::exception )
{
if( !m_xStatusIndicator.is() )
return;
@@ -78,7 +76,6 @@ void SAL_CALL ProgressHandlerWrap::update( const Any& Status )
}
void SAL_CALL ProgressHandlerWrap::pop()
- throw( RuntimeException, std::exception )
{
if( m_xStatusIndicator.is() )
m_xStatusIndicator->end();
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index bb885a3482ee..8c302d82b4af 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -79,16 +79,16 @@ public:
{}
// XActiveDataControl.
- virtual void SAL_CALL addListener ( const Reference<XStreamListener> &/*rxListener*/) throw(RuntimeException, std::exception) override {}
- virtual void SAL_CALL removeListener ( const Reference<XStreamListener> &/*rxListener*/) throw(RuntimeException, std::exception) override {}
- virtual void SAL_CALL start() throw(RuntimeException, std::exception) override {}
- virtual void SAL_CALL terminate() throw(RuntimeException, std::exception) override
+ virtual void SAL_CALL addListener ( const Reference<XStreamListener> &/*rxListener*/) override {}
+ virtual void SAL_CALL removeListener ( const Reference<XStreamListener> &/*rxListener*/) override {}
+ virtual void SAL_CALL start() override {}
+ virtual void SAL_CALL terminate() override
{ m_xLockBytes->terminate_Impl(); }
// XActiveDataSink.
- virtual void SAL_CALL setInputStream ( const Reference<XInputStream> &rxInputStream) throw(RuntimeException, std::exception) override
+ virtual void SAL_CALL setInputStream ( const Reference<XInputStream> &rxInputStream) override
{ m_xLockBytes->setInputStream_Impl (rxInputStream); }
- virtual Reference<XInputStream> SAL_CALL getInputStream() throw(RuntimeException, std::exception) override
+ virtual Reference<XInputStream> SAL_CALL getInputStream() override
{ return m_xLockBytes->getInputStream_Impl(); }
};
@@ -106,16 +106,16 @@ public:
{}
// XActiveDataControl.
- virtual void SAL_CALL addListener ( const Reference<XStreamListener> &/*rxListener*/) throw(RuntimeException, std::exception) override {}
- virtual void SAL_CALL removeListener ( const Reference<XStreamListener> &/*rxListener*/) throw(RuntimeException, std::exception) override {}
- virtual void SAL_CALL start() throw(RuntimeException, std::exception) override {}
- virtual void SAL_CALL terminate() throw(RuntimeException, std::exception) override
+ virtual void SAL_CALL addListener ( const Reference<XStreamListener> &/*rxListener*/) override {}
+ virtual void SAL_CALL removeListener ( const Reference<XStreamListener> &/*rxListener*/) override {}
+ virtual void SAL_CALL start() override {}
+ virtual void SAL_CALL terminate() override
{ m_xLockBytes->terminate_Impl(); }
// XActiveDataStreamer
- virtual void SAL_CALL setStream( const Reference< XStream >& aStream ) throw(RuntimeException, std::exception) override
+ virtual void SAL_CALL setStream( const Reference< XStream >& aStream ) override
{ m_xStream = aStream; m_xLockBytes->setStream_Impl( aStream ); }
- virtual Reference< XStream > SAL_CALL getStream() throw(RuntimeException, std::exception) override
+ virtual Reference< XStream > SAL_CALL getStream() override
{ return m_xStream; }
};
@@ -134,10 +134,10 @@ public:
, m_xProgressHandler( rxProgressHandler )
{}
- virtual Reference<XInteractionHandler> SAL_CALL getInteractionHandler() throw (RuntimeException, std::exception) override
+ virtual Reference<XInteractionHandler> SAL_CALL getInteractionHandler() override
{ return m_xInteractionHandler; }
- virtual Reference<XProgressHandler> SAL_CALL getProgressHandler() throw (RuntimeException, std::exception) override
+ virtual Reference<XProgressHandler> SAL_CALL getProgressHandler() override
{ return m_xProgressHandler; }
};
@@ -153,11 +153,11 @@ public:
: m_xLockBytes( rRef )
{}
- virtual void SAL_CALL disposing ( const EventObject &/*rEvent*/) throw(RuntimeException, std::exception) override {}
- virtual void SAL_CALL propertiesChange ( const Sequence<PropertyChangeEvent> &rEvent) throw(RuntimeException, std::exception) override;
+ virtual void SAL_CALL disposing ( const EventObject &/*rEvent*/) override {}
+ virtual void SAL_CALL propertiesChange ( const Sequence<PropertyChangeEvent> &rEvent) override;
};
-void SAL_CALL UcbPropertiesChangeListener_Impl::propertiesChange ( const Sequence<PropertyChangeEvent> &rEvent) throw(RuntimeException, std::exception)
+void SAL_CALL UcbPropertiesChangeListener_Impl::propertiesChange ( const Sequence<PropertyChangeEvent> &rEvent)
{
sal_Int32 i, n = rEvent.getLength();
for (i = 0; i < n; i++)
@@ -225,11 +225,7 @@ public:
Reference < XContent > const & xContent,
Reference < XInteractionHandler > const & xInteract,
const Command& rArg
- )
- throw(
- ContentCreationException,
- RuntimeException
- );
+ );
enum ResultType {
NORESULT,
@@ -345,16 +341,11 @@ public:
virtual void SAL_CALL
setStream(
const Reference< XStream >& aStream
- )
- throw(
- RuntimeException, std::exception
- ) override;
+ ) override;
virtual Reference<XStream> SAL_CALL
getStream (
void
- ) throw(
- RuntimeException, std::exception
) override
{
osl::MutexGuard aGuard(m_aMutex);
@@ -379,16 +370,11 @@ public:
virtual void SAL_CALL
setInputStream (
const Reference<XInputStream> &rxInputStream
- )
- throw(
- RuntimeException, std::exception
- ) override;
+ ) override;
virtual Reference<XInputStream> SAL_CALL
getInputStream (
void
- ) throw(
- RuntimeException, std::exception
) override
{
osl::MutexGuard aGuard(m_aMutex);
@@ -411,9 +397,6 @@ void SAL_CALL
ModeratorsActiveDataSink::setInputStream (
const Reference<XInputStream> &rxInputStream
)
- throw(
- RuntimeException, std::exception
- )
{
m_aModerator.setInputStream(rxInputStream);
osl::MutexGuard aGuard(m_aMutex);
@@ -432,9 +415,6 @@ void SAL_CALL
ModeratorsActiveDataStreamer::setStream (
const Reference<XStream> &rxStream
)
- throw(
- RuntimeException, std::exception
- )
{
m_aModerator.setStream(rxStream);
osl::MutexGuard aGuard(m_aMutex);
@@ -449,8 +429,7 @@ public:
explicit ModeratorsInteractionHandler(Moderator &theModerator);
virtual void SAL_CALL
- handle( const Reference<XInteractionRequest >& Request )
- throw (RuntimeException, std::exception) override;
+ handle( const Reference<XInteractionRequest >& Request ) override;
private:
@@ -467,9 +446,6 @@ void SAL_CALL
ModeratorsInteractionHandler::handle(
const Reference<XInteractionRequest >& Request
)
- throw (
- RuntimeException, std::exception
- )
{
// wakes up the mainthread
m_aModerator.handle(Request);
@@ -480,10 +456,6 @@ Moderator::Moderator(
Reference < XInteractionHandler > const & xInteract,
const Command& rArg
)
- throw(
- css::ucb::ContentCreationException,
- css::uno::RuntimeException
- )
: m_aMutex(),
m_aRes(m_aMutex,*this),
diff --git a/unotools/source/ucbhelper/xtempfile.cxx b/unotools/source/ucbhelper/xtempfile.cxx
index bcf247ad4696..ac5cfc707dcd 100644
--- a/unotools/source/ucbhelper/xtempfile.cxx
+++ b/unotools/source/ucbhelper/xtempfile.cxx
@@ -51,7 +51,6 @@ OTempFileService::~OTempFileService ()
// XInterface
css::uno::Any SAL_CALL OTempFileService::queryInterface( css::uno::Type const & aType )
-throw ( css::uno::RuntimeException, std::exception )
{
css::uno::Any aResult( OTempFileBase::queryInterface( aType ) );
if (!aResult.hasValue())
@@ -72,7 +71,6 @@ throw ()
// XTypeProvider
css::uno::Sequence< css::uno::Type > SAL_CALL OTempFileService::getTypes( )
-throw ( css::uno::RuntimeException, std::exception )
{
static ::cppu::OTypeCollection* pTypeCollection = nullptr;
if ( pTypeCollection == nullptr )
@@ -93,7 +91,6 @@ throw ( css::uno::RuntimeException, std::exception )
// XTempFile
sal_Bool SAL_CALL OTempFileService::getRemoveFile()
-throw ( css::uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( maMutex );
@@ -106,7 +103,6 @@ throw ( css::uno::RuntimeException, std::exception )
return mbRemoveFile;
};
void SAL_CALL OTempFileService::setRemoveFile( sal_Bool _removefile )
-throw ( css::uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( maMutex );
@@ -120,7 +116,6 @@ throw ( css::uno::RuntimeException, std::exception )
mpTempFile->EnableKillingFile( mbRemoveFile );
};
OUString SAL_CALL OTempFileService::getUri()
-throw ( css::uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( maMutex );
@@ -133,7 +128,6 @@ throw ( css::uno::RuntimeException, std::exception )
};
OUString SAL_CALL OTempFileService::getResourceName()
-throw ( css::uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( maMutex );
@@ -148,7 +142,6 @@ throw ( css::uno::RuntimeException, std::exception )
// XInputStream
sal_Int32 SAL_CALL OTempFileService::readBytes( css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead )
-throw (css::io::NotConnectedException, css::io::BufferSizeExceededException, css::io::IOException, css::uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( maMutex );
if ( mbInClosed )
@@ -182,7 +175,6 @@ throw (css::io::NotConnectedException, css::io::BufferSizeExceededException, css
return nRead;
}
sal_Int32 SAL_CALL OTempFileService::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 )
{
::osl::MutexGuard aGuard( maMutex );
if ( mbInClosed )
@@ -203,7 +195,6 @@ throw ( css::io::NotConnectedException, css::io::BufferSizeExceededException, cs
return readBytes(aData, nMaxBytesToRead);
}
void SAL_CALL OTempFileService::skipBytes( sal_Int32 nBytesToSkip )
-throw ( css::io::NotConnectedException, css::io::BufferSizeExceededException, css::io::IOException, css::uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( maMutex );
if ( mbInClosed )
@@ -215,7 +206,6 @@ throw ( css::io::NotConnectedException, css::io::BufferSizeExceededException, cs
checkError();
}
sal_Int32 SAL_CALL OTempFileService::available( )
-throw ( css::io::NotConnectedException, css::io::IOException, css::uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( maMutex );
if ( mbInClosed )
@@ -230,7 +220,6 @@ throw ( css::io::NotConnectedException, css::io::IOException, css::uno::RuntimeE
return nAvailable;
}
void SAL_CALL OTempFileService::closeInput( )
-throw ( css::io::NotConnectedException, css::io::IOException, css::uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( maMutex );
if ( mbInClosed )
@@ -251,7 +240,6 @@ throw ( css::io::NotConnectedException, css::io::IOException, css::uno::RuntimeE
// XOutputStream
void SAL_CALL OTempFileService::writeBytes( const css::uno::Sequence< sal_Int8 >& aData )
-throw ( css::io::NotConnectedException, css::io::BufferSizeExceededException, css::io::IOException, css::uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( maMutex );
if ( mbOutClosed )
@@ -264,7 +252,6 @@ throw ( css::io::NotConnectedException, css::io::BufferSizeExceededException, cs
throw css::io::BufferSizeExceededException( OUString(),static_cast < css::uno::XWeak * > ( this ) );
}
void SAL_CALL OTempFileService::flush( )
-throw ( css::io::NotConnectedException, css::io::BufferSizeExceededException, css::io::IOException, css::uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( maMutex );
if ( mbOutClosed )
@@ -275,7 +262,6 @@ throw ( css::io::NotConnectedException, css::io::BufferSizeExceededException, cs
checkError();
}
void SAL_CALL OTempFileService::closeOutput( )
-throw ( css::io::NotConnectedException, css::io::BufferSizeExceededException, css::io::IOException, css::uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( maMutex );
if ( mbOutClosed )
@@ -337,7 +323,6 @@ void OTempFileService::checkConnected ()
// XSeekable
void SAL_CALL OTempFileService::seek( sal_Int64 nLocation )
-throw ( css::lang::IllegalArgumentException, css::io::IOException, css::uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( maMutex );
checkConnected();
@@ -348,7 +333,6 @@ throw ( css::lang::IllegalArgumentException, css::io::IOException, css::uno::Run
checkError();
}
sal_Int64 SAL_CALL OTempFileService::getPosition( )
-throw ( css::io::IOException, css::uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( maMutex );
checkConnected();
@@ -358,7 +342,6 @@ throw ( css::io::IOException, css::uno::RuntimeException, std::exception )
return (sal_Int64)nPos;
}
sal_Int64 SAL_CALL OTempFileService::getLength( )
-throw ( css::io::IOException, css::uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( maMutex );
checkConnected();
@@ -378,13 +361,11 @@ throw ( css::io::IOException, css::uno::RuntimeException, std::exception )
// XStream
css::uno::Reference< css::io::XInputStream > SAL_CALL OTempFileService::getInputStream()
-throw ( css::uno::RuntimeException, std::exception )
{
return css::uno::Reference< css::io::XInputStream >( *this, css::uno::UNO_QUERY );
}
css::uno::Reference< css::io::XOutputStream > SAL_CALL OTempFileService::getOutputStream()
-throw ( css::uno::RuntimeException, std::exception )
{
return css::uno::Reference< css::io::XOutputStream >( *this, css::uno::UNO_QUERY );
}
@@ -392,7 +373,6 @@ throw ( css::uno::RuntimeException, std::exception )
// XTruncate
void SAL_CALL OTempFileService::truncate()
-throw ( css::io::IOException, css::uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( maMutex );
checkConnected();