summaryrefslogtreecommitdiff
path: root/sfx2/source/notify
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 /sfx2/source/notify
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 'sfx2/source/notify')
-rw-r--r--sfx2/source/notify/eventsupplier.cxx16
-rw-r--r--sfx2/source/notify/globalevents.cxx73
2 files changed, 24 insertions, 65 deletions
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index aa94e1b8e07f..807b353b0d16 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -53,8 +53,6 @@ using namespace css;
// --- XNameReplace ---
void SAL_CALL SfxEvents_Impl::replaceByName( const OUString & aName, const uno::Any & rElement )
- throw( lang::IllegalArgumentException, container::NoSuchElementException,
- lang::WrappedTargetException, uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( maMutex );
@@ -111,8 +109,6 @@ void SAL_CALL SfxEvents_Impl::replaceByName( const OUString & aName, const uno::
// --- XNameAccess ---
uno::Any SAL_CALL SfxEvents_Impl::getByName( const OUString& aName )
- throw( container::NoSuchElementException, lang::WrappedTargetException,
- uno::RuntimeException, std::exception )
{
::osl::MutexGuard aGuard( maMutex );
@@ -130,13 +126,13 @@ uno::Any SAL_CALL SfxEvents_Impl::getByName( const OUString& aName )
}
-uno::Sequence< OUString > SAL_CALL SfxEvents_Impl::getElementNames() throw ( uno::RuntimeException, std::exception )
+uno::Sequence< OUString > SAL_CALL SfxEvents_Impl::getElementNames()
{
return maEventNames;
}
-sal_Bool SAL_CALL SfxEvents_Impl::hasByName( const OUString& aName ) throw ( uno::RuntimeException, std::exception )
+sal_Bool SAL_CALL SfxEvents_Impl::hasByName( const OUString& aName )
{
::osl::MutexGuard aGuard( maMutex );
@@ -156,14 +152,14 @@ sal_Bool SAL_CALL SfxEvents_Impl::hasByName( const OUString& aName ) throw ( uno
// --- XElementAccess ( parent of XNameAccess ) ---
-uno::Type SAL_CALL SfxEvents_Impl::getElementType() throw ( uno::RuntimeException, std::exception )
+uno::Type SAL_CALL SfxEvents_Impl::getElementType()
{
uno::Type aElementType = cppu::UnoType<uno::Sequence < beans::PropertyValue >>::get();
return aElementType;
}
-sal_Bool SAL_CALL SfxEvents_Impl::hasElements() throw ( uno::RuntimeException, std::exception )
+sal_Bool SAL_CALL SfxEvents_Impl::hasElements()
{
::osl::MutexGuard aGuard( maMutex );
@@ -268,7 +264,7 @@ void SfxEvents_Impl::Execute( uno::Any& aEventData, const document::DocumentEven
// --- ::document::XEventListener ---
-void SAL_CALL SfxEvents_Impl::notifyEvent( const document::EventObject& aEvent ) throw( uno::RuntimeException, std::exception )
+void SAL_CALL SfxEvents_Impl::notifyEvent( const document::EventObject& aEvent )
{
::osl::ClearableMutexGuard aGuard( maMutex );
@@ -298,7 +294,7 @@ void SAL_CALL SfxEvents_Impl::notifyEvent( const document::EventObject& aEvent )
// --- ::lang::XEventListener ---
-void SAL_CALL SfxEvents_Impl::disposing( const lang::EventObject& /*Source*/ ) throw( uno::RuntimeException, std::exception )
+void SAL_CALL SfxEvents_Impl::disposing( const lang::EventObject& /*Source*/ )
{
::osl::MutexGuard aGuard( maMutex );
diff --git a/sfx2/source/notify/globalevents.cxx b/sfx2/source/notify/globalevents.cxx
index c4a7ab946c44..b4db95ec412a 100644
--- a/sfx2/source/notify/globalevents.cxx
+++ b/sfx2/source/notify/globalevents.cxx
@@ -74,75 +74,57 @@ class SfxGlobalEvents_Impl : public ModelCollectionMutexBase
public:
explicit SfxGlobalEvents_Impl(const css::uno::Reference < css::uno::XComponentContext >& rxContext);
- virtual OUString SAL_CALL getImplementationName()
- throw (css::uno::RuntimeException, std::exception) override
+ virtual OUString SAL_CALL getImplementationName() override
{
return OUString("com.sun.star.comp.sfx2.GlobalEventBroadcaster");
}
- virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName)
- throw (css::uno::RuntimeException, std::exception) override
+ virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override
{
return cppu::supportsService(this, ServiceName);
}
- virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
- throw (css::uno::RuntimeException, std::exception) override
+ virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override
{
css::uno::Sequence< OUString > aSeq { "com.sun.star.frame.GlobalEventBroadcaster" };
return aSeq;
}
// css.document.XEventBroadcaster
- virtual css::uno::Reference< css::container::XNameReplace > SAL_CALL getEvents()
- throw(css::uno::RuntimeException, std::exception) override;
+ virtual css::uno::Reference< css::container::XNameReplace > SAL_CALL getEvents() override;
- virtual void SAL_CALL addEventListener(const css::uno::Reference< css::document::XEventListener >& xListener)
- throw(css::uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL addEventListener(const css::uno::Reference< css::document::XEventListener >& xListener) override;
- virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::document::XEventListener >& xListener)
- throw(css::uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::document::XEventListener >& xListener) override;
// css.document.XDocumentEventBroadcaster
- virtual void SAL_CALL addDocumentEventListener( const css::uno::Reference< css::document::XDocumentEventListener >& Listener ) throw (css::uno::RuntimeException, std::exception) override;
- virtual void SAL_CALL removeDocumentEventListener( const css::uno::Reference< css::document::XDocumentEventListener >& Listener ) throw (css::uno::RuntimeException, std::exception) override;
- virtual void SAL_CALL notifyDocumentEvent( const OUString& EventName, const css::uno::Reference< css::frame::XController2 >& ViewController, const css::uno::Any& Supplement ) throw (css::lang::IllegalArgumentException, css::lang::NoSupportException, css::uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL addDocumentEventListener( const css::uno::Reference< css::document::XDocumentEventListener >& Listener ) override;
+ virtual void SAL_CALL removeDocumentEventListener( const css::uno::Reference< css::document::XDocumentEventListener >& Listener ) override;
+ virtual void SAL_CALL notifyDocumentEvent( const OUString& EventName, const css::uno::Reference< css::frame::XController2 >& ViewController, const css::uno::Any& Supplement ) override;
// css.document.XEventListener
- virtual void SAL_CALL notifyEvent(const css::document::EventObject& aEvent)
- throw(css::uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL notifyEvent(const css::document::EventObject& aEvent) override;
// css.document.XDocumentEventListener
- virtual void SAL_CALL documentEventOccured( const css::document::DocumentEvent& Event ) throw (css::uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL documentEventOccured( const css::document::DocumentEvent& Event ) override;
// css.container.XSet
- virtual sal_Bool SAL_CALL has(const css::uno::Any& aElement)
- throw(css::uno::RuntimeException, std::exception) override;
+ virtual sal_Bool SAL_CALL has(const css::uno::Any& aElement) override;
- virtual void SAL_CALL insert(const css::uno::Any& aElement)
- throw(css::lang::IllegalArgumentException ,
- css::container::ElementExistException,
- css::uno::RuntimeException, std::exception ) override;
+ virtual void SAL_CALL insert(const css::uno::Any& aElement) override;
- virtual void SAL_CALL remove(const css::uno::Any& aElement)
- throw(css::lang::IllegalArgumentException ,
- css::container::NoSuchElementException,
- css::uno::RuntimeException, std::exception ) override;
+ virtual void SAL_CALL remove(const css::uno::Any& aElement) override;
// css.container.XEnumerationAccess
- virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration()
- throw(css::uno::RuntimeException, std::exception) override;
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override;
// css.container.XElementAccess
- 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;
// css.lang.XEventListener
- virtual void SAL_CALL disposing(const css::lang::EventObject& aEvent)
- throw(css::uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL disposing(const css::lang::EventObject& aEvent) override;
private:
@@ -170,7 +152,6 @@ SfxGlobalEvents_Impl::SfxGlobalEvents_Impl( const uno::Reference < uno::XCompone
}
uno::Reference< container::XNameReplace > SAL_CALL SfxGlobalEvents_Impl::getEvents()
- throw(uno::RuntimeException, std::exception)
{
// SAFE ->
::osl::ResettableMutexGuard aLock(m_aLock);
@@ -180,7 +161,6 @@ uno::Reference< container::XNameReplace > SAL_CALL SfxGlobalEvents_Impl::getEven
void SAL_CALL SfxGlobalEvents_Impl::addEventListener(const uno::Reference< document::XEventListener >& xListener)
- throw(uno::RuntimeException, std::exception)
{
// container is threadsafe
m_aLegacyListeners.addInterface(xListener);
@@ -188,7 +168,6 @@ void SAL_CALL SfxGlobalEvents_Impl::addEventListener(const uno::Reference< docum
void SAL_CALL SfxGlobalEvents_Impl::removeEventListener(const uno::Reference< document::XEventListener >& xListener)
- throw(uno::RuntimeException, std::exception)
{
// container is threadsafe
m_aLegacyListeners.removeInterface(xListener);
@@ -196,14 +175,12 @@ void SAL_CALL SfxGlobalEvents_Impl::removeEventListener(const uno::Reference< do
void SAL_CALL SfxGlobalEvents_Impl::addDocumentEventListener( const uno::Reference< document::XDocumentEventListener >& Listener )
- throw(uno::RuntimeException, std::exception)
{
m_aDocumentListeners.addInterface( Listener );
}
void SAL_CALL SfxGlobalEvents_Impl::removeDocumentEventListener( const uno::Reference< document::XDocumentEventListener >& Listener )
- throw(uno::RuntimeException, std::exception)
{
m_aDocumentListeners.removeInterface( Listener );
}
@@ -211,7 +188,6 @@ void SAL_CALL SfxGlobalEvents_Impl::removeDocumentEventListener( const uno::Refe
void SAL_CALL SfxGlobalEvents_Impl::notifyDocumentEvent( const OUString& /*_EventName*/,
const uno::Reference< frame::XController2 >& /*_ViewController*/, const uno::Any& /*_Supplement*/ )
- throw (lang::IllegalArgumentException, lang::NoSupportException, uno::RuntimeException, std::exception)
{
// we're a multiplexer only, no chance to generate artificial events here
throw lang::NoSupportException(OUString(), *this);
@@ -219,7 +195,6 @@ void SAL_CALL SfxGlobalEvents_Impl::notifyDocumentEvent( const OUString& /*_Even
void SAL_CALL SfxGlobalEvents_Impl::notifyEvent(const document::EventObject& aEvent)
- throw(uno::RuntimeException, std::exception)
{
document::DocumentEvent aDocEvent(aEvent.Source, aEvent.EventName, nullptr, uno::Any());
implts_notifyJobExecution(aEvent);
@@ -229,7 +204,6 @@ void SAL_CALL SfxGlobalEvents_Impl::notifyEvent(const document::EventObject& aEv
void SAL_CALL SfxGlobalEvents_Impl::documentEventOccured( const document::DocumentEvent& Event )
- throw (uno::RuntimeException, std::exception)
{
implts_notifyJobExecution(document::EventObject(Event.Source, Event.EventName));
implts_checkAndExecuteEventBindings(Event);
@@ -238,7 +212,6 @@ void SAL_CALL SfxGlobalEvents_Impl::documentEventOccured( const document::Docume
void SAL_CALL SfxGlobalEvents_Impl::disposing(const lang::EventObject& aEvent)
- throw(uno::RuntimeException, std::exception)
{
uno::Reference< frame::XModel > xDoc(aEvent.Source, uno::UNO_QUERY);
@@ -253,7 +226,6 @@ void SAL_CALL SfxGlobalEvents_Impl::disposing(const lang::EventObject& aEvent)
sal_Bool SAL_CALL SfxGlobalEvents_Impl::has(const uno::Any& aElement)
- throw (uno::RuntimeException, std::exception)
{
uno::Reference< frame::XModel > xDoc;
aElement >>= xDoc;
@@ -273,9 +245,6 @@ sal_Bool SAL_CALL SfxGlobalEvents_Impl::has(const uno::Any& aElement)
void SAL_CALL SfxGlobalEvents_Impl::insert( const uno::Any& aElement )
- throw (lang::IllegalArgumentException ,
- container::ElementExistException,
- uno::RuntimeException, std::exception )
{
uno::Reference< frame::XModel > xDoc;
aElement >>= xDoc;
@@ -310,9 +279,6 @@ void SAL_CALL SfxGlobalEvents_Impl::insert( const uno::Any& aElement )
void SAL_CALL SfxGlobalEvents_Impl::remove( const uno::Any& aElement )
- throw (lang::IllegalArgumentException ,
- container::NoSuchElementException,
- uno::RuntimeException, std::exception )
{
uno::Reference< frame::XModel > xDoc;
aElement >>= xDoc;
@@ -347,7 +313,6 @@ void SAL_CALL SfxGlobalEvents_Impl::remove( const uno::Any& aElement )
uno::Reference< container::XEnumeration > SAL_CALL SfxGlobalEvents_Impl::createEnumeration()
- throw (uno::RuntimeException, std::exception)
{
// SAFE ->
::osl::ResettableMutexGuard aLock(m_aLock);
@@ -367,14 +332,12 @@ uno::Reference< container::XEnumeration > SAL_CALL SfxGlobalEvents_Impl::createE
uno::Type SAL_CALL SfxGlobalEvents_Impl::getElementType()
- throw (uno::RuntimeException, std::exception)
{
return cppu::UnoType<frame::XModel>::get();
}
sal_Bool SAL_CALL SfxGlobalEvents_Impl::hasElements()
- throw (uno::RuntimeException, std::exception)
{
// SAFE ->
::osl::ResettableMutexGuard aLock(m_aLock);