summaryrefslogtreecommitdiff
path: root/sot
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 /sot
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 'sot')
-rw-r--r--sot/source/sdstor/ucbstorage.cxx31
-rw-r--r--sot/source/unoolestorage/xolesimplestorage.cxx36
-rw-r--r--sot/source/unoolestorage/xolesimplestorage.hxx78
3 files changed, 36 insertions, 109 deletions
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 162b57ccd111..1e1bf9426632 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -91,14 +91,14 @@ public:
explicit FileStreamWrapper_Impl(const OUString& rName);
virtual ~FileStreamWrapper_Impl() override;
- virtual void SAL_CALL seek( sal_Int64 _nLocation ) throw ( IllegalArgumentException, IOException, RuntimeException, std::exception) override;
- virtual sal_Int64 SAL_CALL getPosition( ) throw ( IOException, RuntimeException, std::exception) override;
- virtual sal_Int64 SAL_CALL getLength( ) throw ( IOException, RuntimeException, std::exception) override;
- 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 void SAL_CALL seek( sal_Int64 _nLocation ) override;
+ virtual sal_Int64 SAL_CALL getPosition( ) override;
+ virtual sal_Int64 SAL_CALL getLength( ) 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;
protected:
void checkConnected();
@@ -130,7 +130,6 @@ FileStreamWrapper_Impl::~FileStreamWrapper_Impl()
sal_Int32 SAL_CALL FileStreamWrapper_Impl::readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead)
- throw( NotConnectedException, BufferSizeExceededException, RuntimeException, std::exception )
{
if ( m_aURL.isEmpty() )
{
@@ -159,7 +158,7 @@ sal_Int32 SAL_CALL FileStreamWrapper_Impl::readBytes(Sequence< sal_Int8 >& aData
}
-sal_Int32 SAL_CALL FileStreamWrapper_Impl::readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) throw( NotConnectedException, BufferSizeExceededException, RuntimeException, std::exception )
+sal_Int32 SAL_CALL FileStreamWrapper_Impl::readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead)
{
if ( m_aURL.isEmpty() )
{
@@ -182,7 +181,7 @@ sal_Int32 SAL_CALL FileStreamWrapper_Impl::readSomeBytes(Sequence< sal_Int8 >& a
}
-void SAL_CALL FileStreamWrapper_Impl::skipBytes(sal_Int32 nBytesToSkip) throw( NotConnectedException, BufferSizeExceededException, RuntimeException, std::exception )
+void SAL_CALL FileStreamWrapper_Impl::skipBytes(sal_Int32 nBytesToSkip)
{
if ( m_aURL.isEmpty() )
return;
@@ -195,7 +194,7 @@ void SAL_CALL FileStreamWrapper_Impl::skipBytes(sal_Int32 nBytesToSkip) throw( N
}
-sal_Int32 SAL_CALL FileStreamWrapper_Impl::available() throw( NotConnectedException, RuntimeException, std::exception )
+sal_Int32 SAL_CALL FileStreamWrapper_Impl::available()
{
if ( m_aURL.isEmpty() )
return 0;
@@ -217,7 +216,7 @@ sal_Int32 SAL_CALL FileStreamWrapper_Impl::available() throw( NotConnectedExcept
}
-void SAL_CALL FileStreamWrapper_Impl::closeInput() throw( NotConnectedException, RuntimeException, std::exception )
+void SAL_CALL FileStreamWrapper_Impl::closeInput()
{
if ( m_aURL.isEmpty() )
return;
@@ -233,7 +232,7 @@ void SAL_CALL FileStreamWrapper_Impl::closeInput() throw( NotConnectedException,
}
-void SAL_CALL FileStreamWrapper_Impl::seek( sal_Int64 _nLocation ) throw (IllegalArgumentException, IOException, RuntimeException, std::exception)
+void SAL_CALL FileStreamWrapper_Impl::seek( sal_Int64 _nLocation )
{
if ( m_aURL.isEmpty() )
return;
@@ -246,7 +245,7 @@ void SAL_CALL FileStreamWrapper_Impl::seek( sal_Int64 _nLocation ) throw (Illega
}
-sal_Int64 SAL_CALL FileStreamWrapper_Impl::getPosition( ) throw (IOException, RuntimeException, std::exception)
+sal_Int64 SAL_CALL FileStreamWrapper_Impl::getPosition( )
{
if ( m_aURL.isEmpty() )
return 0;
@@ -260,7 +259,7 @@ sal_Int64 SAL_CALL FileStreamWrapper_Impl::getPosition( ) throw (IOException, R
}
-sal_Int64 SAL_CALL FileStreamWrapper_Impl::getLength( ) throw (IOException, RuntimeException, std::exception)
+sal_Int64 SAL_CALL FileStreamWrapper_Impl::getLength( )
{
if ( m_aURL.isEmpty() )
return 0;
diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx b/sot/source/unoolestorage/xolesimplestorage.cxx
index 9eff44665900..d8df5f6236f0 100644
--- a/sot/source/unoolestorage/xolesimplestorage.cxx
+++ b/sot/source/unoolestorage/xolesimplestorage.cxx
@@ -179,7 +179,6 @@ void OLESimpleStorage::UpdateOriginal_Impl()
void OLESimpleStorage::InsertInputStreamToStorage_Impl( BaseStorage* pStorage, const OUString & aName, const uno::Reference< io::XInputStream >& xInputStream )
- throw ( uno::Exception )
{
if ( !pStorage || aName.isEmpty() || !xInputStream.is() )
throw uno::RuntimeException();
@@ -222,7 +221,6 @@ void OLESimpleStorage::InsertInputStreamToStorage_Impl( BaseStorage* pStorage, c
void OLESimpleStorage::InsertNameAccessToStorage_Impl( BaseStorage* pStorage, const OUString & aName, const uno::Reference< container::XNameAccess >& xNameAccess )
- throw ( uno::Exception )
{
if ( !pStorage || aName.isEmpty() || !xNameAccess.is() )
throw uno::RuntimeException();
@@ -269,10 +267,6 @@ void OLESimpleStorage::InsertNameAccessToStorage_Impl( BaseStorage* pStorage, co
void SAL_CALL OLESimpleStorage::insertByName( const OUString& aName, const uno::Any& aElement )
- throw ( lang::IllegalArgumentException,
- container::ElementExistException,
- lang::WrappedTargetException,
- uno::RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -321,9 +315,6 @@ void SAL_CALL OLESimpleStorage::insertByName( const OUString& aName, const uno::
void SAL_CALL OLESimpleStorage::removeByName( const OUString& aName )
- throw ( container::NoSuchElementException,
- lang::WrappedTargetException,
- uno::RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -350,10 +341,6 @@ void SAL_CALL OLESimpleStorage::removeByName( const OUString& aName )
void SAL_CALL OLESimpleStorage::replaceByName( const OUString& aName, const uno::Any& aElement )
- throw ( lang::IllegalArgumentException,
- container::NoSuchElementException,
- lang::WrappedTargetException,
- uno::RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -378,9 +365,6 @@ void SAL_CALL OLESimpleStorage::replaceByName( const OUString& aName, const uno:
uno::Any SAL_CALL OLESimpleStorage::getByName( const OUString& aName )
- throw ( container::NoSuchElementException,
- lang::WrappedTargetException,
- uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -484,7 +468,6 @@ uno::Any SAL_CALL OLESimpleStorage::getByName( const OUString& aName )
uno::Sequence< OUString > SAL_CALL OLESimpleStorage::getElementNames()
- throw ( uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -512,7 +495,6 @@ uno::Sequence< OUString > SAL_CALL OLESimpleStorage::getElementNames()
sal_Bool SAL_CALL OLESimpleStorage::hasByName( const OUString& aName )
- throw ( uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -535,7 +517,6 @@ sal_Bool SAL_CALL OLESimpleStorage::hasByName( const OUString& aName )
uno::Type SAL_CALL OLESimpleStorage::getElementType()
- throw ( uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -547,7 +528,6 @@ uno::Type SAL_CALL OLESimpleStorage::getElementType()
sal_Bool SAL_CALL OLESimpleStorage::hasElements()
- throw ( uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -574,7 +554,6 @@ sal_Bool SAL_CALL OLESimpleStorage::hasElements()
void SAL_CALL OLESimpleStorage::dispose()
- throw ( uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -599,7 +578,6 @@ void SAL_CALL OLESimpleStorage::dispose()
void SAL_CALL OLESimpleStorage::addEventListener(
const uno::Reference< lang::XEventListener >& xListener )
- throw ( uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -615,7 +593,6 @@ void SAL_CALL OLESimpleStorage::addEventListener(
void SAL_CALL OLESimpleStorage::removeEventListener(
const uno::Reference< lang::XEventListener >& xListener )
- throw ( uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -631,9 +608,6 @@ void SAL_CALL OLESimpleStorage::removeEventListener(
void SAL_CALL OLESimpleStorage::commit()
- throw ( css::io::IOException,
- css::lang::WrappedTargetException,
- css::uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -657,9 +631,6 @@ void SAL_CALL OLESimpleStorage::commit()
void SAL_CALL OLESimpleStorage::revert()
- throw ( css::io::IOException,
- css::lang::WrappedTargetException,
- css::uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -686,7 +657,6 @@ void SAL_CALL OLESimpleStorage::revert()
uno::Sequence< sal_Int8 > SAL_CALL OLESimpleStorage::getClassID()
- throw ( uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -700,34 +670,28 @@ uno::Sequence< sal_Int8 > SAL_CALL OLESimpleStorage::getClassID()
}
OUString SAL_CALL OLESimpleStorage::getClassName()
- throw ( uno::RuntimeException, std::exception )
{
return OUString();
}
void SAL_CALL OLESimpleStorage::setClassInfo( const uno::Sequence< sal_Int8 >& /*aClassID*/,
const OUString& /*sClassName*/ )
- throw ( lang::NoSupportException,
- uno::RuntimeException, std::exception )
{
throw lang::NoSupportException();
}
// XServiceInfo
OUString SAL_CALL OLESimpleStorage::getImplementationName()
- throw ( uno::RuntimeException, std::exception )
{
return OUString("com.sun.star.comp.embed.OLESimpleStorage");
}
sal_Bool SAL_CALL OLESimpleStorage::supportsService( const OUString& ServiceName )
- throw ( uno::RuntimeException, std::exception )
{
return cppu::supportsService(this, ServiceName);
}
uno::Sequence< OUString > SAL_CALL OLESimpleStorage::getSupportedServiceNames()
- throw ( uno::RuntimeException, std::exception )
{
return { "com.sun.star.embed.OLESimpleStorage" };
}
diff --git a/sot/source/unoolestorage/xolesimplestorage.hxx b/sot/source/unoolestorage/xolesimplestorage.hxx
index 1689a2664264..1b5216998d19 100644
--- a/sot/source/unoolestorage/xolesimplestorage.hxx
+++ b/sot/source/unoolestorage/xolesimplestorage.hxx
@@ -55,12 +55,10 @@ class OLESimpleStorage : public cppu::WeakImplHelper<css::embed::XOLESimpleStora
void UpdateOriginal_Impl();
/// @throws css::uno::Exception
- static void InsertInputStreamToStorage_Impl( BaseStorage* pStorage, const OUString & aName, const css::uno::Reference< css::io::XInputStream >& xInputStream )
- throw ( css::uno::Exception );
+ static void InsertInputStreamToStorage_Impl( BaseStorage* pStorage, const OUString & aName, const css::uno::Reference< css::io::XInputStream >& xInputStream );
/// @throws css::uno::Exception
- static void InsertNameAccessToStorage_Impl( BaseStorage* pStorage, const OUString & aName, const css::uno::Reference< css::container::XNameAccess >& xNameAccess )
- throw ( css::uno::Exception );
+ static void InsertNameAccessToStorage_Impl( BaseStorage* pStorage, const OUString & aName, const css::uno::Reference< css::container::XNameAccess >& xNameAccess );
public:
@@ -71,88 +69,54 @@ public:
// XNameContainer
- virtual void SAL_CALL insertByName( const OUString& aName, const css::uno::Any& aElement )
- throw ( css::lang::IllegalArgumentException,
- css::container::ElementExistException,
- css::lang::WrappedTargetException,
- css::uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL insertByName( const OUString& aName, const css::uno::Any& aElement ) override;
- virtual void SAL_CALL removeByName( const OUString& Name )
- throw ( css::container::NoSuchElementException,
- css::lang::WrappedTargetException,
- css::uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL removeByName( const OUString& Name ) override;
- virtual void SAL_CALL replaceByName( const OUString& aName, const css::uno::Any& aElement )
- throw ( css::lang::IllegalArgumentException,
- css::container::NoSuchElementException,
- css::lang::WrappedTargetException,
- css::uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL replaceByName( const OUString& aName, const css::uno::Any& aElement ) override;
- virtual css::uno::Any SAL_CALL getByName( const OUString& aName )
- throw ( css::container::NoSuchElementException,
- css::lang::WrappedTargetException,
- css::uno::RuntimeException, std::exception ) override;
+ virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) override;
- virtual css::uno::Sequence< OUString > SAL_CALL getElementNames()
- throw ( css::uno::RuntimeException, std::exception ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override;
- virtual sal_Bool SAL_CALL hasByName( const OUString& aName )
- throw ( css::uno::RuntimeException, std::exception ) override;
+ virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override;
- virtual css::uno::Type SAL_CALL getElementType()
- throw ( css::uno::RuntimeException, std::exception ) override;
+ virtual css::uno::Type SAL_CALL getElementType() override;
- virtual sal_Bool SAL_CALL hasElements()
- throw ( css::uno::RuntimeException, std::exception ) override;
+ virtual sal_Bool SAL_CALL hasElements() override;
// XComponent
- virtual void SAL_CALL dispose()
- throw ( css::uno::RuntimeException, std::exception ) final override;
+ virtual void SAL_CALL dispose() final override;
virtual void SAL_CALL addEventListener(
- const css::uno::Reference< css::lang::XEventListener >& xListener )
- throw ( css::uno::RuntimeException, std::exception ) override;
+ const css::uno::Reference< css::lang::XEventListener >& xListener ) override;
virtual void SAL_CALL removeEventListener(
- const css::uno::Reference< css::lang::XEventListener >& xListener )
- throw ( css::uno::RuntimeException, std::exception ) override;
+ const css::uno::Reference< css::lang::XEventListener >& xListener ) override;
// XTransactedObject
- virtual void SAL_CALL commit()
- throw ( css::io::IOException,
- css::lang::WrappedTargetException,
- css::uno::RuntimeException, std::exception ) override;
+ virtual void SAL_CALL commit() override;
- virtual void SAL_CALL revert()
- throw ( css::io::IOException,
- css::lang::WrappedTargetException,
- css::uno::RuntimeException, std::exception ) override;
+ virtual void SAL_CALL revert() override;
// XClassifiedObject
- virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL getClassID()
- throw ( css::uno::RuntimeException, std::exception ) override;
+ virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL getClassID() override;
- virtual OUString SAL_CALL getClassName()
- throw ( css::uno::RuntimeException, std::exception ) override;
+ virtual OUString SAL_CALL getClassName() override;
virtual void SAL_CALL setClassInfo( const css::uno::Sequence< ::sal_Int8 >& aClassID,
- const OUString& sClassName )
- throw ( css::lang::NoSupportException,
- css::uno::RuntimeException, std::exception ) override;
+ const OUString& sClassName ) override;
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName()
- throw ( css::uno::RuntimeException, std::exception ) override;
+ virtual OUString SAL_CALL getImplementationName() override;
- virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
- throw ( css::uno::RuntimeException, std::exception ) override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
- virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
- throw ( css::uno::RuntimeException, std::exception ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
};
#endif