summaryrefslogtreecommitdiff
path: root/unotools/source/misc
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/misc
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/misc')
-rw-r--r--unotools/source/misc/ServiceDocumenter.cxx3
-rw-r--r--unotools/source/misc/ServiceDocumenter.hxx14
-rw-r--r--unotools/source/misc/ZipPackageHelper.cxx2
-rw-r--r--unotools/source/misc/closeveto.cxx12
-rw-r--r--unotools/source/misc/desktopterminationobserver.cxx12
-rw-r--r--unotools/source/misc/eventlisteneradapter.cxx4
-rw-r--r--unotools/source/misc/mediadescriptor.cxx2
-rw-r--r--unotools/source/misc/sharedunocomponent.cxx12
8 files changed, 27 insertions, 34 deletions
diff --git a/unotools/source/misc/ServiceDocumenter.cxx b/unotools/source/misc/ServiceDocumenter.cxx
index 7b90b57ebfcc..f1d1500ccb74 100644
--- a/unotools/source/misc/ServiceDocumenter.cxx
+++ b/unotools/source/misc/ServiceDocumenter.cxx
@@ -16,7 +16,6 @@ using lang::XServiceInfo;
using lang::XTypeProvider;
void unotools::misc::ServiceDocumenter::showCoreDocs(const Reference<XServiceInfo>& xService)
- throw (css::uno::RuntimeException, std::exception)
{
if(!xService.is())
return;
@@ -26,7 +25,6 @@ void unotools::misc::ServiceDocumenter::showCoreDocs(const Reference<XServiceInf
}
void unotools::misc::ServiceDocumenter::showInterfaceDocs(const Reference<XTypeProvider>& xTypeProvider)
- throw (css::uno::RuntimeException, std::exception)
{
if(!xTypeProvider.is())
return;
@@ -43,7 +41,6 @@ void unotools::misc::ServiceDocumenter::showInterfaceDocs(const Reference<XTypeP
}
void unotools::misc::ServiceDocumenter::showServiceDocs(const Reference<XServiceInfo>& xService)
- throw (css::uno::RuntimeException, std::exception)
{
if(!xService.is())
return;
diff --git a/unotools/source/misc/ServiceDocumenter.hxx b/unotools/source/misc/ServiceDocumenter.hxx
index b600c5ff03be..a0701ce32a02 100644
--- a/unotools/source/misc/ServiceDocumenter.hxx
+++ b/unotools/source/misc/ServiceDocumenter.hxx
@@ -25,17 +25,17 @@ class ServiceDocumenter : public ::cppu::WeakImplHelper<
, m_sServiceBaseUrl("http://api.libreoffice.org/docs/idl/ref")
{};
// XServiceDocumenter
- virtual ::rtl::OUString SAL_CALL getCoreBaseUrl() throw (css::uno::RuntimeException, std::exception) override
+ virtual ::rtl::OUString SAL_CALL getCoreBaseUrl() override
{ return m_sCoreBaseUrl; };
- virtual void SAL_CALL setCoreBaseUrl( const ::rtl::OUString& sCoreBaseUrl ) throw (css::uno::RuntimeException, std::exception) override
+ virtual void SAL_CALL setCoreBaseUrl( const ::rtl::OUString& sCoreBaseUrl ) override
{ m_sCoreBaseUrl = sCoreBaseUrl; };
- virtual ::rtl::OUString SAL_CALL getServiceBaseUrl() throw (css::uno::RuntimeException, std::exception) override
+ virtual ::rtl::OUString SAL_CALL getServiceBaseUrl() override
{ return m_sServiceBaseUrl; };
- virtual void SAL_CALL setServiceBaseUrl( const ::rtl::OUString& sServiceBaseUrl ) throw (css::uno::RuntimeException, std::exception) override
+ virtual void SAL_CALL setServiceBaseUrl( const ::rtl::OUString& sServiceBaseUrl ) override
{ m_sServiceBaseUrl = sServiceBaseUrl; };
- virtual void SAL_CALL showServiceDocs( const ::css::uno::Reference< ::css::lang::XServiceInfo >& xService) throw (css::uno::RuntimeException, std::exception) override;
- virtual void SAL_CALL showInterfaceDocs( const ::css::uno::Reference< ::css::lang::XTypeProvider >& xTypeProvider ) throw (css::uno::RuntimeException, std::exception) override;
- virtual void SAL_CALL showCoreDocs( const ::css::uno::Reference< ::css::lang::XServiceInfo >& xService) throw (css::uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL showServiceDocs( const ::css::uno::Reference< ::css::lang::XServiceInfo >& xService) override;
+ virtual void SAL_CALL showInterfaceDocs( const ::css::uno::Reference< ::css::lang::XTypeProvider >& xTypeProvider ) override;
+ virtual void SAL_CALL showCoreDocs( const ::css::uno::Reference< ::css::lang::XServiceInfo >& xService) override;
protected:
virtual ~ServiceDocumenter() override
{};
diff --git a/unotools/source/misc/ZipPackageHelper.cxx b/unotools/source/misc/ZipPackageHelper.cxx
index 0656c45f29d8..763d01c222ac 100644
--- a/unotools/source/misc/ZipPackageHelper.cxx
+++ b/unotools/source/misc/ZipPackageHelper.cxx
@@ -105,7 +105,6 @@ Reference< XInterface >& ZipPackageHelper::getRootFolder()
Reference< XInterface > ZipPackageHelper::addFolder( Reference< XInterface >& xRootFolder,
const OUString& rName )
- throw( css::uno::Exception, std::exception )
{
if ( rName == ".." || rName == "." )
throw lang::IllegalArgumentException();
@@ -165,7 +164,6 @@ void ZipPackageHelper::addFolderWithContent( Reference< XInterface >& xRootFolde
void ZipPackageHelper::addFile( css::uno::Reference< css::uno::XInterface >& xRootFolder,
const OUString& rSourceFile )
- throw( Exception, std::exception )
{
OUString aFileURL( rSourceFile );
diff --git a/unotools/source/misc/closeveto.cxx b/unotools/source/misc/closeveto.cxx
index 18f352ff3b40..94804c921a10 100644
--- a/unotools/source/misc/closeveto.cxx
+++ b/unotools/source/misc/closeveto.cxx
@@ -51,11 +51,11 @@ namespace utl
}
// XCloseListener
- virtual void SAL_CALL queryClosing( const EventObject& Source, sal_Bool GetsOwnership ) throw (CloseVetoException, RuntimeException, std::exception) override;
- virtual void SAL_CALL notifyClosing( const EventObject& Source ) throw (RuntimeException, std::exception) override;
+ virtual void SAL_CALL queryClosing( const EventObject& Source, sal_Bool GetsOwnership ) override;
+ virtual void SAL_CALL notifyClosing( const EventObject& Source ) override;
// XEventListener
- virtual void SAL_CALL disposing( const EventObject& Source) throw (RuntimeException, std::exception) override;
+ virtual void SAL_CALL disposing( const EventObject& Source) override;
bool hasOwnership() const { return m_bHasOwnership; }
@@ -68,7 +68,7 @@ namespace utl
bool m_bHasOwnership;
};
- void SAL_CALL CloseListener_Impl::queryClosing( const EventObject& i_source, sal_Bool i_deliverOwnership ) throw (CloseVetoException, RuntimeException, std::exception)
+ void SAL_CALL CloseListener_Impl::queryClosing( const EventObject& i_source, sal_Bool i_deliverOwnership )
{
(void)i_source;
@@ -78,12 +78,12 @@ namespace utl
throw CloseVetoException();
}
- void SAL_CALL CloseListener_Impl::notifyClosing( const EventObject& i_source ) throw (RuntimeException, std::exception)
+ void SAL_CALL CloseListener_Impl::notifyClosing( const EventObject& i_source )
{
(void)i_source;
}
- void SAL_CALL CloseListener_Impl::disposing( const EventObject& i_source ) throw (RuntimeException, std::exception)
+ void SAL_CALL CloseListener_Impl::disposing( const EventObject& i_source )
{
(void)i_source;
}
diff --git a/unotools/source/misc/desktopterminationobserver.cxx b/unotools/source/misc/desktopterminationobserver.cxx
index 4d27a6d49208..be4f1b87bdfc 100644
--- a/unotools/source/misc/desktopterminationobserver.cxx
+++ b/unotools/source/misc/desktopterminationobserver.cxx
@@ -67,11 +67,11 @@ namespace utl
private:
// XTerminateListener
- virtual void SAL_CALL queryTermination( const EventObject& Event ) throw (TerminationVetoException, RuntimeException, std::exception) override;
- virtual void SAL_CALL notifyTermination( const EventObject& Event ) throw (RuntimeException, std::exception) override;
+ virtual void SAL_CALL queryTermination( const EventObject& Event ) override;
+ virtual void SAL_CALL notifyTermination( const EventObject& Event ) override;
// XEventListener
- virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) throw (css::uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
};
OObserverImpl::OObserverImpl()
@@ -105,7 +105,7 @@ namespace utl
}
}
- void SAL_CALL OObserverImpl::queryTermination( const EventObject& /*Event*/ ) throw (TerminationVetoException, RuntimeException, std::exception)
+ void SAL_CALL OObserverImpl::queryTermination( const EventObject& /*Event*/ )
{
Listeners aToNotify;
{
@@ -123,7 +123,7 @@ namespace utl
}
}
- void SAL_CALL OObserverImpl::notifyTermination( const EventObject& /*Event*/ ) throw (RuntimeException, std::exception)
+ void SAL_CALL OObserverImpl::notifyTermination( const EventObject& /*Event*/ )
{
// get the listeners
Listeners aToNotify;
@@ -150,7 +150,7 @@ namespace utl
}
}
- void SAL_CALL OObserverImpl::disposing( const EventObject& /*Event*/ ) throw (RuntimeException, std::exception)
+ void SAL_CALL OObserverImpl::disposing( const EventObject& /*Event*/ )
{
#if OSL_DEBUG_LEVEL > 0
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
diff --git a/unotools/source/misc/eventlisteneradapter.cxx b/unotools/source/misc/eventlisteneradapter.cxx
index f33811a463a6..07a24d88705a 100644
--- a/unotools/source/misc/eventlisteneradapter.cxx
+++ b/unotools/source/misc/eventlisteneradapter.cxx
@@ -50,7 +50,7 @@ namespace utl
const Reference< XComponent >& getComponent() const { return m_xComponent; }
protected:
- virtual void SAL_CALL disposing( const EventObject& _rSource ) throw (RuntimeException, std::exception) override;
+ virtual void SAL_CALL disposing( const EventObject& _rSource ) override;
};
OEventListenerImpl::OEventListenerImpl( OEventListenerAdapter* _pAdapter, const Reference< XComponent >& _rxComp )
@@ -79,7 +79,7 @@ namespace utl
}
}
- void SAL_CALL OEventListenerImpl::disposing( const EventObject& _rSource ) throw (RuntimeException, std::exception)
+ void SAL_CALL OEventListenerImpl::disposing( const EventObject& _rSource )
{
Reference< XEventListener > xDeleteUponLeaving = m_xKeepMeAlive;
m_xKeepMeAlive.clear();
diff --git a/unotools/source/misc/mediadescriptor.cxx b/unotools/source/misc/mediadescriptor.cxx
index 5010164ec6fb..68d9f030e10e 100644
--- a/unotools/source/misc/mediadescriptor.cxx
+++ b/unotools/source/misc/mediadescriptor.cxx
@@ -527,7 +527,6 @@ bool MediaDescriptor::impl_addInputStream( bool bLockFile )
}
bool MediaDescriptor::impl_openStreamWithPostData( const css::uno::Reference< css::io::XInputStream >& _rxPostData )
- throw(css::uno::RuntimeException)
{
if ( !_rxPostData.is() )
throw css::lang::IllegalArgumentException("Found invalid PostData.",
@@ -597,7 +596,6 @@ bool MediaDescriptor::impl_openStreamWithPostData( const css::uno::Reference< cs
/*-----------------------------------------------*/
bool MediaDescriptor::impl_openStreamWithURL( const OUString& sURL, bool bLockFile )
- throw(css::uno::RuntimeException)
{
OUString referer(getUnpackedValueOrDefault(PROP_REFERRER(), OUString()));
if (SvtSecurityOptions().isUntrustedReferer(referer)) {
diff --git a/unotools/source/misc/sharedunocomponent.cxx b/unotools/source/misc/sharedunocomponent.cxx
index f4a2ae4536b9..fe44e5d441be 100644
--- a/unotools/source/misc/sharedunocomponent.cxx
+++ b/unotools/source/misc/sharedunocomponent.cxx
@@ -87,11 +87,11 @@ namespace utl
virtual ~CloseableComponentImpl() override;
// XCloseListener overridables
- virtual void SAL_CALL queryClosing( const EventObject& Source, sal_Bool GetsOwnership ) throw (CloseVetoException, RuntimeException, std::exception) override;
- virtual void SAL_CALL notifyClosing( const EventObject& Source ) throw (RuntimeException, std::exception) override;
+ virtual void SAL_CALL queryClosing( const EventObject& Source, sal_Bool GetsOwnership ) override;
+ virtual void SAL_CALL notifyClosing( const EventObject& Source ) override;
// XEventListener overridables
- virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) throw (css::uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
private:
/** starts or stops being a CloseListener at the component
@@ -158,7 +158,7 @@ namespace utl
}
}
- void SAL_CALL CloseableComponentImpl::queryClosing( const EventObject& Source, sal_Bool /*GetsOwnership*/ ) throw (CloseVetoException, RuntimeException, std::exception)
+ void SAL_CALL CloseableComponentImpl::queryClosing( const EventObject& Source, sal_Bool /*GetsOwnership*/ )
{
// as long as we live, somebody wants to keep the object alive. So, veto the
// closing
@@ -166,7 +166,7 @@ namespace utl
throw CloseVetoException();
}
- void SAL_CALL CloseableComponentImpl::notifyClosing( const EventObject& Source ) throw (RuntimeException, std::exception)
+ void SAL_CALL CloseableComponentImpl::notifyClosing( const EventObject& Source )
{
DBG_ASSERT( Source.Source == m_xCloseable, "CloseableComponentImpl::notifyClosing: where did this come from?" );
@@ -176,7 +176,7 @@ namespace utl
OSL_FAIL( "CloseableComponentImpl::notifyClosing: unreachable!" );
}
- void SAL_CALL CloseableComponentImpl::disposing( const EventObject& Source ) throw (RuntimeException, std::exception)
+ void SAL_CALL CloseableComponentImpl::disposing( const EventObject& Source )
{
DBG_ASSERT( Source.Source == m_xCloseable, "CloseableComponentImpl::disposing: where did this come from?" );
OSL_FAIL( "CloseableComponentImpl::disposing: unreachable!" );