diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-01-26 12:28:58 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-01-26 12:54:43 +0000 |
commit | e57ca02849c3d87142ff5ff9099a212e72b8139c (patch) | |
tree | bcce66b27261553c308779f3e8663a269ed3a671 /basic/source/classes/errobject.cxx | |
parent | 8802ebd5172ec4bc412a59d136c82b77ab452281 (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 'basic/source/classes/errobject.cxx')
-rw-r--r-- | basic/source/classes/errobject.cxx | 56 |
1 files changed, 27 insertions, 29 deletions
diff --git a/basic/source/classes/errobject.cxx b/basic/source/classes/errobject.cxx index 1401dcd45242..7f90e16ce6b6 100644 --- a/basic/source/classes/errobject.cxx +++ b/basic/source/classes/errobject.cxx @@ -40,27 +40,27 @@ public: ErrObject(); // Attributes - virtual ::sal_Int32 SAL_CALL getNumber() throw (uno::RuntimeException, std::exception) override; - virtual void SAL_CALL setNumber( ::sal_Int32 _number ) throw (uno::RuntimeException, std::exception) override; - virtual ::sal_Int32 SAL_CALL getHelpContext() throw (uno::RuntimeException, std::exception) override; - virtual void SAL_CALL setHelpContext( ::sal_Int32 _helpcontext ) throw (uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getHelpFile() throw (uno::RuntimeException, std::exception) override; - virtual void SAL_CALL setHelpFile( const OUString& _helpfile ) throw (uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getDescription() throw (uno::RuntimeException, std::exception) override; - virtual void SAL_CALL setDescription( const OUString& _description ) throw (uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getSource() throw (uno::RuntimeException, std::exception) override; - virtual void SAL_CALL setSource( const OUString& _source ) throw (uno::RuntimeException, std::exception) override; + virtual ::sal_Int32 SAL_CALL getNumber() override; + virtual void SAL_CALL setNumber( ::sal_Int32 _number ) override; + virtual ::sal_Int32 SAL_CALL getHelpContext() override; + virtual void SAL_CALL setHelpContext( ::sal_Int32 _helpcontext ) override; + virtual OUString SAL_CALL getHelpFile() override; + virtual void SAL_CALL setHelpFile( const OUString& _helpfile ) override; + virtual OUString SAL_CALL getDescription() override; + virtual void SAL_CALL setDescription( const OUString& _description ) override; + virtual OUString SAL_CALL getSource() override; + virtual void SAL_CALL setSource( const OUString& _source ) override; // Methods - virtual void SAL_CALL Clear( ) throw (uno::RuntimeException, std::exception) override; - virtual void SAL_CALL Raise( const uno::Any& Number, const uno::Any& Source, const uno::Any& Description, const uno::Any& HelpFile, const uno::Any& HelpContext ) throw (uno::RuntimeException, std::exception) override; + virtual void SAL_CALL Clear( ) override; + virtual void SAL_CALL Raise( const uno::Any& Number, const uno::Any& Source, const uno::Any& Description, const uno::Any& HelpFile, const uno::Any& HelpContext ) override; // XDefaultProperty - virtual OUString SAL_CALL getDefaultPropertyName( ) throw (uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getDefaultPropertyName( ) override; // Helper method /// @throws css::uno::RuntimeException void setData( const uno::Any& Number, const uno::Any& Source, const uno::Any& Description, - const uno::Any& HelpFile, const uno::Any& HelpContext ) throw (uno::RuntimeException); + const uno::Any& HelpFile, const uno::Any& HelpContext ); }; ErrObject::ErrObject() : m_nNumber(0), m_nHelpContext(0) @@ -68,13 +68,13 @@ ErrObject::ErrObject() : m_nNumber(0), m_nHelpContext(0) } sal_Int32 SAL_CALL -ErrObject::getNumber() throw (uno::RuntimeException, std::exception) +ErrObject::getNumber() { return m_nNumber; } void SAL_CALL -ErrObject::setNumber( ::sal_Int32 _number ) throw (uno::RuntimeException, std::exception) +ErrObject::setNumber( ::sal_Int32 _number ) { GetSbData()->pInst->setErrorVB( _number, OUString() ); OUString _description = GetSbData()->pInst->GetErrorMsg(); @@ -82,55 +82,55 @@ ErrObject::setNumber( ::sal_Int32 _number ) throw (uno::RuntimeException, std::e } ::sal_Int32 SAL_CALL -ErrObject::getHelpContext() throw (uno::RuntimeException, std::exception) +ErrObject::getHelpContext() { return m_nHelpContext; } void SAL_CALL -ErrObject::setHelpContext( ::sal_Int32 _helpcontext ) throw (uno::RuntimeException, std::exception) +ErrObject::setHelpContext( ::sal_Int32 _helpcontext ) { m_nHelpContext = _helpcontext; } OUString SAL_CALL -ErrObject::getHelpFile() throw (uno::RuntimeException, std::exception) +ErrObject::getHelpFile() { return m_sHelpFile; } void SAL_CALL -ErrObject::setHelpFile( const OUString& _helpfile ) throw (uno::RuntimeException, std::exception) +ErrObject::setHelpFile( const OUString& _helpfile ) { m_sHelpFile = _helpfile; } OUString SAL_CALL -ErrObject::getDescription() throw (uno::RuntimeException, std::exception) +ErrObject::getDescription() { return m_sDescription; } void SAL_CALL -ErrObject::setDescription( const OUString& _description ) throw (uno::RuntimeException, std::exception) +ErrObject::setDescription( const OUString& _description ) { m_sDescription = _description; } OUString SAL_CALL -ErrObject::getSource() throw (uno::RuntimeException, std::exception) +ErrObject::getSource() { return m_sSource; } void SAL_CALL -ErrObject::setSource( const OUString& _source ) throw (uno::RuntimeException, std::exception) +ErrObject::setSource( const OUString& _source ) { m_sSource = _source; } // Methods void SAL_CALL -ErrObject::Clear( ) throw (uno::RuntimeException, std::exception) +ErrObject::Clear( ) { m_sHelpFile.clear(); m_sSource = m_sHelpFile; @@ -140,7 +140,7 @@ ErrObject::Clear( ) throw (uno::RuntimeException, std::exception) } void SAL_CALL -ErrObject::Raise( const uno::Any& Number, const uno::Any& Source, const uno::Any& Description, const uno::Any& HelpFile, const uno::Any& HelpContext ) throw (uno::RuntimeException, std::exception) +ErrObject::Raise( const uno::Any& Number, const uno::Any& Source, const uno::Any& Description, const uno::Any& HelpFile, const uno::Any& HelpContext ) { setData( Number, Source, Description, HelpFile, HelpContext ); if ( m_nNumber ) @@ -149,13 +149,12 @@ ErrObject::Raise( const uno::Any& Number, const uno::Any& Source, const uno::Any // XDefaultProperty OUString SAL_CALL -ErrObject::getDefaultPropertyName( ) throw (uno::RuntimeException, std::exception) +ErrObject::getDefaultPropertyName( ) { return OUString( "Number" ); } void ErrObject::setData( const uno::Any& Number, const uno::Any& Source, const uno::Any& Description, const uno::Any& HelpFile, const uno::Any& HelpContext ) - throw (uno::RuntimeException) { if ( !Number.hasValue() ) throw uno::RuntimeException("Missing Required Parameter" ); @@ -198,7 +197,6 @@ SbxErrObject::getErrObject() } void SbxErrObject::setNumberAndDescription( ::sal_Int32 _number, const OUString& _description ) - throw (uno::RuntimeException) { if( m_pErrObject != nullptr ) { |