summaryrefslogtreecommitdiff
path: root/oox/source/helper
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 /oox/source/helper
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 'oox/source/helper')
-rw-r--r--oox/source/helper/propertymap.cxx40
-rw-r--r--oox/source/helper/textinputstream.cxx26
2 files changed, 29 insertions, 37 deletions
diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx
index 4ff14e5f98f3..b6cde43ad93c 100644
--- a/oox/source/helper/propertymap.cxx
+++ b/oox/source/helper/propertymap.cxx
@@ -104,18 +104,18 @@ public:
explicit GenericPropertySet( const PropertyMap& rPropMap );
// XPropertySet
- virtual Reference< XPropertySetInfo > SAL_CALL getPropertySetInfo() throw (RuntimeException, std::exception) override;
- virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const Any& aValue ) throw (UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException, std::exception) override;
- virtual Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) override;
- virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const Reference< XPropertyChangeListener >& xListener ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) override;
- virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const Reference< XPropertyChangeListener >& aListener ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) override;
- virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const Reference< XVetoableChangeListener >& aListener ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) override;
- virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const Reference< XVetoableChangeListener >& aListener ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) override;
+ virtual Reference< XPropertySetInfo > SAL_CALL getPropertySetInfo() override;
+ virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const Any& aValue ) override;
+ virtual Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
+ virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const Reference< XPropertyChangeListener >& xListener ) override;
+ virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const Reference< XPropertyChangeListener >& aListener ) override;
+ virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const Reference< XVetoableChangeListener >& aListener ) override;
+ virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const Reference< XVetoableChangeListener >& aListener ) override;
// XPropertySetInfo
- virtual Sequence< Property > SAL_CALL getProperties() throw (RuntimeException, std::exception) override;
- virtual Property SAL_CALL getPropertyByName( const OUString& aName ) throw (UnknownPropertyException, RuntimeException, std::exception) override;
- virtual sal_Bool SAL_CALL hasPropertyByName( const OUString& Name ) throw (RuntimeException, std::exception) override;
+ virtual Sequence< Property > SAL_CALL getProperties() override;
+ virtual Property SAL_CALL getPropertyByName( const OUString& aName ) override;
+ virtual sal_Bool SAL_CALL hasPropertyByName( const OUString& Name ) override;
private:
osl::Mutex mMutex;
@@ -127,18 +127,18 @@ GenericPropertySet::GenericPropertySet( const PropertyMap& rPropMap )
rPropMap.fillPropertyNameMap(maPropMap);
}
-Reference< XPropertySetInfo > SAL_CALL GenericPropertySet::getPropertySetInfo() throw (RuntimeException, std::exception)
+Reference< XPropertySetInfo > SAL_CALL GenericPropertySet::getPropertySetInfo()
{
return this;
}
-void SAL_CALL GenericPropertySet::setPropertyValue( const OUString& rPropertyName, const Any& rValue ) throw (UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException, std::exception)
+void SAL_CALL GenericPropertySet::setPropertyValue( const OUString& rPropertyName, const Any& rValue )
{
::osl::MutexGuard aGuard( mMutex );
maPropMap[ rPropertyName ] = rValue;
}
-Any SAL_CALL GenericPropertySet::getPropertyValue( const OUString& rPropertyName ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception)
+Any SAL_CALL GenericPropertySet::getPropertyValue( const OUString& rPropertyName )
{
PropertyNameMap::iterator aIt = maPropMap.find( rPropertyName );
if( aIt == maPropMap.end() )
@@ -147,13 +147,13 @@ Any SAL_CALL GenericPropertySet::getPropertyValue( const OUString& rPropertyName
}
// listeners are not supported by this implementation
-void SAL_CALL GenericPropertySet::addPropertyChangeListener( const OUString& , const Reference< XPropertyChangeListener >& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) {}
-void SAL_CALL GenericPropertySet::removePropertyChangeListener( const OUString& , const Reference< XPropertyChangeListener >& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) {}
-void SAL_CALL GenericPropertySet::addVetoableChangeListener( const OUString& , const Reference< XVetoableChangeListener >& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) {}
-void SAL_CALL GenericPropertySet::removeVetoableChangeListener( const OUString& , const Reference< XVetoableChangeListener >& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) {}
+void SAL_CALL GenericPropertySet::addPropertyChangeListener( const OUString& , const Reference< XPropertyChangeListener >& ) {}
+void SAL_CALL GenericPropertySet::removePropertyChangeListener( const OUString& , const Reference< XPropertyChangeListener >& ) {}
+void SAL_CALL GenericPropertySet::addVetoableChangeListener( const OUString& , const Reference< XVetoableChangeListener >& ) {}
+void SAL_CALL GenericPropertySet::removeVetoableChangeListener( const OUString& , const Reference< XVetoableChangeListener >& ) {}
// XPropertySetInfo
-Sequence< Property > SAL_CALL GenericPropertySet::getProperties() throw (RuntimeException, std::exception)
+Sequence< Property > SAL_CALL GenericPropertySet::getProperties()
{
Sequence< Property > aSeq( static_cast< sal_Int32 >( maPropMap.size() ) );
Property* pProperty = aSeq.getArray();
@@ -167,7 +167,7 @@ Sequence< Property > SAL_CALL GenericPropertySet::getProperties() throw (Runtime
return aSeq;
}
-Property SAL_CALL GenericPropertySet::getPropertyByName( const OUString& rPropertyName ) throw (UnknownPropertyException, RuntimeException, std::exception)
+Property SAL_CALL GenericPropertySet::getPropertyByName( const OUString& rPropertyName )
{
PropertyNameMap::iterator aIt = maPropMap.find( rPropertyName );
if( aIt == maPropMap.end() )
@@ -180,7 +180,7 @@ Property SAL_CALL GenericPropertySet::getPropertyByName( const OUString& rProper
return aProperty;
}
-sal_Bool SAL_CALL GenericPropertySet::hasPropertyByName( const OUString& rPropertyName ) throw (RuntimeException, std::exception)
+sal_Bool SAL_CALL GenericPropertySet::hasPropertyByName( const OUString& rPropertyName )
{
return maPropMap.find( rPropertyName ) != maPropMap.end();
}
diff --git a/oox/source/helper/textinputstream.cxx b/oox/source/helper/textinputstream.cxx
index 70b657f59fdd..6159edee7a8b 100644
--- a/oox/source/helper/textinputstream.cxx
+++ b/oox/source/helper/textinputstream.cxx
@@ -43,20 +43,15 @@ class UnoBinaryInputStream : public UnoBinaryInputStream_BASE
public:
explicit UnoBinaryInputStream( BinaryInputStream& rInStrm );
- virtual sal_Int32 SAL_CALL readBytes( Sequence< sal_Int8 >& rData, sal_Int32 nBytesToRead )
- throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) override;
- virtual sal_Int32 SAL_CALL readSomeBytes( Sequence< sal_Int8 >& rData, 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 >& rData, sal_Int32 nBytesToRead ) override;
+ virtual sal_Int32 SAL_CALL readSomeBytes( Sequence< sal_Int8 >& rData, 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;
private:
/// @throws NotConnectedException
- void ensureConnected() const throw (NotConnectedException);
+ void ensureConnected() const;
private:
BinaryInputStream* mpInStrm;
@@ -68,40 +63,37 @@ UnoBinaryInputStream::UnoBinaryInputStream( BinaryInputStream& rInStrm ) :
}
sal_Int32 SAL_CALL UnoBinaryInputStream::readBytes( Sequence< sal_Int8 >& rData, sal_Int32 nBytesToRead )
- throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception)
{
ensureConnected();
return mpInStrm->readData( rData, nBytesToRead );
}
sal_Int32 SAL_CALL UnoBinaryInputStream::readSomeBytes( Sequence< sal_Int8 >& rData, sal_Int32 nMaxBytesToRead )
- throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception)
{
ensureConnected();
return mpInStrm->readData( rData, nMaxBytesToRead );
}
void SAL_CALL UnoBinaryInputStream::skipBytes( sal_Int32 nBytesToSkip )
- throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception)
{
ensureConnected();
mpInStrm->skip( nBytesToSkip );
}
-sal_Int32 SAL_CALL UnoBinaryInputStream::available() throw (NotConnectedException, IOException, RuntimeException, std::exception)
+sal_Int32 SAL_CALL UnoBinaryInputStream::available()
{
ensureConnected();
throw RuntimeException( "Functionality not supported", Reference< XInputStream >() );
}
-void SAL_CALL UnoBinaryInputStream::closeInput() throw (NotConnectedException, IOException, RuntimeException, std::exception)
+void SAL_CALL UnoBinaryInputStream::closeInput()
{
ensureConnected();
mpInStrm->close();
mpInStrm = nullptr;
}
-void UnoBinaryInputStream::ensureConnected() const throw (NotConnectedException)
+void UnoBinaryInputStream::ensureConnected() const
{
if( !mpInStrm )
throw NotConnectedException( "Stream closed" );