summaryrefslogtreecommitdiff
path: root/unotools/source/config
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/config
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/config')
-rw-r--r--unotools/source/config/configitem.cxx8
-rw-r--r--unotools/source/config/eventcfg.cxx38
-rw-r--r--unotools/source/config/itemholder1.cxx1
-rw-r--r--unotools/source/config/itemholder1.hxx3
-rw-r--r--unotools/source/config/useroptions.cxx8
5 files changed, 28 insertions, 30 deletions
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index b40d0ccde3c9..ae468e78d701 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -73,10 +73,10 @@ namespace utl{
ConfigChangeListener_Impl(ConfigItem& rItem, const Sequence< OUString >& rNames);
//XChangesListener
- virtual void SAL_CALL changesOccurred( const ChangesEvent& Event ) throw(RuntimeException, std::exception) override;
+ virtual void SAL_CALL changesOccurred( const ChangesEvent& Event ) override;
//XEventListener
- virtual void SAL_CALL disposing( const EventObject& Source ) throw(RuntimeException, std::exception) override;
+ virtual void SAL_CALL disposing( const EventObject& Source ) override;
};
}
@@ -116,7 +116,7 @@ static bool lcl_Find(
return false;
}
-void ConfigChangeListener_Impl::changesOccurred( const ChangesEvent& rEvent ) throw(RuntimeException, std::exception)
+void ConfigChangeListener_Impl::changesOccurred( const ChangesEvent& rEvent )
{
const ElementChange* pElementChanges = rEvent.Changes.getConstArray();
@@ -145,7 +145,7 @@ void ConfigChangeListener_Impl::changesOccurred( const ChangesEvent& rEvent ) th
}
}
-void ConfigChangeListener_Impl::disposing( const EventObject& /*rSource*/ ) throw(RuntimeException, std::exception)
+void ConfigChangeListener_Impl::disposing( const EventObject& /*rSource*/ )
{
pParent->RemoveChangesListener();
}
diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx
index a2faf43afbf3..0965269b44e6 100644
--- a/unotools/source/config/eventcfg.cxx
+++ b/unotools/source/config/eventcfg.cxx
@@ -99,19 +99,19 @@ public:
/// @throws css::container::NoSuchElementException
/// @throws css::lang::WrappedTargetException
/// @throws css::uno::RuntimeException
- 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);
+ void SAL_CALL replaceByName( const OUString& aName, const css::uno::Any& aElement );
/// @throws css::container::NoSuchElementException
/// @throws css::lang::WrappedTargetException
/// @throws css::uno::RuntimeException
- css::uno::Any SAL_CALL getByName( const OUString& aName ) throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ css::uno::Any SAL_CALL getByName( const OUString& aName );
/// @throws css::uno::RuntimeException
- css::uno::Sequence< OUString > SAL_CALL getElementNames( ) throw (css::uno::RuntimeException);
+ css::uno::Sequence< OUString > SAL_CALL getElementNames( );
/// @throws css::uno::RuntimeException
- bool SAL_CALL hasByName( const OUString& aName ) throw (css::uno::RuntimeException);
+ bool SAL_CALL hasByName( const OUString& aName );
/// @throws css::uno::RuntimeException
- static css::uno::Type SAL_CALL getElementType( ) throw (css::uno::RuntimeException);
+ static css::uno::Type SAL_CALL getElementType( );
/// @throws css::uno::RuntimeException
- bool SAL_CALL hasElements( ) throw (css::uno::RuntimeException);
+ bool SAL_CALL hasElements( );
OUString GetEventName( GlobalEventId nID );
};
@@ -236,7 +236,7 @@ void GlobalEventConfig_Impl::initBindingInfo()
}
}
-void SAL_CALL GlobalEventConfig_Impl::replaceByName( const OUString& aName, const Any& aElement ) throw (lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, RuntimeException)
+void SAL_CALL GlobalEventConfig_Impl::replaceByName( const OUString& aName, const Any& aElement )
{
Sequence< beans::PropertyValue > props;
//DF should we prepopulate the hash with a list of valid event Names?
@@ -256,7 +256,7 @@ void SAL_CALL GlobalEventConfig_Impl::replaceByName( const OUString& aName, cons
SetModified();
}
-Any SAL_CALL GlobalEventConfig_Impl::getByName( const OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, RuntimeException)
+Any SAL_CALL GlobalEventConfig_Impl::getByName( const OUString& aName )
{
Any aRet;
Sequence< beans::PropertyValue > props(2);
@@ -282,12 +282,12 @@ Any SAL_CALL GlobalEventConfig_Impl::getByName( const OUString& aName ) throw (c
return aRet;
}
-Sequence< OUString > SAL_CALL GlobalEventConfig_Impl::getElementNames( ) throw (RuntimeException)
+Sequence< OUString > SAL_CALL GlobalEventConfig_Impl::getElementNames( )
{
return uno::Sequence< OUString >(m_supportedEvents.data(), SupportedEventsVector::size());
}
-bool SAL_CALL GlobalEventConfig_Impl::hasByName( const OUString& aName ) throw (RuntimeException)
+bool SAL_CALL GlobalEventConfig_Impl::hasByName( const OUString& aName )
{
if ( m_eventBindingHash.find( aName ) != m_eventBindingHash.end() )
return true;
@@ -301,13 +301,13 @@ bool SAL_CALL GlobalEventConfig_Impl::hasByName( const OUString& aName ) throw (
return false;
}
-Type SAL_CALL GlobalEventConfig_Impl::getElementType( ) throw (RuntimeException)
+Type SAL_CALL GlobalEventConfig_Impl::getElementType( )
{
//DF definitely not sure about this??
return cppu::UnoType<Sequence<beans::PropertyValue>>::get();
}
-bool SAL_CALL GlobalEventConfig_Impl::hasElements( ) throw (RuntimeException)
+bool SAL_CALL GlobalEventConfig_Impl::hasElements( )
{
return ( m_eventBindingHash.empty() );
}
@@ -347,39 +347,39 @@ GlobalEventConfig::~GlobalEventConfig()
}
}
-Reference< container::XNameReplace > SAL_CALL GlobalEventConfig::getEvents() throw (css::uno::RuntimeException, std::exception)
+Reference< container::XNameReplace > SAL_CALL GlobalEventConfig::getEvents()
{
MutexGuard aGuard( GetOwnStaticMutex() );
Reference< container::XNameReplace > ret(this);
return ret;
}
-void SAL_CALL GlobalEventConfig::replaceByName( const OUString& aName, const Any& aElement ) throw (lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, RuntimeException, std::exception)
+void SAL_CALL GlobalEventConfig::replaceByName( const OUString& aName, const Any& aElement )
{
MutexGuard aGuard( GetOwnStaticMutex() );
m_pImpl->replaceByName( aName, aElement );
}
-Any SAL_CALL GlobalEventConfig::getByName( const OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, RuntimeException, std::exception)
+Any SAL_CALL GlobalEventConfig::getByName( const OUString& aName )
{
MutexGuard aGuard( GetOwnStaticMutex() );
return m_pImpl->getByName( aName );
}
-Sequence< OUString > SAL_CALL GlobalEventConfig::getElementNames( ) throw (RuntimeException, std::exception)
+Sequence< OUString > SAL_CALL GlobalEventConfig::getElementNames( )
{
MutexGuard aGuard( GetOwnStaticMutex() );
return m_pImpl->getElementNames( );
}
-sal_Bool SAL_CALL GlobalEventConfig::hasByName( const OUString& aName ) throw (RuntimeException, std::exception)
+sal_Bool SAL_CALL GlobalEventConfig::hasByName( const OUString& aName )
{
MutexGuard aGuard( GetOwnStaticMutex() );
return m_pImpl->hasByName( aName );
}
-Type SAL_CALL GlobalEventConfig::getElementType( ) throw (RuntimeException, std::exception)
+Type SAL_CALL GlobalEventConfig::getElementType( )
{
MutexGuard aGuard( GetOwnStaticMutex() );
return GlobalEventConfig_Impl::getElementType( );
}
-sal_Bool SAL_CALL GlobalEventConfig::hasElements( ) throw (RuntimeException, std::exception)
+sal_Bool SAL_CALL GlobalEventConfig::hasElements( )
{
MutexGuard aGuard( GetOwnStaticMutex() );
return m_pImpl->hasElements( );
diff --git a/unotools/source/config/itemholder1.cxx b/unotools/source/config/itemholder1.cxx
index 43a239b7e1fd..76e06437bf5e 100644
--- a/unotools/source/config/itemholder1.cxx
+++ b/unotools/source/config/itemholder1.cxx
@@ -88,7 +88,6 @@ void ItemHolder1::holdConfigItem(EItem eItem)
}
void SAL_CALL ItemHolder1::disposing(const css::lang::EventObject&)
- throw(css::uno::RuntimeException, std::exception)
{
css::uno::Reference< css::uno::XInterface > xSelfHold(static_cast< css::lang::XEventListener* >(this), css::uno::UNO_QUERY);
impl_releaseAllItems();
diff --git a/unotools/source/config/itemholder1.hxx b/unotools/source/config/itemholder1.hxx
index 9a1626dadc88..c181c579da1f 100644
--- a/unotools/source/config/itemholder1.hxx
+++ b/unotools/source/config/itemholder1.hxx
@@ -43,8 +43,7 @@ class ItemHolder1 : private ItemHolderMutexBase
// uno interface
public:
- 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;
// helper
private:
diff --git a/unotools/source/config/useroptions.cxx b/unotools/source/config/useroptions.cxx
index 747997dcca61..6459495157f7 100644
--- a/unotools/source/config/useroptions.cxx
+++ b/unotools/source/config/useroptions.cxx
@@ -76,9 +76,9 @@ public:
explicit ChangeListener (Impl& rParent): m_rParent(rParent) { }
// XChangesListener
- virtual void SAL_CALL changesOccurred (util::ChangesEvent const& Event) throw(uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL changesOccurred (util::ChangesEvent const& Event) override;
// XEventListener
- virtual void SAL_CALL disposing (lang::EventObject const& Source) throw(uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL disposing (lang::EventObject const& Source) override;
private:
Impl& m_rParent;
@@ -102,13 +102,13 @@ private:
uno::Reference<beans::XPropertySet> m_xData;
};
-void SvtUserOptions::ChangeListener::changesOccurred (util::ChangesEvent const& rEvent) throw(uno::RuntimeException, std::exception)
+void SvtUserOptions::ChangeListener::changesOccurred (util::ChangesEvent const& rEvent)
{
if (rEvent.Changes.getLength())
m_rParent.Notify();
}
-void SvtUserOptions::ChangeListener::disposing (lang::EventObject const& rSource) throw(uno::RuntimeException, std::exception)
+void SvtUserOptions::ChangeListener::disposing (lang::EventObject const& rSource)
{
try
{