From e57ca02849c3d87142ff5ff9099a212e72b8139c Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 26 Jan 2017 12:28:58 +0100 Subject: Remove dynamic exception specifications ...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at "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 Reviewed-by: Stephan Bergmann --- package/source/zippackage/ZipPackage.cxx | 41 ++++------------------ package/source/zippackage/ZipPackageBuffer.cxx | 11 ------ package/source/zippackage/ZipPackageEntry.cxx | 9 ----- package/source/zippackage/ZipPackageFolder.cxx | 17 --------- .../zippackage/ZipPackageFolderEnumeration.cxx | 5 --- .../zippackage/ZipPackageFolderEnumeration.hxx | 15 +++----- package/source/zippackage/ZipPackageSink.cxx | 2 -- package/source/zippackage/ZipPackageSink.hxx | 6 ++-- package/source/zippackage/ZipPackageStream.cxx | 23 ------------ package/source/zippackage/wrapstreamforshare.cxx | 25 ------------- package/source/zippackage/wrapstreamforshare.hxx | 21 +++++------ package/source/zippackage/zipfileaccess.cxx | 18 ---------- 12 files changed, 22 insertions(+), 171 deletions(-) (limited to 'package/source/zippackage') diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index 83b3a82c37c1..a28507852493 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -110,35 +110,28 @@ class ActiveDataStreamer : public ::cppu::WeakImplHelper< XActiveDataStreamer > uno::Reference< XStream > mStream; public: - virtual uno::Reference< XStream > SAL_CALL getStream() - throw( RuntimeException, std::exception ) override + virtual uno::Reference< XStream > SAL_CALL getStream() override { return mStream; } - virtual void SAL_CALL setStream( const uno::Reference< XStream >& stream ) - throw( RuntimeException, std::exception ) override + virtual void SAL_CALL setStream( const uno::Reference< XStream >& stream ) override { mStream = stream; } }; class DummyInputStream : public ::cppu::WeakImplHelper< XInputStream > { - virtual sal_Int32 SAL_CALL readBytes( uno::Sequence< sal_Int8 >&, sal_Int32 ) - throw ( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception ) override + virtual sal_Int32 SAL_CALL readBytes( uno::Sequence< sal_Int8 >&, sal_Int32 ) override { return 0; } - virtual sal_Int32 SAL_CALL readSomeBytes( uno::Sequence< sal_Int8 >&, sal_Int32 ) - throw ( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception ) override + virtual sal_Int32 SAL_CALL readSomeBytes( uno::Sequence< sal_Int8 >&, sal_Int32 ) override { return 0; } - virtual void SAL_CALL skipBytes( sal_Int32 ) - throw ( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception ) override + virtual void SAL_CALL skipBytes( sal_Int32 ) override {} - virtual sal_Int32 SAL_CALL available() - throw ( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception ) override + virtual sal_Int32 SAL_CALL available() override { return 0; } - virtual void SAL_CALL closeInput() - throw ( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception ) override + virtual void SAL_CALL closeInput() override {} }; @@ -555,7 +548,6 @@ void ZipPackage::getZipFileContents() } void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments ) - throw( Exception, RuntimeException, std::exception ) { uno::Reference< XProgressHandler > xProgressHandler; beans::NamedValue aNamedValue; @@ -771,7 +763,6 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments ) } Any SAL_CALL ZipPackage::getByHierarchicalName( const OUString& aName ) - throw( NoSuchElementException, RuntimeException, std::exception ) { OUString sTemp, sDirName; sal_Int32 nOldIndex, nStreamIndex; @@ -865,7 +856,6 @@ Any SAL_CALL ZipPackage::getByHierarchicalName( const OUString& aName ) } sal_Bool SAL_CALL ZipPackage::hasByHierarchicalName( const OUString& aName ) - throw( RuntimeException, std::exception ) { OUString sTemp, sDirName; sal_Int32 nOldIndex, nStreamIndex; @@ -959,14 +949,12 @@ sal_Bool SAL_CALL ZipPackage::hasByHierarchicalName( const OUString& aName ) } uno::Reference< XInterface > SAL_CALL ZipPackage::createInstance() - throw( Exception, RuntimeException, std::exception ) { uno::Reference < XInterface > xRef = *( new ZipPackageStream( *this, m_xContext, m_nFormat, m_bAllowRemoveOnInsert ) ); return xRef; } uno::Reference< XInterface > SAL_CALL ZipPackage::createInstanceWithArguments( const uno::Sequence< Any >& aArguments ) - throw( Exception, RuntimeException, std::exception ) { bool bArg = false; uno::Reference < XInterface > xRef; @@ -1372,7 +1360,6 @@ uno::Reference< XActiveDataStreamer > ZipPackage::openOriginalForOutput() } void SAL_CALL ZipPackage::commitChanges() - throw( WrappedTargetException, RuntimeException, std::exception ) { // lock the component for the time of committing ::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() ); @@ -1610,12 +1597,10 @@ const uno::Sequence< sal_Int8 > ZipPackage::GetEncryptionKey() } sal_Bool SAL_CALL ZipPackage::hasPendingChanges() - throw( RuntimeException, std::exception ) { return false; } Sequence< ElementChange > SAL_CALL ZipPackage::getPendingChanges() - throw( RuntimeException, std::exception ) { return uno::Sequence < ElementChange > (); } @@ -1642,19 +1627,16 @@ Sequence< OUString > ZipPackage::static_getSupportedServiceNames() } OUString ZipPackage::getImplementationName() - throw ( RuntimeException, std::exception ) { return static_getImplementationName(); } Sequence< OUString > ZipPackage::getSupportedServiceNames() - throw ( RuntimeException, std::exception ) { return static_getSupportedServiceNames(); } sal_Bool SAL_CALL ZipPackage::supportsService( OUString const & rServiceName ) - throw ( RuntimeException, std::exception ) { return cppu::supportsService(this, rServiceName); } @@ -1670,14 +1652,12 @@ uno::Reference < XSingleServiceFactory > ZipPackage::createServiceFactory( uno:: namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; } Sequence< sal_Int8 > ZipPackage::getUnoTunnelImplementationId() - throw ( RuntimeException ) { ::cppu::OImplementationId &rId = lcl_ImplId::get(); return rId.getImplementationId(); } sal_Int64 SAL_CALL ZipPackage::getSomething( const uno::Sequence< sal_Int8 >& aIdentifier ) - throw( RuntimeException, std::exception ) { if ( aIdentifier.getLength() == 16 && 0 == memcmp( getUnoTunnelImplementationId().getConstArray(), aIdentifier.getConstArray(), 16 ) ) return reinterpret_cast < sal_Int64 > ( this ); @@ -1685,13 +1665,11 @@ sal_Int64 SAL_CALL ZipPackage::getSomething( const uno::Sequence< sal_Int8 >& aI } uno::Reference< XPropertySetInfo > SAL_CALL ZipPackage::getPropertySetInfo() - throw( RuntimeException, std::exception ) { return uno::Reference < XPropertySetInfo > (); } void SAL_CALL ZipPackage::setPropertyValue( const OUString& aPropertyName, const Any& aValue ) - throw( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException, std::exception ) { if ( m_nFormat != embed::StorageFormats::PACKAGE ) throw UnknownPropertyException(THROW_WHERE ); @@ -1787,7 +1765,6 @@ void SAL_CALL ZipPackage::setPropertyValue( const OUString& aPropertyName, const } Any SAL_CALL ZipPackage::getPropertyValue( const OUString& PropertyName ) - throw( UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception ) { // TODO/LATER: Activate the check when zip-ucp is ready // if ( m_nFormat != embed::StorageFormats::PACKAGE ) @@ -1828,19 +1805,15 @@ Any SAL_CALL ZipPackage::getPropertyValue( const OUString& PropertyName ) throw UnknownPropertyException(THROW_WHERE ); } void SAL_CALL ZipPackage::addPropertyChangeListener( const OUString& /*aPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ ) - throw( UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception ) { } void SAL_CALL ZipPackage::removePropertyChangeListener( const OUString& /*aPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*aListener*/ ) - throw( UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception ) { } void SAL_CALL ZipPackage::addVetoableChangeListener( const OUString& /*PropertyName*/, const uno::Reference< XVetoableChangeListener >& /*aListener*/ ) - throw( UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception ) { } void SAL_CALL ZipPackage::removeVetoableChangeListener( const OUString& /*PropertyName*/, const uno::Reference< XVetoableChangeListener >& /*aListener*/ ) - throw( UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception ) { } diff --git a/package/source/zippackage/ZipPackageBuffer.cxx b/package/source/zippackage/ZipPackageBuffer.cxx index 904c3957a916..cb5f80c1c052 100644 --- a/package/source/zippackage/ZipPackageBuffer.cxx +++ b/package/source/zippackage/ZipPackageBuffer.cxx @@ -44,7 +44,6 @@ ZipPackageBuffer::~ZipPackageBuffer() } sal_Int32 SAL_CALL ZipPackageBuffer::readBytes( Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) - throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) { if (nBytesToRead < 0) throw BufferSizeExceededException(THROW_WHERE, *this ); @@ -59,12 +58,10 @@ sal_Int32 SAL_CALL ZipPackageBuffer::readBytes( Sequence< sal_Int8 >& aData, sal } sal_Int32 SAL_CALL ZipPackageBuffer::readSomeBytes( Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) - throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) { return readBytes(aData, nMaxBytesToRead); } void SAL_CALL ZipPackageBuffer::skipBytes( sal_Int32 nBytesToSkip ) - throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) { if (nBytesToSkip < 0) throw BufferSizeExceededException(THROW_WHERE, *this ); @@ -75,16 +72,13 @@ void SAL_CALL ZipPackageBuffer::skipBytes( sal_Int32 nBytesToSkip ) m_nCurrent+=nBytesToSkip; } sal_Int32 SAL_CALL ZipPackageBuffer::available( ) - throw(NotConnectedException, IOException, RuntimeException, std::exception) { return static_cast < sal_Int32 > (m_nEnd - m_nCurrent); } void SAL_CALL ZipPackageBuffer::closeInput( ) - throw(NotConnectedException, IOException, RuntimeException, std::exception) { } void SAL_CALL ZipPackageBuffer::writeBytes( const Sequence< sal_Int8 >& aData ) - throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) { sal_Int64 nDataLen = aData.getLength(), nCombined = m_nEnd + nDataLen; @@ -107,27 +101,22 @@ void SAL_CALL ZipPackageBuffer::writeBytes( const Sequence< sal_Int8 >& aData ) m_nEnd = m_nCurrent; } void SAL_CALL ZipPackageBuffer::flush( ) - throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) { } void SAL_CALL ZipPackageBuffer::closeOutput( ) - throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception) { } void SAL_CALL ZipPackageBuffer::seek( sal_Int64 location ) - throw( IllegalArgumentException, IOException, RuntimeException, std::exception) { if ( location > m_nEnd || location < 0 ) throw IllegalArgumentException(THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); m_nCurrent = location; } sal_Int64 SAL_CALL ZipPackageBuffer::getPosition( ) - throw(IOException, RuntimeException, std::exception) { return m_nCurrent; } sal_Int64 SAL_CALL ZipPackageBuffer::getLength( ) - throw(IOException, RuntimeException, std::exception) { return m_nEnd; } diff --git a/package/source/zippackage/ZipPackageEntry.cxx b/package/source/zippackage/ZipPackageEntry.cxx index 327292f8b894..727add5b07a3 100644 --- a/package/source/zippackage/ZipPackageEntry.cxx +++ b/package/source/zippackage/ZipPackageEntry.cxx @@ -56,12 +56,10 @@ ZipPackageEntry::~ZipPackageEntry() // XChild OUString SAL_CALL ZipPackageEntry::getName( ) - throw(RuntimeException, std::exception) { return msName; } void SAL_CALL ZipPackageEntry::setName( const OUString& aName ) - throw(RuntimeException, std::exception) { if ( mpParent && !msName.isEmpty() && mpParent->hasByName ( msName ) ) mpParent->removeByName ( msName ); @@ -77,7 +75,6 @@ void SAL_CALL ZipPackageEntry::setName( const OUString& aName ) mpParent->doInsertByName ( this, false ); } uno::Reference< XInterface > SAL_CALL ZipPackageEntry::getParent( ) - throw(RuntimeException, std::exception) { // return uno::Reference< XInterface >( xParent, UNO_QUERY ); return uno::Reference< XInterface >( static_cast< ::cppu::OWeakObject* >( mpParent ), UNO_QUERY ); @@ -92,7 +89,6 @@ void ZipPackageEntry::doSetParent ( ZipPackageFolder * pNewParent ) } void SAL_CALL ZipPackageEntry::setParent( const uno::Reference< XInterface >& xNewParent ) - throw(NoSupportException, RuntimeException, std::exception) { sal_Int64 nTest(0); uno::Reference < XUnoTunnel > xTunnel ( xNewParent, UNO_QUERY ); @@ -110,24 +106,19 @@ void SAL_CALL ZipPackageEntry::setParent( const uno::Reference< XInterface >& xN } //XPropertySet uno::Reference< beans::XPropertySetInfo > SAL_CALL ZipPackageEntry::getPropertySetInfo( ) - throw(RuntimeException, std::exception) { return uno::Reference < beans::XPropertySetInfo > (); } void SAL_CALL ZipPackageEntry::addPropertyChangeListener( const OUString& /*aPropertyName*/, const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ ) - throw(beans::UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) { } void SAL_CALL ZipPackageEntry::removePropertyChangeListener( const OUString& /*aPropertyName*/, const uno::Reference< beans::XPropertyChangeListener >& /*aListener*/ ) - throw(beans::UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) { } void SAL_CALL ZipPackageEntry::addVetoableChangeListener( const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ ) - throw(beans::UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) { } void SAL_CALL ZipPackageEntry::removeVetoableChangeListener( const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ ) - throw(beans::UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) { } diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx index 22d18ce42839..8bf0a8885d82 100644 --- a/package/source/zippackage/ZipPackageFolder.cxx +++ b/package/source/zippackage/ZipPackageFolder.cxx @@ -181,7 +181,6 @@ css::uno::Sequence < sal_Int8 > ZipPackageFolder::static_getImplementationId() // XNameContainer void SAL_CALL ZipPackageFolder::insertByName( const OUString& aName, const uno::Any& aElement ) - throw(IllegalArgumentException, ElementExistException, WrappedTargetException, uno::RuntimeException, std::exception) { if (hasByName(aName)) throw ElementExistException(THROW_WHERE ); @@ -215,7 +214,6 @@ void SAL_CALL ZipPackageFolder::insertByName( const OUString& aName, const uno:: } } void SAL_CALL ZipPackageFolder::removeByName( const OUString& Name ) - throw(NoSuchElementException, WrappedTargetException, uno::RuntimeException, std::exception) { ContentHash::iterator aIter = maContents.find ( Name ); if ( aIter == maContents.end() ) @@ -224,18 +222,15 @@ void SAL_CALL ZipPackageFolder::removeByName( const OUString& Name ) } // XEnumerationAccess uno::Reference< XEnumeration > SAL_CALL ZipPackageFolder::createEnumeration( ) - throw(uno::RuntimeException, std::exception) { return uno::Reference < XEnumeration> (new ZipPackageFolderEnumeration(maContents)); } // XElementAccess uno::Type SAL_CALL ZipPackageFolder::getElementType( ) - throw(uno::RuntimeException, std::exception) { return cppu::UnoType::get(); } sal_Bool SAL_CALL ZipPackageFolder::hasElements( ) - throw(uno::RuntimeException, std::exception) { return maContents.size() > 0; } @@ -249,12 +244,10 @@ ZipContentInfo& ZipPackageFolder::doGetByName( const OUString& aName ) } uno::Any SAL_CALL ZipPackageFolder::getByName( const OUString& aName ) - throw(NoSuchElementException, WrappedTargetException, uno::RuntimeException, std::exception) { return uno::makeAny ( doGetByName ( aName ).xTunnel ); } uno::Sequence< OUString > SAL_CALL ZipPackageFolder::getElementNames( ) - throw(uno::RuntimeException, std::exception) { sal_uInt32 i=0, nSize = maContents.size(); uno::Sequence < OUString > aSequence ( nSize ); @@ -265,13 +258,11 @@ uno::Sequence< OUString > SAL_CALL ZipPackageFolder::getElementNames( ) return aSequence; } sal_Bool SAL_CALL ZipPackageFolder::hasByName( const OUString& aName ) - throw(uno::RuntimeException, std::exception) { return maContents.find ( aName ) != maContents.end (); } // XNameReplace void SAL_CALL ZipPackageFolder::replaceByName( const OUString& aName, const uno::Any& aElement ) - throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, uno::RuntimeException, std::exception) { if ( hasByName( aName ) ) removeByName( aName ); @@ -323,7 +314,6 @@ void ZipPackageFolder::saveContents( ZipOutputStream & rZipOut, const uno::Sequence < sal_Int8 >& rEncryptionKey, const rtlRandomPool &rRandomPool ) const - throw( uno::RuntimeException ) { bool bWritingFailed = false; @@ -393,7 +383,6 @@ void ZipPackageFolder::saveContents( } sal_Int64 SAL_CALL ZipPackageFolder::getSomething( const uno::Sequence< sal_Int8 >& aIdentifier ) - throw(uno::RuntimeException, std::exception) { sal_Int64 nMe = 0; if ( aIdentifier.getLength() == 16 && @@ -402,7 +391,6 @@ sal_Int64 SAL_CALL ZipPackageFolder::getSomething( const uno::Sequence< sal_Int8 return nMe; } void SAL_CALL ZipPackageFolder::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue ) - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, uno::RuntimeException, std::exception) { if ( aPropertyName == "MediaType" ) { @@ -420,7 +408,6 @@ void SAL_CALL ZipPackageFolder::setPropertyValue( const OUString& aPropertyName, throw UnknownPropertyException(THROW_WHERE ); } uno::Any SAL_CALL ZipPackageFolder::getPropertyValue( const OUString& PropertyName ) - throw(UnknownPropertyException, WrappedTargetException, uno::RuntimeException, std::exception) { if ( PropertyName == "MediaType" ) { @@ -439,7 +426,6 @@ uno::Any SAL_CALL ZipPackageFolder::getPropertyValue( const OUString& PropertyNa } void ZipPackageFolder::doInsertByName ( ZipPackageEntry *pEntry, bool bSetParent ) - throw(IllegalArgumentException, ElementExistException, WrappedTargetException, uno::RuntimeException) { try { @@ -457,20 +443,17 @@ void ZipPackageFolder::doInsertByName ( ZipPackageEntry *pEntry, bool bSetParent pEntry->setParent ( *this ); } OUString ZipPackageFolder::getImplementationName() - throw (uno::RuntimeException, std::exception) { return OUString("ZipPackageFolder"); } uno::Sequence< OUString > ZipPackageFolder::getSupportedServiceNames() - throw (uno::RuntimeException, std::exception) { uno::Sequence< OUString > aNames { "com.sun.star.packages.PackageFolder" }; return aNames; } sal_Bool SAL_CALL ZipPackageFolder::supportsService( OUString const & rServiceName ) - throw (uno::RuntimeException, std::exception) { return cppu::supportsService(this, rServiceName); } diff --git a/package/source/zippackage/ZipPackageFolderEnumeration.cxx b/package/source/zippackage/ZipPackageFolderEnumeration.cxx index a759793dbaa2..adcbb9296dd5 100644 --- a/package/source/zippackage/ZipPackageFolderEnumeration.cxx +++ b/package/source/zippackage/ZipPackageFolderEnumeration.cxx @@ -40,12 +40,10 @@ ZipPackageFolderEnumeration::~ZipPackageFolderEnumeration() } sal_Bool SAL_CALL ZipPackageFolderEnumeration::hasMoreElements( ) - throw(uno::RuntimeException, std::exception) { return (aIterator != rContents.end() ); } uno::Any SAL_CALL ZipPackageFolderEnumeration::nextElement( ) - throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) { uno::Any aAny; if (aIterator == rContents.end() ) @@ -56,20 +54,17 @@ uno::Any SAL_CALL ZipPackageFolderEnumeration::nextElement( ) } OUString ZipPackageFolderEnumeration::getImplementationName() - throw (uno::RuntimeException, std::exception) { return OUString ("ZipPackageFolderEnumeration"); } uno::Sequence< OUString > ZipPackageFolderEnumeration::getSupportedServiceNames() - throw (uno::RuntimeException, std::exception) { uno::Sequence< OUString > aNames { "com.sun.star.packages.PackageFolderEnumeration" }; return aNames; } sal_Bool SAL_CALL ZipPackageFolderEnumeration::supportsService( OUString const & rServiceName ) - throw (uno::RuntimeException, std::exception) { return cppu::supportsService(this, rServiceName); } diff --git a/package/source/zippackage/ZipPackageFolderEnumeration.hxx b/package/source/zippackage/ZipPackageFolderEnumeration.hxx index 6befe8c6f18f..d4f8b8b1cdba 100644 --- a/package/source/zippackage/ZipPackageFolderEnumeration.hxx +++ b/package/source/zippackage/ZipPackageFolderEnumeration.hxx @@ -39,18 +39,13 @@ public: virtual ~ZipPackageFolderEnumeration() override; // XEnumeration - virtual sal_Bool SAL_CALL hasMoreElements( ) - throw(css::uno::RuntimeException, std::exception) override; - virtual css::uno::Any SAL_CALL nextElement( ) - throw(css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL hasMoreElements( ) override; + virtual css::uno::Any SAL_CALL nextElement( ) override; // XServiceInfo - virtual OUString SAL_CALL getImplementationName( ) - throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) - throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) - throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getImplementationName( ) override; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override; }; #endif diff --git a/package/source/zippackage/ZipPackageSink.cxx b/package/source/zippackage/ZipPackageSink.cxx index b3db349c59a7..6725c8aa2802 100644 --- a/package/source/zippackage/ZipPackageSink.cxx +++ b/package/source/zippackage/ZipPackageSink.cxx @@ -27,12 +27,10 @@ ZipPackageSink::~ZipPackageSink() { } void SAL_CALL ZipPackageSink::setInputStream( const css::uno::Reference< css::io::XInputStream >& aStream ) - throw(css::uno::RuntimeException, std::exception) { xStream = aStream; } css::uno::Reference< css::io::XInputStream > SAL_CALL ZipPackageSink::getInputStream( ) - throw(css::uno::RuntimeException, std::exception) { return xStream; } diff --git a/package/source/zippackage/ZipPackageSink.hxx b/package/source/zippackage/ZipPackageSink.hxx index 6ece3eb528f7..e7e4cdbef192 100644 --- a/package/source/zippackage/ZipPackageSink.hxx +++ b/package/source/zippackage/ZipPackageSink.hxx @@ -29,10 +29,8 @@ protected: public: ZipPackageSink(); virtual ~ZipPackageSink() override; - virtual void SAL_CALL setInputStream( const css::uno::Reference< css::io::XInputStream >& aStream ) - throw(css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getInputStream( ) - throw(css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL setInputStream( const css::uno::Reference< css::io::XInputStream >& aStream ) override; + virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getInputStream( ) override; }; #endif diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index 2222f7b1f166..971263859fd5 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -935,7 +935,6 @@ void ZipPackageStream::SetPackageMember( bool bNewValue ) // XActiveDataSink void SAL_CALL ZipPackageStream::setInputStream( const uno::Reference< io::XInputStream >& aStream ) - throw( RuntimeException, std::exception ) { // if seekable access is required the wrapping will be done on demand m_xStream = aStream; @@ -947,7 +946,6 @@ void SAL_CALL ZipPackageStream::setInputStream( const uno::Reference< io::XInput } uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getRawData() - throw( RuntimeException ) { try { @@ -975,7 +973,6 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getRawData() } uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getInputStream() - throw( RuntimeException, std::exception ) { try { @@ -1006,9 +1003,6 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getInputStream() // XDataSinkEncrSupport uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getDataStream() - throw ( packages::WrongPasswordException, ZipException, - io::IOException, - RuntimeException, std::exception ) { // There is no stream attached to this object if ( m_nStreamMode == PACKAGE_STREAM_NOTSET ) @@ -1073,9 +1067,6 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getDataStream() } uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getRawStream() - throw ( packages::NoEncryptionException, - io::IOException, - uno::RuntimeException, std::exception ) { // There is no stream attached to this object if ( m_nStreamMode == PACKAGE_STREAM_NOTSET ) @@ -1106,18 +1097,12 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getRawStream() } void SAL_CALL ZipPackageStream::setDataStream( const uno::Reference< io::XInputStream >& aStream ) - throw ( io::IOException, - RuntimeException, std::exception ) { setInputStream( aStream ); m_nStreamMode = PACKAGE_STREAM_DATA; } void SAL_CALL ZipPackageStream::setRawStream( const uno::Reference< io::XInputStream >& aStream ) - throw ( packages::EncryptionNotAllowedException, - packages::NoRawFormatException, - io::IOException, - RuntimeException, std::exception ) { // wrap the stream in case it is not seekable uno::Reference< io::XInputStream > xNewStream = ::comphelper::OSeekableInputWrapper::CheckSeekableCanWrap( aStream, m_xContext ); @@ -1143,8 +1128,6 @@ void SAL_CALL ZipPackageStream::setRawStream( const uno::Reference< io::XInputSt } uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getPlainRawStream() - throw ( io::IOException, packages::NoEncryptionException, - uno::RuntimeException, std::exception ) { // There is no stream attached to this object if ( m_nStreamMode == PACKAGE_STREAM_NOTSET ) @@ -1175,7 +1158,6 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getPlainRawStream( // XUnoTunnel sal_Int64 SAL_CALL ZipPackageStream::getSomething( const Sequence< sal_Int8 >& aIdentifier ) - throw( RuntimeException, std::exception ) { sal_Int64 nMe = 0; if ( aIdentifier.getLength() == 16 && @@ -1186,7 +1168,6 @@ sal_Int64 SAL_CALL ZipPackageStream::getSomething( const Sequence< sal_Int8 >& a // XPropertySet void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName, const Any& aValue ) - throw( beans::UnknownPropertyException, beans::PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException, std::exception ) { if ( aPropertyName == "MediaType" ) { @@ -1344,7 +1325,6 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName, } Any SAL_CALL ZipPackageStream::getPropertyValue( const OUString& PropertyName ) - throw( beans::UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception ) { if ( PropertyName == "MediaType" ) { @@ -1385,20 +1365,17 @@ void ZipPackageStream::setSize ( const sal_Int64 nNewSize ) aEntry.nSize = nNewSize; } OUString ZipPackageStream::getImplementationName() - throw ( RuntimeException, std::exception ) { return OUString ("ZipPackageStream"); } Sequence< OUString > ZipPackageStream::getSupportedServiceNames() - throw ( RuntimeException, std::exception ) { Sequence aNames { "com.sun.star.packages.PackageStream" }; return aNames; } sal_Bool SAL_CALL ZipPackageStream::supportsService( OUString const & rServiceName ) - throw ( RuntimeException, std::exception ) { return cppu::supportsService(this, rServiceName); } diff --git a/package/source/zippackage/wrapstreamforshare.cxx b/package/source/zippackage/wrapstreamforshare.cxx index f97c213b4709..2065454c78c7 100644 --- a/package/source/zippackage/wrapstreamforshare.cxx +++ b/package/source/zippackage/wrapstreamforshare.cxx @@ -49,10 +49,6 @@ WrapStreamForShare::~WrapStreamForShare() // XInputStream sal_Int32 SAL_CALL WrapStreamForShare::readBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) - throw ( io::NotConnectedException, - io::BufferSizeExceededException, - io::IOException, - uno::RuntimeException, std::exception ) { if ( !m_xInStream.is() ) throw io::IOException(THROW_WHERE ); @@ -66,10 +62,6 @@ sal_Int32 SAL_CALL WrapStreamForShare::readBytes( uno::Sequence< sal_Int8 >& aDa } sal_Int32 SAL_CALL WrapStreamForShare::readSomeBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) - throw ( io::NotConnectedException, - io::BufferSizeExceededException, - io::IOException, - uno::RuntimeException, std::exception ) { if ( !m_xInStream.is() ) throw io::IOException(THROW_WHERE ); @@ -83,10 +75,6 @@ sal_Int32 SAL_CALL WrapStreamForShare::readSomeBytes( uno::Sequence< sal_Int8 >& } void SAL_CALL WrapStreamForShare::skipBytes( sal_Int32 nBytesToSkip ) - throw ( io::NotConnectedException, - io::BufferSizeExceededException, - io::IOException, - uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); @@ -100,9 +88,6 @@ void SAL_CALL WrapStreamForShare::skipBytes( sal_Int32 nBytesToSkip ) } sal_Int32 SAL_CALL WrapStreamForShare::available() - throw ( io::NotConnectedException, - io::IOException, - uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); @@ -113,9 +98,6 @@ sal_Int32 SAL_CALL WrapStreamForShare::available() } void SAL_CALL WrapStreamForShare::closeInput() - throw ( io::NotConnectedException, - io::IOException, - uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); @@ -130,9 +112,6 @@ void SAL_CALL WrapStreamForShare::closeInput() // XSeekable void SAL_CALL WrapStreamForShare::seek( sal_Int64 location ) - throw ( lang::IllegalArgumentException, - io::IOException, - uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); @@ -146,8 +125,6 @@ void SAL_CALL WrapStreamForShare::seek( sal_Int64 location ) } sal_Int64 SAL_CALL WrapStreamForShare::getPosition() - throw ( io::IOException, - uno::RuntimeException, std::exception) { ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); @@ -158,8 +135,6 @@ sal_Int64 SAL_CALL WrapStreamForShare::getPosition() } sal_Int64 SAL_CALL WrapStreamForShare::getLength() - throw ( io::IOException, - uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ); diff --git a/package/source/zippackage/wrapstreamforshare.hxx b/package/source/zippackage/wrapstreamforshare.hxx index 8fc51001755e..d96c6ffeb696 100644 --- a/package/source/zippackage/wrapstreamforshare.hxx +++ b/package/source/zippackage/wrapstreamforshare.hxx @@ -42,21 +42,16 @@ public: virtual ~WrapStreamForShare() 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; //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; }; diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx index b6875eee9e23..f7c40f29a012 100644 --- a/package/source/zippackage/zipfileaccess.cxx +++ b/package/source/zippackage/zipfileaccess.cxx @@ -164,8 +164,6 @@ bool OZipFileAccess::StringGoodForPattern_Impl( const OUString& aString, // XInitialization void SAL_CALL OZipFileAccess::initialize( const uno::Sequence< uno::Any >& aArguments ) - throw ( uno::Exception, - uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() ); @@ -258,9 +256,6 @@ void SAL_CALL OZipFileAccess::initialize( const uno::Sequence< uno::Any >& aArgu // XNameAccess uno::Any SAL_CALL OZipFileAccess::getByName( const OUString& aName ) - throw ( container::NoSuchElementException, - lang::WrappedTargetException, - uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() ); @@ -308,7 +303,6 @@ uno::Any SAL_CALL OZipFileAccess::getByName( const OUString& aName ) } uno::Sequence< OUString > SAL_CALL OZipFileAccess::getElementNames() - throw ( uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() ); @@ -342,7 +336,6 @@ uno::Sequence< OUString > SAL_CALL OZipFileAccess::getElementNames() } sal_Bool SAL_CALL OZipFileAccess::hasByName( const OUString& aName ) - throw (uno::RuntimeException, std::exception) { ::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() ); @@ -358,7 +351,6 @@ sal_Bool SAL_CALL OZipFileAccess::hasByName( const OUString& aName ) } uno::Type SAL_CALL OZipFileAccess::getElementType() - throw ( uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() ); @@ -372,7 +364,6 @@ uno::Type SAL_CALL OZipFileAccess::getElementType() } sal_Bool SAL_CALL OZipFileAccess::hasElements() - throw ( uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() ); @@ -387,9 +378,6 @@ sal_Bool SAL_CALL OZipFileAccess::hasElements() // XZipFileAccess uno::Reference< io::XInputStream > SAL_CALL OZipFileAccess::getStreamByPattern( const OUString& aPatternString ) - throw ( container::NoSuchElementException, - io::IOException, packages::WrongPasswordException, packages::zip::ZipException, - uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() ); @@ -422,7 +410,6 @@ uno::Reference< io::XInputStream > SAL_CALL OZipFileAccess::getStreamByPattern( // XComponent void SAL_CALL OZipFileAccess::dispose() - throw ( uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() ); @@ -449,7 +436,6 @@ void SAL_CALL OZipFileAccess::dispose() } void SAL_CALL OZipFileAccess::addEventListener( const uno::Reference< lang::XEventListener >& xListener ) - throw ( uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() ); @@ -462,7 +448,6 @@ void SAL_CALL OZipFileAccess::addEventListener( const uno::Reference< lang::XEve } void SAL_CALL OZipFileAccess::removeEventListener( const uno::Reference< lang::XEventListener >& xListener ) - throw ( uno::RuntimeException, std::exception ) { ::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() ); @@ -493,19 +478,16 @@ uno::Reference< uno::XInterface > SAL_CALL OZipFileAccess::impl_staticCreateSelf } OUString SAL_CALL OZipFileAccess::getImplementationName() - throw ( uno::RuntimeException, std::exception ) { return impl_staticGetImplementationName(); } sal_Bool SAL_CALL OZipFileAccess::supportsService( const OUString& ServiceName ) - throw ( uno::RuntimeException, std::exception ) { return cppu::supportsService(this, ServiceName); } uno::Sequence< OUString > SAL_CALL OZipFileAccess::getSupportedServiceNames() - throw ( uno::RuntimeException, std::exception ) { return impl_staticGetSupportedServiceNames(); } -- cgit