diff options
Diffstat (limited to 'forms/source/xforms')
24 files changed, 228 insertions, 480 deletions
diff --git a/forms/source/xforms/NameContainer.hxx b/forms/source/xforms/NameContainer.hxx index aa2a86c10535..f5aad0950ea2 100644 --- a/forms/source/xforms/NameContainer.hxx +++ b/forms/source/xforms/NameContainer.hxx @@ -83,14 +83,12 @@ public: // methods for XElementAccess - virtual css::uno::Type SAL_CALL getElementType() - throw( css::uno::RuntimeException, std::exception ) override + virtual css::uno::Type SAL_CALL getElementType() override { return cppu::UnoType<T>::get(); } - virtual sal_Bool SAL_CALL hasElements() - throw( css::uno::RuntimeException, std::exception ) override + virtual sal_Bool SAL_CALL hasElements() override { return ! maItems.empty(); } @@ -100,10 +98,7 @@ public: virtual css::uno::Any SAL_CALL getByName( - const OUString& rName ) - throw( css::container::NoSuchElementException, - css::lang::WrappedTargetException, - css::uno::RuntimeException, std::exception ) override + const OUString& rName ) override { typename map_t::const_iterator aIter = findItem( rName ); if( aIter == maItems.end() ) @@ -112,15 +107,13 @@ public: return css::uno::makeAny( aIter->second ); } - virtual css::uno::Sequence<OUString> SAL_CALL getElementNames() - throw( css::uno::RuntimeException, std::exception ) override + virtual css::uno::Sequence<OUString> SAL_CALL getElementNames() override { return comphelper::mapKeysToSequence(maItems); } virtual sal_Bool SAL_CALL hasByName( - const OUString& rName ) - throw( css::uno::RuntimeException, std::exception ) override + const OUString& rName ) override { return hasItem( rName ); } @@ -131,11 +124,7 @@ public: virtual void SAL_CALL replaceByName( const OUString& rName, - const css::uno::Any& aElement ) - throw( css::lang::IllegalArgumentException, - css::container::NoSuchElementException, - css::lang::WrappedTargetException, - css::uno::RuntimeException, std::exception) override + const css::uno::Any& aElement ) override { T aItem; if( aElement >>= aItem ) @@ -153,11 +142,7 @@ public: virtual void SAL_CALL insertByName( const OUString& rName, - const css::uno::Any& aElement ) - throw( css::lang::IllegalArgumentException, - css::container::ElementExistException, - css::lang::WrappedTargetException, - css::uno::RuntimeException, std::exception ) override + const css::uno::Any& aElement ) override { T aItem; if( aElement >>= aItem ) @@ -170,10 +155,7 @@ public: } virtual void SAL_CALL removeByName( - const OUString& rName ) - throw( css::container::NoSuchElementException, - css::lang::WrappedTargetException, - css::uno::RuntimeException, std::exception) override + const OUString& rName ) override { if( hasByName( rName ) ) remove( rName ); diff --git a/forms/source/xforms/binding.cxx b/forms/source/xforms/binding.cxx index 120cc66faebc..b2ffdeb1aba3 100644 --- a/forms/source/xforms/binding.cxx +++ b/forms/source/xforms/binding.cxx @@ -450,7 +450,6 @@ bool Binding::getExternalData() const void Binding::checkLive() - throw( RuntimeException ) { if( ! isLive() ) throw RuntimeException( EXCEPT("Binding not initialized") ); @@ -994,20 +993,16 @@ void Binding::_checkBindingID() css::uno::Sequence<css::uno::Type> Binding::getSupportedValueTypes() - throw( RuntimeException, std::exception ) { return Convert::get().getTypes(); } sal_Bool Binding::supportsType( const css::uno::Type& rType ) - throw( RuntimeException, std::exception ) { return Convert::get().hasType( rType ); } css::uno::Any Binding::getValue( const css::uno::Type& rType ) - throw( IncompatibleTypesException, - RuntimeException, std::exception ) { // first, check for model checkLive(); @@ -1028,10 +1023,6 @@ css::uno::Any Binding::getValue( const css::uno::Type& rType ) } void Binding::setValue( const css::uno::Any& aValue ) - throw( IncompatibleTypesException, - InvalidBindingStateException, - NoSupportException, - RuntimeException, std::exception ) { // first, check for model checkLive(); @@ -1062,7 +1053,6 @@ void Binding::setValue( const css::uno::Any& aValue ) sal_Int32 Binding::getListEntryCount() - throw( RuntimeException, std::exception ) { // first, check for model checkLive(); @@ -1097,8 +1087,6 @@ static OUString lcl_getString( const Reference<XNode>& xNode ) } OUString Binding::getListEntry( sal_Int32 nPosition ) - throw( IndexOutOfBoundsException, - RuntimeException, std::exception ) { // first, check for model checkLive(); @@ -1111,7 +1099,6 @@ OUString Binding::getListEntry( sal_Int32 nPosition ) } Sequence<OUString> Binding::getAllListEntries() - throw( RuntimeException, std::exception ) { // first, check for model checkLive(); @@ -1129,8 +1116,6 @@ Sequence<OUString> Binding::getAllListEntries() } void Binding::addListEntryListener( const css::uno::Reference<css::form::binding::XListEntryListener>& xListener ) - throw( NullPointerException, - RuntimeException, std::exception ) { OSL_ENSURE( xListener.is(), "need listener!" ); if( ::std::find( maListEntryListeners.begin(), @@ -1141,8 +1126,6 @@ void Binding::addListEntryListener( const css::uno::Reference<css::form::binding } void Binding::removeListEntryListener( const css::uno::Reference<css::form::binding::XListEntryListener>& xListener ) - throw( NullPointerException, - RuntimeException, std::exception ) { XListEntryListeners_t::iterator aIter = ::std::find( maListEntryListeners.begin(), maListEntryListeners.end(), @@ -1156,7 +1139,6 @@ void Binding::removeListEntryListener( const css::uno::Reference<css::form::bind sal_Bool Binding::isValid( const css::uno::Any& ) - throw( RuntimeException, std::exception ) { // first, check for model checkLive(); @@ -1167,7 +1149,6 @@ sal_Bool Binding::isValid( const css::uno::Any& ) OUString Binding::explainInvalid( const css::uno::Any& /*Value*/ ) - throw( RuntimeException, std::exception ) { // first, check for model checkLive(); @@ -1178,8 +1159,6 @@ OUString Binding::explainInvalid( void Binding::addValidityConstraintListener( const css::uno::Reference<css::form::validation::XValidityConstraintListener>& xListener ) - throw( NullPointerException, - RuntimeException, std::exception ) { OSL_ENSURE( xListener.is(), "need listener!" ); if( ::std::find(maValidityListeners.begin(), maValidityListeners.end(), xListener) @@ -1189,8 +1168,6 @@ void Binding::addValidityConstraintListener( void Binding::removeValidityConstraintListener( const css::uno::Reference<css::form::validation::XValidityConstraintListener>& xListener ) - throw( NullPointerException, - RuntimeException, std::exception ) { XValidityConstraintListeners_t::iterator aIter = ::std::find( maValidityListeners.begin(), maValidityListeners.end(), @@ -1204,7 +1181,6 @@ void Binding::removeValidityConstraintListener( void Binding::handleEvent( const css::uno::Reference<css::xml::dom::events::XEvent>& xEvent ) - throw( RuntimeException, std::exception ) { OUString sType(xEvent->getType()); //OUString sEventMIPChanged("xforms-generic"); @@ -1236,7 +1212,6 @@ void Binding::handleEvent( const css::uno::Reference<css::xml::dom::events::XEve sal_Int64 Binding::getSomething( const css::uno::Sequence<sal_Int8>& xId ) - throw( RuntimeException, std::exception ) { return reinterpret_cast<sal_Int64>( ( xId == getUnoTunnelID() ) ? this : nullptr ); } @@ -1246,7 +1221,6 @@ sal_Int64 Binding::getSomething( const css::uno::Sequence<sal_Int8>& xId ) css::uno::Reference<css::util::XCloneable> SAL_CALL Binding::createClone() - throw( RuntimeException, std::exception ) { Reference< XPropertySet > xClone; @@ -1302,7 +1276,6 @@ void Binding::initializePropertySet() void Binding::addModifyListener( const css::uno::Reference<css::util::XModifyListener>& xListener ) - throw( RuntimeException, std::exception ) { OSL_ENSURE( xListener.is(), "need listener!" ); if( ::std::find( maModifyListeners.begin(), maModifyListeners.end(), xListener ) @@ -1317,7 +1290,6 @@ void Binding::addModifyListener( void Binding::removeModifyListener( const css::uno::Reference<css::util::XModifyListener>& xListener ) - throw( RuntimeException, std::exception ) { ModifyListeners_t::iterator aIter = ::std::find( maModifyListeners.begin(), maModifyListeners.end(), xListener ); @@ -1327,13 +1299,11 @@ void Binding::removeModifyListener( OUString Binding::getName() - throw( RuntimeException, std::exception ) { return getBindingID(); } void SAL_CALL Binding::setName( const OUString& rName ) - throw( RuntimeException, std::exception ) { // use the XPropertySet methods, so the change in the name is notified to the // property listeners diff --git a/forms/source/xforms/binding.hxx b/forms/source/xforms/binding.hxx index 6a75a7e9ea98..9f1220ff1618 100644 --- a/forms/source/xforms/binding.hxx +++ b/forms/source/xforms/binding.hxx @@ -266,7 +266,7 @@ private: /// (to be used be API methods before acting on the object) /// /// @throws css::uno::RuntimeException - void checkLive() throw( css::uno::RuntimeException ); + void checkLive(); /// determine whether object is live /// live: has model, and model has been initialized @@ -321,65 +321,43 @@ private: public: - virtual css::uno::Sequence<css::uno::Type> SAL_CALL getSupportedValueTypes() - throw( css::uno::RuntimeException, std::exception ) override; + virtual css::uno::Sequence<css::uno::Type> SAL_CALL getSupportedValueTypes() override; - virtual sal_Bool SAL_CALL supportsType( const css::uno::Type& aType ) - throw( css::uno::RuntimeException, std::exception ) override; + virtual sal_Bool SAL_CALL supportsType( const css::uno::Type& aType ) override; - virtual css::uno::Any SAL_CALL getValue( const css::uno::Type& aType ) - throw( css::form::binding::IncompatibleTypesException, - css::uno::RuntimeException, std::exception ) override; + virtual css::uno::Any SAL_CALL getValue( const css::uno::Type& aType ) override; - virtual void SAL_CALL setValue( const css::uno::Any& aValue ) - throw( css::form::binding::IncompatibleTypesException, - css::form::binding::InvalidBindingStateException, - css::lang::NoSupportException, - css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL setValue( const css::uno::Any& aValue ) override; // XListEntry Source - virtual sal_Int32 SAL_CALL getListEntryCount() - throw( css::uno::RuntimeException, std::exception ) override; + virtual sal_Int32 SAL_CALL getListEntryCount() override; - virtual OUString SAL_CALL getListEntry( sal_Int32 nPosition ) - throw( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; + virtual OUString SAL_CALL getListEntry( sal_Int32 nPosition ) override; - virtual css::uno::Sequence<OUString> SAL_CALL getAllListEntries() - throw( css::uno::RuntimeException, std::exception ) override; + virtual css::uno::Sequence<OUString> SAL_CALL getAllListEntries() override; - virtual void SAL_CALL addListEntryListener( const css::uno::Reference<css::form::binding::XListEntryListener>& ) - throw( css::lang::NullPointerException, - css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL addListEntryListener( const css::uno::Reference<css::form::binding::XListEntryListener>& ) override; - virtual void SAL_CALL removeListEntryListener( const css::uno::Reference<css::form::binding::XListEntryListener>&) - throw( css::lang::NullPointerException, - css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL removeListEntryListener( const css::uno::Reference<css::form::binding::XListEntryListener>&) override; // XValidator: virtual sal_Bool SAL_CALL isValid( - const css::uno::Any& ) - throw( css::uno::RuntimeException, std::exception ) override; + const css::uno::Any& ) override; virtual OUString SAL_CALL explainInvalid( - const css::uno::Any& ) - throw( css::uno::RuntimeException, std::exception ) override; + const css::uno::Any& ) override; virtual void SAL_CALL addValidityConstraintListener( - const css::uno::Reference<css::form::validation::XValidityConstraintListener>& xListener ) - throw( css::lang::NullPointerException, - css::uno::RuntimeException, std::exception ) override; + const css::uno::Reference<css::form::validation::XValidityConstraintListener>& xListener ) override; virtual void SAL_CALL removeValidityConstraintListener( - const css::uno::Reference<css::form::validation::XValidityConstraintListener>& xListener ) - throw( css::lang::NullPointerException, - css::uno::RuntimeException, std::exception ) override; + const css::uno::Reference<css::form::validation::XValidityConstraintListener>& xListener ) override; // XModifyBroadcaster & friends: @@ -389,12 +367,10 @@ public: public: virtual void SAL_CALL addModifyListener( - const css::uno::Reference<css::util::XModifyListener>& xListener ) - throw( css::uno::RuntimeException, std::exception ) override; + const css::uno::Reference<css::util::XModifyListener>& xListener ) override; virtual void SAL_CALL removeModifyListener( - const css::uno::Reference<css::util::XModifyListener>& xListener ) - throw( css::uno::RuntimeException, std::exception ) override; + const css::uno::Reference<css::util::XModifyListener>& xListener ) override; // XNamed: @@ -403,11 +379,9 @@ public: public: - virtual OUString SAL_CALL getName() - throw( css::uno::RuntimeException, std::exception ) override; + virtual OUString SAL_CALL getName() override; - virtual void SAL_CALL setName( const OUString& ) - throw( css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL setName( const OUString& ) override; // xml::dom::event::XEventListener @@ -415,22 +389,19 @@ public: virtual void SAL_CALL handleEvent( - const css::uno::Reference<css::xml::dom::events::XEvent>& xEvent ) - throw( css::uno::RuntimeException, std::exception ) override; + const css::uno::Reference<css::xml::dom::events::XEvent>& xEvent ) override; // XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence<sal_Int8>& ) - throw( css::uno::RuntimeException, std::exception ) override; + virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence<sal_Int8>& ) override; // XCloneable - virtual css::uno::Reference<css::util::XCloneable> SAL_CALL createClone() - throw( css::uno::RuntimeException, std::exception ) override; + virtual css::uno::Reference<css::util::XCloneable> SAL_CALL createClone() override; }; diff --git a/forms/source/xforms/collection.hxx b/forms/source/xforms/collection.hxx index 4f860cc4b46e..fe40dc4c9633 100644 --- a/forms/source/xforms/collection.hxx +++ b/forms/source/xforms/collection.hxx @@ -144,29 +144,23 @@ protected: public: // XElementAccess - virtual css::uno::Type SAL_CALL getElementType() - throw( css::uno::RuntimeException, std::exception ) override + virtual css::uno::Type SAL_CALL getElementType() override { return cppu::UnoType<T>::get(); } - virtual sal_Bool SAL_CALL hasElements() - throw( css::uno::RuntimeException, std::exception ) override + virtual sal_Bool SAL_CALL hasElements() override { return hasItems(); } // XIndexAccess : XElementAccess - virtual sal_Int32 SAL_CALL getCount() - throw( css::uno::RuntimeException, std::exception ) override + virtual sal_Int32 SAL_CALL getCount() override { return countItems(); } - virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 nIndex ) - throw( css::lang::IndexOutOfBoundsException, - css::lang::WrappedTargetException, - css::uno::RuntimeException, std::exception) override + virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 nIndex ) override { if( isValidIndex( nIndex ) ) return css::uno::makeAny( getItem( nIndex ) ); @@ -176,11 +170,7 @@ public: // XIndexReplace : XIndexAccess virtual void SAL_CALL replaceByIndex( sal_Int32 nIndex, - const css::uno::Any& aElement ) - throw( css::lang::IllegalArgumentException, - css::lang::IndexOutOfBoundsException, - css::lang::WrappedTargetException, - css::uno::RuntimeException, std::exception) override + const css::uno::Any& aElement ) override { T t; if( isValidIndex( nIndex) ) @@ -193,25 +183,20 @@ public: } // XEnumerationAccess : XElementAccess - 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 { return new Enumeration( this ); } // XSet : XEnumerationAccess - 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 { T t; return ( aElement >>= t ) && hasItem( t ); } - 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 { T t; if( ( aElement >>= t ) && isValid( t ) ) @@ -223,10 +208,7 @@ public: throw css::lang::IllegalArgumentException(); } - 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 { T t; if( aElement >>= t ) @@ -241,8 +223,7 @@ public: // XContainer virtual void SAL_CALL addContainerListener( - const css::uno::Reference<css::container::XContainerListener>& xListener ) - throw( css::uno::RuntimeException, std::exception ) override + const css::uno::Reference<css::container::XContainerListener>& xListener ) override { OSL_ENSURE( xListener.is(), "need listener!" ); if( std::find( maListeners.begin(), maListeners.end(), xListener) @@ -251,8 +232,7 @@ public: } virtual void SAL_CALL removeContainerListener( - const css::uno::Reference<css::container::XContainerListener>& xListener ) - throw( css::uno::RuntimeException, std::exception ) override + const css::uno::Reference<css::container::XContainerListener>& xListener ) override { OSL_ENSURE( xListener.is(), "need listener!" ); Listeners_t::iterator aIter = diff --git a/forms/source/xforms/datatyperepository.cxx b/forms/source/xforms/datatyperepository.cxx index 3bb4794344a9..e50b09de09e9 100644 --- a/forms/source/xforms/datatyperepository.cxx +++ b/forms/source/xforms/datatyperepository.cxx @@ -105,7 +105,7 @@ namespace xforms } - Reference< XDataType > SAL_CALL ODataTypeRepository::getBasicDataType( sal_Int16 dataTypeClass ) throw (NoSuchElementException, RuntimeException, std::exception) + Reference< XDataType > SAL_CALL ODataTypeRepository::getBasicDataType( sal_Int16 dataTypeClass ) { Reference< XDataType > xReturn; @@ -125,7 +125,7 @@ namespace xforms } - Reference< XDataType > SAL_CALL ODataTypeRepository::cloneDataType( const OUString& sourceName, const OUString& newName ) throw (NoSuchElementException, ElementExistException, RuntimeException, std::exception) + Reference< XDataType > SAL_CALL ODataTypeRepository::cloneDataType( const OUString& sourceName, const OUString& newName ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -141,7 +141,7 @@ namespace xforms } - void SAL_CALL ODataTypeRepository::revokeDataType( const OUString& typeName ) throw (NoSuchElementException, VetoException, RuntimeException, std::exception) + void SAL_CALL ODataTypeRepository::revokeDataType( const OUString& typeName ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -154,26 +154,26 @@ namespace xforms } - Reference< XDataType > SAL_CALL ODataTypeRepository::getDataType( const OUString& typeName ) throw (NoSuchElementException, RuntimeException, std::exception) + Reference< XDataType > SAL_CALL ODataTypeRepository::getDataType( const OUString& typeName ) { ::osl::MutexGuard aGuard( m_aMutex ); return implLocate( typeName )->second.get(); } - Reference< XEnumeration > SAL_CALL ODataTypeRepository::createEnumeration( ) throw (RuntimeException, std::exception) + Reference< XEnumeration > SAL_CALL ODataTypeRepository::createEnumeration( ) { return new ::comphelper::OEnumerationByName( this ); } - Any SAL_CALL ODataTypeRepository::getByName( const OUString& aName ) throw (NoSuchElementException, WrappedTargetException, RuntimeException, std::exception) + Any SAL_CALL ODataTypeRepository::getByName( const OUString& aName ) { return makeAny( getDataType( aName ) ); } - Sequence< OUString > SAL_CALL ODataTypeRepository::getElementNames( ) throw (RuntimeException, std::exception) + Sequence< OUString > SAL_CALL ODataTypeRepository::getElementNames( ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -181,20 +181,20 @@ namespace xforms } - sal_Bool SAL_CALL ODataTypeRepository::hasByName( const OUString& aName ) throw (RuntimeException, std::exception) + sal_Bool SAL_CALL ODataTypeRepository::hasByName( const OUString& aName ) { ::osl::MutexGuard aGuard( m_aMutex ); return m_aRepository.find( aName ) != m_aRepository.end(); } - Type SAL_CALL ODataTypeRepository::getElementType( ) throw (RuntimeException, std::exception) + Type SAL_CALL ODataTypeRepository::getElementType( ) { return cppu::UnoType<XDataType>::get(); } - sal_Bool SAL_CALL ODataTypeRepository::hasElements( ) throw (RuntimeException, std::exception) + sal_Bool SAL_CALL ODataTypeRepository::hasElements( ) { return !m_aRepository.empty(); } diff --git a/forms/source/xforms/datatyperepository.hxx b/forms/source/xforms/datatyperepository.hxx index 15c7702c19f3..9138a1a5e8d6 100644 --- a/forms/source/xforms/datatyperepository.hxx +++ b/forms/source/xforms/datatyperepository.hxx @@ -50,22 +50,22 @@ namespace xforms virtual ~ODataTypeRepository( ) override; // XDataTypeRepository - virtual css::uno::Reference< css::xsd::XDataType > SAL_CALL getBasicDataType( sal_Int16 dataTypeClass ) throw (css::container::NoSuchElementException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::xsd::XDataType > SAL_CALL cloneDataType( const OUString& sourceName, const OUString& newName ) throw (css::container::NoSuchElementException, css::container::ElementExistException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL revokeDataType( const OUString& typeName ) throw (css::container::NoSuchElementException, css::util::VetoException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::xsd::XDataType > SAL_CALL getDataType( const OUString& typeName ) throw (css::container::NoSuchElementException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::xsd::XDataType > SAL_CALL getBasicDataType( sal_Int16 dataTypeClass ) override; + virtual css::uno::Reference< css::xsd::XDataType > SAL_CALL cloneDataType( const OUString& sourceName, const OUString& newName ) override; + virtual void SAL_CALL revokeDataType( const OUString& typeName ) override; + virtual css::uno::Reference< css::xsd::XDataType > SAL_CALL getDataType( const OUString& typeName ) override; // XEnumerationAccess (base of XDataTypeRepository) - 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; // XNameAccess (base of XDataTypeRepository) - virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getElementNames( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) override; + virtual css::uno::Sequence< OUString > SAL_CALL getElementNames( ) override; + virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override; // XElementAccess (base of XEnumerationAccess and XNameAccess) - virtual css::uno::Type SAL_CALL getElementType( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL hasElements( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Type SAL_CALL getElementType( ) override; + virtual sal_Bool SAL_CALL hasElements( ) override; private: ODataTypeRepository( const ODataTypeRepository& ) = delete; diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx index 90e307ab0b30..707dce52a2eb 100644 --- a/forms/source/xforms/datatypes.cxx +++ b/forms/source/xforms/datatypes.cxx @@ -108,62 +108,62 @@ namespace xforms SAL_WARN_IF( member != value, "forms.misc", "OXSDDataType::setFoo: inconsistency!" ); - OUString SAL_CALL OXSDDataType::getName( ) throw (RuntimeException, std::exception) + OUString SAL_CALL OXSDDataType::getName( ) { return m_sName; } - void SAL_CALL OXSDDataType::setName( const OUString& aName ) throw (RuntimeException, VetoException, std::exception) + void SAL_CALL OXSDDataType::setName( const OUString& aName ) { // TODO: check the name for conflicts in the repository SET_PROPERTY( NAME, aName, m_sName ); } - OUString SAL_CALL OXSDDataType::getPattern() throw (RuntimeException, std::exception) + OUString SAL_CALL OXSDDataType::getPattern() { return m_sPattern; } - void SAL_CALL OXSDDataType::setPattern( const OUString& _pattern ) throw (RuntimeException, std::exception) + void SAL_CALL OXSDDataType::setPattern( const OUString& _pattern ) { SET_PROPERTY( XSD_PATTERN, _pattern, m_sPattern ); } - sal_Int16 SAL_CALL OXSDDataType::getWhiteSpaceTreatment() throw (RuntimeException, std::exception) + sal_Int16 SAL_CALL OXSDDataType::getWhiteSpaceTreatment() { return m_nWST; } - void SAL_CALL OXSDDataType::setWhiteSpaceTreatment( sal_Int16 _whitespacetreatment ) throw (RuntimeException, IllegalArgumentException, std::exception) + void SAL_CALL OXSDDataType::setWhiteSpaceTreatment( sal_Int16 _whitespacetreatment ) { SET_PROPERTY( XSD_WHITESPACE, _whitespacetreatment, m_nWST ); } - sal_Bool SAL_CALL OXSDDataType::getIsBasic() throw (RuntimeException, std::exception) + sal_Bool SAL_CALL OXSDDataType::getIsBasic() { return m_bIsBasic; } - sal_Int16 SAL_CALL OXSDDataType::getTypeClass() throw (RuntimeException, std::exception) + sal_Int16 SAL_CALL OXSDDataType::getTypeClass() { return m_nTypeClass; } - sal_Bool OXSDDataType::validate( const OUString& sValue ) throw( RuntimeException, std::exception ) + sal_Bool OXSDDataType::validate( const OUString& sValue ) { return ( _validate( sValue ) == 0 ); } - OUString OXSDDataType::explainInvalid( const OUString& sValue ) throw( RuntimeException, std::exception ) + OUString OXSDDataType::explainInvalid( const OUString& sValue ) { // get reason sal_uInt16 nReason = _validate( sValue ); @@ -237,7 +237,7 @@ namespace xforms } - sal_Bool OXSDDataType::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue ) throw(IllegalArgumentException) + sal_Bool OXSDDataType::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue ) { // let the base class do the conversion if ( !OXSDDataType_PBase::convertFastPropertyValue( _rConvertedValue, _rOldValue, _nHandle, _rValue ) ) @@ -257,7 +257,7 @@ namespace xforms } - void SAL_CALL OXSDDataType::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _rValue ) throw (Exception, std::exception) + void SAL_CALL OXSDDataType::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _rValue ) { OXSDDataType_PBase::setFastPropertyValue_NoBroadcast( _nHandle, _rValue ); if ( _nHandle == PROPERTY_ID_XSD_PATTERN ) @@ -285,37 +285,37 @@ namespace xforms } - void SAL_CALL OXSDDataType::setPropertyValue( const OUString& aPropertyName, const Any& aValue ) throw (UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException, std::exception) + void SAL_CALL OXSDDataType::setPropertyValue( const OUString& aPropertyName, const Any& aValue ) { OXSDDataType_PBase::setPropertyValue( aPropertyName, aValue ); } - Any SAL_CALL OXSDDataType::getPropertyValue( const OUString& PropertyName ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) + Any SAL_CALL OXSDDataType::getPropertyValue( const OUString& PropertyName ) { return OXSDDataType_PBase::getPropertyValue( PropertyName ); } - void SAL_CALL OXSDDataType::addPropertyChangeListener( const OUString& aPropertyName, const Reference< XPropertyChangeListener >& xListener ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) + void SAL_CALL OXSDDataType::addPropertyChangeListener( const OUString& aPropertyName, const Reference< XPropertyChangeListener >& xListener ) { OXSDDataType_PBase::addPropertyChangeListener( aPropertyName, xListener ); } - void SAL_CALL OXSDDataType::removePropertyChangeListener( const OUString& aPropertyName, const Reference< XPropertyChangeListener >& aListener ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) + void SAL_CALL OXSDDataType::removePropertyChangeListener( const OUString& aPropertyName, const Reference< XPropertyChangeListener >& aListener ) { OXSDDataType_PBase::removePropertyChangeListener( aPropertyName, aListener ); } - void SAL_CALL OXSDDataType::addVetoableChangeListener( const OUString& PropertyName, const Reference< XVetoableChangeListener >& aListener ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) + void SAL_CALL OXSDDataType::addVetoableChangeListener( const OUString& PropertyName, const Reference< XVetoableChangeListener >& aListener ) { OXSDDataType_PBase::addVetoableChangeListener( PropertyName, aListener ); } - void SAL_CALL OXSDDataType::removeVetoableChangeListener( const OUString& PropertyName, const Reference< XVetoableChangeListener >& aListener ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) + void SAL_CALL OXSDDataType::removeVetoableChangeListener( const OUString& PropertyName, const Reference< XVetoableChangeListener >& aListener ) { OXSDDataType_PBase::removeVetoableChangeListener( PropertyName, aListener ); } @@ -351,7 +351,7 @@ namespace xforms void SAL_CALL OValueLimitedType_Base::setFastPropertyValue_NoBroadcast( - sal_Int32 _nHandle, const css::uno::Any& _rValue ) throw (css::uno::Exception, std::exception) + sal_Int32 _nHandle, const css::uno::Any& _rValue ) { OXSDDataType::setFastPropertyValue_NoBroadcast( _nHandle, _rValue ); @@ -955,7 +955,7 @@ template< typename CONCRETE_DATA_TYPE_IMPL, typename SUPERCLASS > template< typename CONCRETE_DATA_TYPE_IMPL, typename SUPERCLASS > -css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL ODerivedDataType< CONCRETE_DATA_TYPE_IMPL, SUPERCLASS >::getPropertySetInfo() throw( css::uno::RuntimeException ) +css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL ODerivedDataType< CONCRETE_DATA_TYPE_IMPL, SUPERCLASS >::getPropertySetInfo() { return ::cppu::OPropertySetHelper::createPropertySetInfo( getInfoHelper() ); } diff --git a/forms/source/xforms/datatypes.hxx b/forms/source/xforms/datatypes.hxx index 5f1d40551535..db20dfb758c0 100644 --- a/forms/source/xforms/datatypes.hxx +++ b/forms/source/xforms/datatypes.hxx @@ -81,37 +81,36 @@ namespace xforms DECLARE_XINTERFACE() DECLARE_XTYPEPROVIDER() - virtual OUString SAL_CALL getName( ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL setName( const OUString& aName ) throw (css::uno::RuntimeException, css::util::VetoException, std::exception) override; - virtual OUString SAL_CALL getPattern() throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL setPattern( const OUString& _pattern ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int16 SAL_CALL getWhiteSpaceTreatment() throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL setWhiteSpaceTreatment( sal_Int16 _whitespacetreatment ) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, std::exception) override; - virtual sal_Bool SAL_CALL getIsBasic() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int16 SAL_CALL getTypeClass() throw (css::uno::RuntimeException, std::exception) override; - - virtual sal_Bool SAL_CALL validate( const OUString& value ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL explainInvalid( const OUString& value ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getName( ) override; + virtual void SAL_CALL setName( const OUString& aName ) override; + virtual OUString SAL_CALL getPattern() override; + virtual void SAL_CALL setPattern( const OUString& _pattern ) override; + virtual sal_Int16 SAL_CALL getWhiteSpaceTreatment() override; + virtual void SAL_CALL setWhiteSpaceTreatment( sal_Int16 _whitespacetreatment ) override; + virtual sal_Bool SAL_CALL getIsBasic() override; + virtual sal_Int16 SAL_CALL getTypeClass() override; + + virtual sal_Bool SAL_CALL validate( const OUString& value ) override; + virtual OUString SAL_CALL explainInvalid( const OUString& value ) override; // XPropertySet - is a base of XDataType and needs to be disambiguated - virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) throw (css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override; + virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override; + virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override; + virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override; + virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override; + virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override; public: OXSDDataType* clone( const OUString& _rNewName ) const; protected: // XPropertySet and friends - virtual sal_Bool SAL_CALL convertFastPropertyValue( css::uno::Any& _rConvertedValue, css::uno::Any& _rOldValue, sal_Int32 _nHandle, const css::uno::Any& _rValue ) throw(css::lang::IllegalArgumentException) override; + virtual sal_Bool SAL_CALL convertFastPropertyValue( css::uno::Any& _rConvertedValue, css::uno::Any& _rOldValue, sal_Int32 _nHandle, const css::uno::Any& _rValue ) override; virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const css::uno::Any& rValue - ) - throw (css::uno::Exception, std::exception) override; + ) override; // --- own overridables --- // helper for implementing cloning of data types @@ -174,8 +173,7 @@ namespace xforms virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const css::uno::Any& rValue - ) - throw (css::uno::Exception, std::exception) override; + ) override; // OXSDDataType overridables virtual bool _getValue( const OUString& value, double& fValue ); @@ -236,7 +234,7 @@ namespace xforms virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const SAL_OVERRIDE; // XPropertySet - virtual css::uno::Reference<css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(css::uno::RuntimeException) SAL_OVERRIDE; + virtual css::uno::Reference<css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() SAL_OVERRIDE; virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE; }; diff --git a/forms/source/xforms/enumeration.cxx b/forms/source/xforms/enumeration.cxx index 623666b7c686..ace7e3f5ae2b 100644 --- a/forms/source/xforms/enumeration.cxx +++ b/forms/source/xforms/enumeration.cxx @@ -43,7 +43,6 @@ Enumeration::Enumeration( XIndexAccess* pContainer ) } sal_Bool Enumeration::hasMoreElements() - throw( RuntimeException, std::exception ) { if( ! mxContainer.is() ) throw RuntimeException(); @@ -52,9 +51,6 @@ sal_Bool Enumeration::hasMoreElements() } Any Enumeration::nextElement() - throw( NoSuchElementException, - WrappedTargetException, - RuntimeException, std::exception ) { if( ! mxContainer.is() ) throw RuntimeException(); diff --git a/forms/source/xforms/enumeration.hxx b/forms/source/xforms/enumeration.hxx index 6b9b24b6041f..f5cc97ae0dd5 100644 --- a/forms/source/xforms/enumeration.hxx +++ b/forms/source/xforms/enumeration.hxx @@ -43,13 +43,9 @@ class Enumeration public: explicit Enumeration( css::container::XIndexAccess* ); - virtual sal_Bool SAL_CALL hasMoreElements() - throw( css::uno::RuntimeException, std::exception ) override; + virtual sal_Bool SAL_CALL hasMoreElements() override; - virtual css::uno::Any SAL_CALL nextElement() - throw( css::container::NoSuchElementException, - css::lang::WrappedTargetException, - css::uno::RuntimeException, std::exception ) override; + virtual css::uno::Any SAL_CALL nextElement() override; }; #endif diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx index 5420394189a3..f90bf15c3553 100644 --- a/forms/source/xforms/model.cxx +++ b/forms/source/xforms/model.cxx @@ -399,21 +399,18 @@ bool Model::isValid() const OUString Model::getID() - throw( RuntimeException, std::exception ) { DBG_INVARIANT(); return msID; } void Model::setID( const OUString& sID ) - throw( RuntimeException, std::exception ) { DBG_INVARIANT(); msID = sID; } void Model::initialize() - throw( RuntimeException, std::exception ) { DBG_ASSERT( ! mbInitialized, "model already initialized" ); @@ -426,7 +423,6 @@ void Model::initialize() } void Model::rebuild() - throw( RuntimeException, std::exception ) { if( ! mbInitialized ) initialize(); @@ -435,19 +431,16 @@ void Model::rebuild() } void Model::recalculate() - throw( RuntimeException, std::exception ) { rebind(); } void Model::revalidate() - throw( RuntimeException, std::exception ) { // do nothing. We don't validate anyways! } void Model::refresh() - throw( RuntimeException, std::exception ) { rebind(); } @@ -456,9 +449,6 @@ void Model::refresh() void SAL_CALL Model::submitWithInteraction( const OUString& sID, const css::uno::Reference<css::task::XInteractionHandler>& _rxHandler ) - throw( VetoException, - WrappedTargetException, - RuntimeException, std::exception ) { DBG_INVARIANT(); @@ -476,13 +466,11 @@ void SAL_CALL Model::submitWithInteraction( } void Model::submit( const OUString& sID ) - throw( VetoException, WrappedTargetException, RuntimeException, std::exception ) { submitWithInteraction( sID, nullptr ); } css::uno::Reference<css::xforms::XDataTypeRepository> SAL_CALL Model::getDataTypeRepository( ) - throw( RuntimeException, std::exception ) { if ( !mxDataTypes.is() ) mxDataTypes = new ODataTypeRepository; @@ -495,13 +483,11 @@ css::uno::Reference<css::xforms::XDataTypeRepository> SAL_CALL Model::getDataTyp css::uno::Reference<css::container::XSet> Model::getInstances() - throw( RuntimeException, std::exception ) { return mxInstances.get(); } css::uno::Reference<css::xml::dom::XDocument> Model::getInstanceDocument( const OUString& rName ) - throw( RuntimeException, std::exception ) { ensureAtLeastOneInstance(); Reference<XDocument> aInstance; @@ -513,7 +499,6 @@ css::uno::Reference<css::xml::dom::XDocument> Model::getInstanceDocument( const } css::uno::Reference<css::xml::dom::XDocument> SAL_CALL Model::getDefaultInstance() - throw( RuntimeException, std::exception ) { ensureAtLeastOneInstance(); DBG_ASSERT( mxInstances->countItems() > 0, "no instance?" ); @@ -527,14 +512,12 @@ css::uno::Reference<css::xml::dom::XDocument> SAL_CALL Model::getDefaultInstance Model::XPropertySet_t SAL_CALL Model::createBinding() - throw( RuntimeException, std::exception ) { DBG_INVARIANT(); return new Binding(); } Model::XPropertySet_t Model::cloneBinding( const XPropertySet_t& xBinding ) - throw( RuntimeException, std::exception ) { DBG_INVARIANT(); XPropertySet_t xNewBinding = createBinding(); @@ -543,14 +526,12 @@ Model::XPropertySet_t Model::cloneBinding( const XPropertySet_t& xBinding ) } Model::XPropertySet_t Model::getBinding( const OUString& sId ) - throw( RuntimeException, std::exception ) { DBG_INVARIANT(); return mxBindings->hasItem( sId ) ? mxBindings->getItem( sId ) : nullptr; } css::uno::Reference<css::container::XSet> Model::getBindings() - throw( RuntimeException, std::exception ) { DBG_INVARIANT(); return mxBindings.get(); @@ -561,14 +542,12 @@ css::uno::Reference<css::container::XSet> Model::getBindings() css::uno::Reference<css::xforms::XSubmission> Model::createSubmission() - throw( RuntimeException, std::exception ) { DBG_INVARIANT(); return new Submission(); } css::uno::Reference<css::xforms::XSubmission> Model::cloneSubmission(const XPropertySet_t& xSubmission) - throw( RuntimeException, std::exception ) { DBG_INVARIANT(); css::uno::Reference<css::xforms::XSubmission> xNewSubmission = createSubmission(); @@ -578,7 +557,6 @@ css::uno::Reference<css::xforms::XSubmission> Model::cloneSubmission(const XProp } css::uno::Reference<css::xforms::XSubmission> Model::getSubmission( const OUString& sId ) - throw( RuntimeException, std::exception ) { DBG_INVARIANT(); css::uno::Reference<css::xforms::XSubmission> xSubmission; @@ -588,7 +566,6 @@ css::uno::Reference<css::xforms::XSubmission> Model::getSubmission( const OUStri } css::uno::Reference<css::container::XSet> Model::getSubmissions() - throw( RuntimeException, std::exception ) { DBG_INVARIANT(); return mxSubmissions.get(); @@ -626,38 +603,32 @@ void Model::initializePropertySet() } void Model::update() - throw( RuntimeException, std::exception ) { rebuild(); } sal_Int64 Model::getSomething( const css::uno::Sequence<sal_Int8>& xId ) - throw( RuntimeException, std::exception ) { return reinterpret_cast<sal_Int64>( ( xId == getUnoTunnelID() ) ? this : nullptr ); } Sequence<sal_Int8> Model::getImplementationId() - throw( RuntimeException ) { return css::uno::Sequence<sal_Int8>(); } OUString Model::getImplementationName() - throw (css::uno::RuntimeException, std::exception) { return OUString("com.sun.star.form.Model"); } sal_Bool Model::supportsService(OUString const & ServiceName) - throw (css::uno::RuntimeException, std::exception) { return cppu::supportsService(this, ServiceName); } css::uno::Sequence<OUString> Model::getSupportedServiceNames() - throw (css::uno::RuntimeException, std::exception) { return css::uno::Sequence<OUString>{"com.sun.star.xforms.Model"}; } diff --git a/forms/source/xforms/model.hxx b/forms/source/xforms/model.hxx index 2b79153a22b5..cda182010041 100644 --- a/forms/source/xforms/model.hxx +++ b/forms/source/xforms/model.hxx @@ -182,106 +182,78 @@ public: // implement the xforms::XModel implementation - virtual OUString SAL_CALL getID() - throw( css::uno::RuntimeException, std::exception ) override; + virtual OUString SAL_CALL getID() override; - virtual void SAL_CALL setID( const OUString& sID ) - throw( css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL setID( const OUString& sID ) override; - virtual void SAL_CALL initialize() - throw( css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL initialize() override; - virtual void SAL_CALL rebuild() - throw( css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL rebuild() override; - virtual void SAL_CALL recalculate() - throw( css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL recalculate() override; - virtual void SAL_CALL revalidate() - throw( css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL revalidate() override; - virtual void SAL_CALL refresh() - throw( css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL refresh() override; - virtual void SAL_CALL submit( const OUString& sID ) - throw( css::util::VetoException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL submit( const OUString& sID ) override; - virtual void SAL_CALL submitWithInteraction( const OUString& id, const css::uno::Reference<css::task::XInteractionHandler>& _rxHandler ) - throw( css::util::VetoException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL submitWithInteraction( const OUString& id, const css::uno::Reference<css::task::XInteractionHandler>& _rxHandler ) override; - virtual css::uno::Reference<css::xforms::XDataTypeRepository> SAL_CALL getDataTypeRepository( ) - throw( css::uno::RuntimeException, std::exception ) override; + virtual css::uno::Reference<css::xforms::XDataTypeRepository> SAL_CALL getDataTypeRepository( ) override; // XModel: instance management - virtual css::uno::Reference<css::container::XSet> SAL_CALL getInstances() - throw( css::uno::RuntimeException, std::exception ) override; + virtual css::uno::Reference<css::container::XSet> SAL_CALL getInstances() override; - virtual css::uno::Reference<css::xml::dom::XDocument> SAL_CALL getInstanceDocument( const OUString& ) - throw( css::uno::RuntimeException, std::exception ) override; + virtual css::uno::Reference<css::xml::dom::XDocument> SAL_CALL getInstanceDocument( const OUString& ) override; - virtual css::uno::Reference<css::xml::dom::XDocument> SAL_CALL getDefaultInstance() - throw( css::uno::RuntimeException, std::exception ) override; + virtual css::uno::Reference<css::xml::dom::XDocument> SAL_CALL getDefaultInstance() override; // XModel: binding management - virtual XPropertySet_t SAL_CALL createBinding() - throw( css::uno::RuntimeException, std::exception ) override; + virtual XPropertySet_t SAL_CALL createBinding() override; - virtual XPropertySet_t SAL_CALL cloneBinding( const XPropertySet_t& ) - throw( css::uno::RuntimeException, std::exception ) override; + virtual XPropertySet_t SAL_CALL cloneBinding( const XPropertySet_t& ) override; - virtual XPropertySet_t SAL_CALL getBinding( const OUString& ) - throw( css::uno::RuntimeException, std::exception ) override; + virtual XPropertySet_t SAL_CALL getBinding( const OUString& ) override; - virtual css::uno::Reference<css::container::XSet> SAL_CALL getBindings() - throw( css::uno::RuntimeException, std::exception ) override; + virtual css::uno::Reference<css::container::XSet> SAL_CALL getBindings() override; // XModel: submission management - virtual css::uno::Reference<css::xforms::XSubmission> SAL_CALL createSubmission() - throw( css::uno::RuntimeException, std::exception ) override; + virtual css::uno::Reference<css::xforms::XSubmission> SAL_CALL createSubmission() override; - virtual css::uno::Reference<css::xforms::XSubmission> SAL_CALL cloneSubmission( const XPropertySet_t& ) - throw( css::uno::RuntimeException, std::exception ) override; + virtual css::uno::Reference<css::xforms::XSubmission> SAL_CALL cloneSubmission( const XPropertySet_t& ) override; - virtual css::uno::Reference<css::xforms::XSubmission> SAL_CALL getSubmission( const OUString& ) - throw( css::uno::RuntimeException, std::exception ) override; + virtual css::uno::Reference<css::xforms::XSubmission> SAL_CALL getSubmission( const OUString& ) override; - virtual css::uno::Reference<css::container::XSet> SAL_CALL getSubmissions() - throw( css::uno::RuntimeException, std::exception ) override; + virtual css::uno::Reference<css::container::XSet> SAL_CALL getSubmissions() override; // XPropertySet - virtual css::uno::Any SAL_CALL getPropertyValue(const OUString& p) - throw( css::uno::RuntimeException, std::exception ) override + virtual css::uno::Any SAL_CALL getPropertyValue(const OUString& p) override { return PropertySetBase::getPropertyValue(p); } - virtual void SAL_CALL addPropertyChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XPropertyChangeListener>& p2) - throw (css::beans::UnknownPropertyException, css::uno::RuntimeException, std::exception) override + virtual void SAL_CALL addPropertyChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XPropertyChangeListener>& p2) override { PropertySetBase::addPropertyChangeListener(p1, p2); } - virtual void SAL_CALL removePropertyChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XPropertyChangeListener>& p2) - throw (css::beans::UnknownPropertyException, css::uno::RuntimeException, std::exception) override + virtual void SAL_CALL removePropertyChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XPropertyChangeListener>& p2) override { PropertySetBase::removePropertyChangeListener(p1, p2); } - virtual void SAL_CALL addVetoableChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XVetoableChangeListener>& p2) - throw (css::beans::UnknownPropertyException, css::uno::RuntimeException, std::exception) override + virtual void SAL_CALL addVetoableChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XVetoableChangeListener>& p2) override { PropertySetBase::addVetoableChangeListener(p1, p2); } - virtual void SAL_CALL removeVetoableChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XVetoableChangeListener>& p2) - throw( css::beans::UnknownPropertyException, css::uno::RuntimeException, std::exception ) override + virtual void SAL_CALL removeVetoableChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XVetoableChangeListener>& p2) override { PropertySetBase::removeVetoableChangeListener(p1, p2); } - virtual css::uno::Reference<css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() - throw( css::uno::RuntimeException, std::exception ) override + virtual css::uno::Reference<css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() override { return PropertySetBase::getPropertySetInfo(); } - virtual void SAL_CALL setPropertyValue(const OUString& p1, const css::uno::Any& p2) - throw( css::uno::RuntimeException, std::exception ) override + virtual void SAL_CALL setPropertyValue(const OUString& p1, const css::uno::Any& p2) override { PropertySetBase::setPropertyValue(p1, p2); } @@ -291,10 +263,10 @@ public: /// determine a reasonable control service for a given node /// (based on data type MIP assigned to the node) - virtual OUString SAL_CALL getDefaultServiceNameForNode( const XNode_t& xNode ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getDefaultServiceNameForNode( const XNode_t& xNode ) override; /// call getDefaultBindingExpressionForNode with default evaluation context - virtual OUString SAL_CALL getDefaultBindingExpressionForNode( const XNode_t& xNode ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getDefaultBindingExpressionForNode( const XNode_t& xNode ) override; /// determine a reasonable default binding expression for a given node /// and a given evaluation context @@ -304,122 +276,95 @@ public: const EvaluationContext& ); virtual OUString SAL_CALL getNodeDisplayName( const XNode_t&, - sal_Bool bDetail ) - throw( css::uno::RuntimeException, std::exception ) override; + sal_Bool bDetail ) override; - virtual OUString SAL_CALL getNodeName( const XNode_t& ) - throw( css::uno::RuntimeException, std::exception ) override; + virtual OUString SAL_CALL getNodeName( const XNode_t& ) override; virtual OUString SAL_CALL getBindingName( const XPropertySet_t&, - sal_Bool bDetail ) - throw( css::uno::RuntimeException, std::exception ) override; + sal_Bool bDetail ) override; virtual OUString SAL_CALL getSubmissionName( const XPropertySet_t&, - sal_Bool bDetail ) - throw( css::uno::RuntimeException, std::exception ) override; + sal_Bool bDetail ) override; - virtual XPropertySet_t SAL_CALL cloneBindingAsGhost( const XPropertySet_t& ) - throw( css::uno::RuntimeException, std::exception ) override; + virtual XPropertySet_t SAL_CALL cloneBindingAsGhost( const XPropertySet_t& ) override; - virtual void SAL_CALL removeBindingIfUseless( const XPropertySet_t& ) - throw( css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL removeBindingIfUseless( const XPropertySet_t& ) override; virtual css::uno::Reference<css::xml::dom::XDocument> SAL_CALL newInstance( const OUString& sName, const OUString& sURL, - sal_Bool bURLOnce ) - throw( css::uno::RuntimeException, std::exception ) override; + sal_Bool bURLOnce ) override; virtual void SAL_CALL renameInstance( const OUString& sFrom, const OUString& sTo, const OUString& sURL, - sal_Bool bURLOnce ) - throw( css::uno::RuntimeException, std::exception ) override; + sal_Bool bURLOnce ) override; - virtual void SAL_CALL removeInstance( const OUString& sName ) - throw( css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL removeInstance( const OUString& sName ) override; virtual css::uno::Reference<css::xforms::XModel> SAL_CALL newModel( const css::uno::Reference<css::frame::XModel>& xComponent, - const OUString& sName ) - throw( css::uno::RuntimeException, std::exception ) override; + const OUString& sName ) override; virtual void SAL_CALL renameModel( const css::uno::Reference<css::frame::XModel>& xComponent, const OUString& sFrom, - const OUString& sTo ) - throw( css::uno::RuntimeException, std::exception ) override; + const OUString& sTo ) override; virtual void SAL_CALL removeModel( const css::uno::Reference<css::frame::XModel>& xComponent, - const OUString& sName ) - throw( css::uno::RuntimeException, std::exception ) override; + const OUString& sName ) override; virtual XNode_t SAL_CALL createElement( const XNode_t& xParent, - const OUString& sName ) - throw( css::uno::RuntimeException, std::exception ) override; + const OUString& sName ) override; virtual XNode_t SAL_CALL createAttribute( const XNode_t& xParent, - const OUString& sName ) - throw( css::uno::RuntimeException, std::exception ) override; + const OUString& sName ) override; virtual XNode_t SAL_CALL renameNode( const XNode_t& xNode, - const OUString& sName ) - throw( css::uno::RuntimeException, std::exception ) override; + const OUString& sName ) override; virtual XPropertySet_t SAL_CALL getBindingForNode( const XNode_t&, - sal_Bool bCreate ) - throw( css::uno::RuntimeException, std::exception ) override; + sal_Bool bCreate ) override; - virtual void SAL_CALL removeBindingForNode( const XNode_t& ) - throw( css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL removeBindingForNode( const XNode_t& ) override; virtual OUString SAL_CALL getResultForExpression( const XPropertySet_t& xBinding, sal_Bool bIsBindingExpression, - const OUString& sExpression ) - throw( css::uno::RuntimeException, std::exception ) override; + const OUString& sExpression ) override; - virtual sal_Bool SAL_CALL isValidXMLName( const OUString& sName ) - throw( css::uno::RuntimeException, std::exception ) override; + virtual sal_Bool SAL_CALL isValidXMLName( const OUString& sName ) override; - virtual sal_Bool SAL_CALL isValidPrefixName( const OUString& sName ) - throw( css::uno::RuntimeException, std::exception ) override; + virtual sal_Bool SAL_CALL isValidPrefixName( const OUString& sName ) override; virtual void SAL_CALL setNodeValue( const XNode_t& xNode, - const OUString& sValue ) - throw( css::uno::RuntimeException, std::exception ) override; + const OUString& sValue ) override; // XUpdatable public: - virtual void SAL_CALL update() - throw( css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL update() override; // XUnoTunnel public: - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence<sal_Int8>& ) - throw( css::uno::RuntimeException, std::exception ) override; + virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence<sal_Int8>& ) override; // XTypeProvider::getImplementationId public: - virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId() - throw( css::uno::RuntimeException ) override; + virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId() override; - OUString SAL_CALL getImplementationName() - throw (css::uno::RuntimeException, std::exception) override; + OUString SAL_CALL getImplementationName() override; - sal_Bool SAL_CALL supportsService(OUString const & ServiceName) - throw (css::uno::RuntimeException, std::exception) override; + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override; - css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() - throw (css::uno::RuntimeException, std::exception) override; + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override; }; } // namespace diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx index b279301ad8fc..e5a899340836 100644 --- a/forms/source/xforms/model_ui.cxx +++ b/forms/source/xforms/model_ui.cxx @@ -68,7 +68,6 @@ using namespace com::sun::star::xml::xpath; OUString Model::getDefaultServiceNameForNode( const XNode_t& xNode ) - throw( RuntimeException, std::exception ) { // determine service for control. string/text field is default. OUString sService = "com.sun.star.form.component.TextField"; @@ -250,7 +249,6 @@ OUString Model::getDefaultBindingExpressionForNode( OUString Model::getDefaultBindingExpressionForNode( const XNode_t& xNode ) - throw( RuntimeException, std::exception ) { return getDefaultBindingExpressionForNode( xNode, getEvaluationContext() ); } @@ -274,7 +272,6 @@ static bool lcl_isWhitespace( const OUString& rString ) OUString Model::getNodeDisplayName( const XNode_t& xNode, sal_Bool bDetail ) - throw( RuntimeException, std::exception ) { OUStringBuffer aBuffer; @@ -316,7 +313,6 @@ OUString Model::getNodeDisplayName( const XNode_t& xNode, } OUString Model::getNodeName( const XNode_t& xNode ) - throw( RuntimeException, std::exception ) { OUStringBuffer aBuffer; @@ -340,7 +336,6 @@ OUString Model::getNodeName( const XNode_t& xNode ) OUString Model::getBindingName( const XPropertySet_t& xBinding, sal_Bool /*bDetail*/ ) - throw( RuntimeException, std::exception ) { OUString sID; xBinding->getPropertyValue( "BindingID" ) >>= sID; @@ -360,7 +355,6 @@ OUString Model::getBindingName( const XPropertySet_t& xBinding, OUString Model::getSubmissionName( const XPropertySet_t& xSubmission, sal_Bool /*bDetail*/ ) - throw( RuntimeException, std::exception ) { OUString sID; xSubmission->getPropertyValue( "ID" ) >>= sID; @@ -368,7 +362,6 @@ OUString Model::getSubmissionName( const XPropertySet_t& xSubmission, } Model::XPropertySet_t Model::cloneBindingAsGhost( const XPropertySet_t &xBinding ) - throw( RuntimeException, std::exception ) { // Create a new binding instance first... Binding *pBinding = new Binding(); @@ -385,7 +378,6 @@ Model::XPropertySet_t Model::cloneBindingAsGhost( const XPropertySet_t &xBinding } void Model::removeBindingIfUseless( const XPropertySet_t& xBinding ) - throw( RuntimeException, std::exception ) { Binding* pBinding = Binding::getBinding( xBinding ); if( pBinding != nullptr ) @@ -398,7 +390,6 @@ void Model::removeBindingIfUseless( const XPropertySet_t& xBinding ) css::uno::Reference<css::xml::dom::XDocument> Model::newInstance( const OUString& sName, const OUString& sURL, sal_Bool bURLOnce ) - throw( RuntimeException, std::exception ) { // create a default instance with <instanceData> element css::uno::Reference<css::xml::dom::XDocument> xInstance = getDocumentBuilder()->newDocument(); @@ -449,7 +440,6 @@ void Model::renameInstance( const OUString& sFrom, const OUString& sTo, const OUString& sURL, sal_Bool bURLOnce ) - throw( RuntimeException, std::exception ) { sal_Int32 nPos = lcl_findInstance( mxInstances.get(), sFrom ); if( nPos != -1 ) @@ -487,7 +477,6 @@ void Model::renameInstance( const OUString& sFrom, } void Model::removeInstance( const OUString& sName ) - throw( RuntimeException, std::exception ) { sal_Int32 nPos = lcl_findInstance( mxInstances.get(), sName ); if( nPos != -1 ) @@ -508,7 +497,6 @@ static Reference<XNameContainer> lcl_getModels( css::uno::Reference<css::xforms::XModel> Model::newModel( const Reference<css::frame::XModel>& xCmp, const OUString& sName ) - throw( RuntimeException, std::exception ) { css::uno::Reference<css::xforms::XModel> xModel; Reference<XNameContainer> xModels = lcl_getModels( xCmp ); @@ -530,7 +518,6 @@ css::uno::Reference<css::xforms::XModel> Model::newModel( const Reference<css::f void Model::renameModel( const Reference<css::frame::XModel>& xCmp, const OUString& sFrom, const OUString& sTo ) - throw( RuntimeException, std::exception ) { Reference<XNameContainer> xModels = lcl_getModels( xCmp ); if( xModels.is() @@ -546,7 +533,6 @@ void Model::renameModel( const Reference<css::frame::XModel>& xCmp, void Model::removeModel( const Reference<css::frame::XModel>& xCmp, const OUString& sName ) - throw( RuntimeException, std::exception ) { Reference<XNameContainer> xModels = lcl_getModels( xCmp ); if( xModels.is() @@ -558,7 +544,6 @@ void Model::removeModel( const Reference<css::frame::XModel>& xCmp, Model::XNode_t Model::createElement( const XNode_t& xParent, const OUString& sName ) - throw( RuntimeException, std::exception ) { Reference<XNode> xNode; if( xParent.is() @@ -573,7 +558,6 @@ Model::XNode_t Model::createElement( const XNode_t& xParent, Model::XNode_t Model::createAttribute( const XNode_t& xParent, const OUString& sName ) - throw( RuntimeException, std::exception ) { Reference<XNode> xNode; Reference<XElement> xElement( xParent, UNO_QUERY ); @@ -599,7 +583,6 @@ Model::XNode_t Model::createAttribute( const XNode_t& xParent, Model::XNode_t Model::renameNode( const XNode_t& xNode, const OUString& sName ) - throw( RuntimeException, std::exception ) { // early out if we don't have to change the name if( xNode->getNodeName() == sName ) @@ -683,7 +666,6 @@ Model::XNode_t Model::renameNode( const XNode_t& xNode, Model::XPropertySet_t Model::getBindingForNode( const XNode_t& xNode, sal_Bool bCreate ) - throw( RuntimeException, std::exception ) { OSL_ENSURE( xNode.is(), "no node?" ); @@ -739,7 +721,6 @@ Model::XPropertySet_t Model::getBindingForNode( const XNode_t& xNode, } void Model::removeBindingForNode( const XNode_t& ) - throw( RuntimeException, std::exception ) { // determine whether suitable binding is still used } @@ -880,7 +861,6 @@ OUString Model::getResultForExpression( const XPropertySet_t& xBinding, sal_Bool bIsBindingExpression, const OUString& sExpression ) - throw( RuntimeException, std::exception ) { Binding* pBinding = Binding::getBinding( xBinding ); if( pBinding == nullptr ) @@ -914,13 +894,11 @@ OUString Model::getResultForExpression( } sal_Bool Model::isValidXMLName( const OUString& sName ) - throw( RuntimeException, std::exception ) { return isValidQName( sName, nullptr ); } sal_Bool Model::isValidPrefixName( const OUString& sName ) - throw( RuntimeException, std::exception ) { return ::isValidPrefixName( sName, nullptr ); } @@ -928,7 +906,6 @@ sal_Bool Model::isValidPrefixName( const OUString& sName ) void Model::setNodeValue( const XNode_t& xNode, const OUString& sValue ) - throw( RuntimeException, std::exception ) { setSimpleContent( xNode, sValue ); } diff --git a/forms/source/xforms/namedcollection.hxx b/forms/source/xforms/namedcollection.hxx index 4cd629b54688..c0a31bd99b83 100644 --- a/forms/source/xforms/namedcollection.hxx +++ b/forms/source/xforms/namedcollection.hxx @@ -84,24 +84,19 @@ protected: public: // XElementAccess - virtual css::uno::Type SAL_CALL getElementType() - throw( css::uno::RuntimeException ) override + virtual css::uno::Type SAL_CALL getElementType() override { return Collection<T>::getElementType(); } - virtual sal_Bool SAL_CALL hasElements() - throw( css::uno::RuntimeException ) override + virtual sal_Bool SAL_CALL hasElements() override { return Collection<T>::hasElements(); } // XNameAccess : XElementAccess virtual css::uno::Any SAL_CALL getByName( - const OUString& aName ) - throw( css::container::NoSuchElementException, - css::lang::WrappedTargetException, - css::uno::RuntimeException ) override + const OUString& aName ) override { if( hasItem( aName ) ) return css::uno::makeAny( getItem( aName ) ); @@ -110,15 +105,13 @@ public: } - virtual css::uno::Sequence<OUString> SAL_CALL getElementNames() - throw( css::uno::RuntimeException ) override + virtual css::uno::Sequence<OUString> SAL_CALL getElementNames() override { return getNames(); } virtual sal_Bool SAL_CALL hasByName( - const OUString& aName ) - throw( css::uno::RuntimeException ) override + const OUString& aName ) override { return hasItem( aName ); } diff --git a/forms/source/xforms/propertysetbase.cxx b/forms/source/xforms/propertysetbase.cxx index db3c36cf1d22..cf0dfa62613e 100644 --- a/forms/source/xforms/propertysetbase.cxx +++ b/forms/source/xforms/propertysetbase.cxx @@ -63,7 +63,7 @@ cppu::IPropertyArrayHelper& SAL_CALL PropertySetBase::getInfoHelper() return *m_pProperties; } -Reference< XPropertySetInfo > SAL_CALL PropertySetBase::getPropertySetInfo( ) throw(RuntimeException, std::exception) +Reference< XPropertySetInfo > SAL_CALL PropertySetBase::getPropertySetInfo( ) { return cppu::OPropertySetHelper::createPropertySetInfo( getInfoHelper() ); } @@ -139,7 +139,6 @@ PropertyAccessorBase& PropertySetBase::locatePropertyHandler( sal_Int32 nHandle sal_Bool SAL_CALL PropertySetBase::convertFastPropertyValue( Any& rConvertedValue, Any& rOldValue, sal_Int32 nHandle, const Any& rValue ) - throw (IllegalArgumentException) { PropertyAccessorBase& rAccessor = locatePropertyHandler( nHandle ); if ( !rAccessor.approveValue( rValue ) ) @@ -155,7 +154,6 @@ sal_Bool SAL_CALL PropertySetBase::convertFastPropertyValue( Any& rConvertedValu } void SAL_CALL PropertySetBase::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) - throw (Exception, std::exception) { PropertyAccessorBase& rAccessor = locatePropertyHandler( nHandle ); rAccessor.setValue( rValue ); diff --git a/forms/source/xforms/propertysetbase.hxx b/forms/source/xforms/propertysetbase.hxx index 7d9f6b6a337c..a02a6a7e00bc 100644 --- a/forms/source/xforms/propertysetbase.hxx +++ b/forms/source/xforms/propertysetbase.hxx @@ -253,14 +253,12 @@ protected: void initializePropertyValueCache( sal_Int32 nHandle ); /// OPropertysetHelper methods - virtual sal_Bool SAL_CALL convertFastPropertyValue( css::uno::Any& rConvertedValue, css::uno::Any& rOldValue, sal_Int32 nHandle, const css::uno::Any& rValue ) - throw (css::lang::IllegalArgumentException) override; - virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const css::uno::Any& rValue ) - throw (css::uno::Exception, std::exception) override; + virtual sal_Bool SAL_CALL convertFastPropertyValue( css::uno::Any& rConvertedValue, css::uno::Any& rOldValue, sal_Int32 nHandle, const css::uno::Any& rValue ) override; + virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const css::uno::Any& rValue ) override; virtual void SAL_CALL getFastPropertyValue( css::uno::Any& rValue, sal_Int32 nHandle ) const override; virtual cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override; - virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override; public: /// helper struct for granting selective access to some notification-related methods diff --git a/forms/source/xforms/submission.cxx b/forms/source/xforms/submission.cxx index 7ad6dd810688..c2ebb3e23f14 100644 --- a/forms/source/xforms/submission.cxx +++ b/forms/source/xforms/submission.cxx @@ -284,7 +284,6 @@ Submission* Submission::getSubmission( void Submission::liveCheck() - throw( RuntimeException ) { bool bValid = mxModel.is(); @@ -355,7 +354,6 @@ void Submission::initializePropertySet() sal_Bool SAL_CALL Submission::convertFastPropertyValue( Any& rConvertedValue, Any& rOldValue, sal_Int32 nHandle, const Any& rValue ) - throw ( IllegalArgumentException ) { if ( nHandle == HANDLE_IncludeNamespacePrefixes ) { @@ -378,13 +376,11 @@ sal_Bool SAL_CALL Submission::convertFastPropertyValue( } OUString SAL_CALL Submission::getName() - throw( RuntimeException, std::exception ) { return getID(); } void SAL_CALL Submission::setName( const OUString& sID ) - throw( RuntimeException, std::exception ) { setID( sID ); } @@ -392,7 +388,6 @@ void SAL_CALL Submission::setName( const OUString& sID ) sal_Int64 SAL_CALL Submission::getSomething( const Sequence<sal_Int8>& aId ) - throw( RuntimeException, std::exception ) { return ( aId == getUnoTunnelID() ) ? reinterpret_cast<sal_Int64>(this) : 0; } @@ -406,9 +401,6 @@ static OUString lcl_message( const OUString& rID, const OUString& rText ) void SAL_CALL Submission::submitWithInteraction( const Reference<XInteractionHandler>& _rxHandler ) - throw ( VetoException, - WrappedTargetException, - RuntimeException, std::exception ) { // as long as this class is not really threadsafe, we need to copy // the members we're interested in @@ -497,18 +489,18 @@ void SAL_CALL Submission::submitWithInteraction( } } -void SAL_CALL Submission::submit( ) throw ( VetoException, WrappedTargetException, RuntimeException, std::exception ) +void SAL_CALL Submission::submit( ) { submitWithInteraction( nullptr ); } -void SAL_CALL Submission::addSubmissionVetoListener( const Reference< XSubmissionVetoListener >& /*listener*/ ) throw (NoSupportException, RuntimeException, std::exception) +void SAL_CALL Submission::addSubmissionVetoListener( const Reference< XSubmissionVetoListener >& /*listener*/ ) { // TODO throw NoSupportException(); } -void SAL_CALL Submission::removeSubmissionVetoListener( const Reference< XSubmissionVetoListener >& /*listener*/ ) throw (NoSupportException, RuntimeException, std::exception) +void SAL_CALL Submission::removeSubmissionVetoListener( const Reference< XSubmissionVetoListener >& /*listener*/ ) { // TODO throw NoSupportException(); @@ -590,31 +582,31 @@ Reference< XDocumentFragment > Submission::createSubmissionDocument(const Refere // some forwarding: XPropertySet is implemented in our base class, // but also available as base of XSubmission -Reference< css::beans::XPropertySetInfo > SAL_CALL Submission::getPropertySetInfo( ) throw(RuntimeException, std::exception) +Reference< css::beans::XPropertySetInfo > SAL_CALL Submission::getPropertySetInfo( ) { return PropertySetBase::getPropertySetInfo(); } -void SAL_CALL Submission::setPropertyValue( const OUString& aPropertyName, const Any& aValue ) throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException, std::exception) +void SAL_CALL Submission::setPropertyValue( const OUString& aPropertyName, const Any& aValue ) { PropertySetBase::setPropertyValue( aPropertyName, aValue ); } -Any SAL_CALL Submission::getPropertyValue( const OUString& PropertyName ) throw(UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) +Any SAL_CALL Submission::getPropertyValue( const OUString& PropertyName ) { return PropertySetBase::getPropertyValue( PropertyName ); } -void SAL_CALL Submission::addPropertyChangeListener( const OUString& aPropertyName, const Reference< css::beans::XPropertyChangeListener >& xListener ) throw(UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) +void SAL_CALL Submission::addPropertyChangeListener( const OUString& aPropertyName, const Reference< css::beans::XPropertyChangeListener >& xListener ) { PropertySetBase::addPropertyChangeListener( aPropertyName, xListener ); } -void SAL_CALL Submission::removePropertyChangeListener( const OUString& aPropertyName, const Reference< css::beans::XPropertyChangeListener >& aListener ) throw(UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) +void SAL_CALL Submission::removePropertyChangeListener( const OUString& aPropertyName, const Reference< css::beans::XPropertyChangeListener >& aListener ) { PropertySetBase::removePropertyChangeListener( aPropertyName, aListener ); } -void SAL_CALL Submission::addVetoableChangeListener( const OUString& PropertyName, const Reference< css::beans::XVetoableChangeListener >& aListener ) throw(UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) +void SAL_CALL Submission::addVetoableChangeListener( const OUString& PropertyName, const Reference< css::beans::XVetoableChangeListener >& aListener ) { PropertySetBase::addVetoableChangeListener( PropertyName, aListener ); } -void SAL_CALL Submission::removeVetoableChangeListener( const OUString& PropertyName, const Reference< css::beans::XVetoableChangeListener >& aListener ) throw(UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) +void SAL_CALL Submission::removeVetoableChangeListener( const OUString& PropertyName, const Reference< css::beans::XVetoableChangeListener >& aListener ) { PropertySetBase::removeVetoableChangeListener( PropertyName, aListener ); } diff --git a/forms/source/xforms/submission.hxx b/forms/source/xforms/submission.hxx index fac867fc753d..836e3a098c07 100644 --- a/forms/source/xforms/submission.hxx +++ b/forms/source/xforms/submission.hxx @@ -167,8 +167,7 @@ private: /// (to be used be API methods before acting on the object) /// /// @throws css::uno::RuntimeException - void liveCheck() - throw( css::uno::RuntimeException ); + void liveCheck(); /// get the model implementation xforms::Model* getModelImpl() const; @@ -184,8 +183,7 @@ protected: css::uno::Any& rConvertedValue, css::uno::Any& rOldValue, sal_Int32 nHandle, - const css::uno::Any& rValue ) - throw ( css::lang::IllegalArgumentException ) override; + const css::uno::Any& rValue ) override; private: void initializePropertySet(); @@ -198,51 +196,40 @@ public: // get/set name - virtual OUString SAL_CALL getName() - throw( css::uno::RuntimeException, std::exception ) override; + virtual OUString SAL_CALL getName() override; - virtual void SAL_CALL setName( const OUString& ) - throw( css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL setName( const OUString& ) override; // XUnoTunnel virtual sal_Int64 SAL_CALL getSomething( - const css::uno::Sequence<sal_Int8>& ) - throw( css::uno::RuntimeException, std::exception ) override; + const css::uno::Sequence<sal_Int8>& ) override; // XSubmission - virtual void SAL_CALL submit( ) - throw ( css::util::VetoException, - css::lang::WrappedTargetException, - css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL submit( ) override; virtual void SAL_CALL submitWithInteraction( - const css::uno::Reference< css::task::XInteractionHandler >& aHandler ) - throw ( css::util::VetoException, - css::lang::WrappedTargetException, - css::uno::RuntimeException, std::exception ) override; + const css::uno::Reference< css::task::XInteractionHandler >& aHandler ) override; virtual void SAL_CALL addSubmissionVetoListener( - const css::uno::Reference< css::form::submission::XSubmissionVetoListener >& listener ) - throw (css::lang::NoSupportException, css::uno::RuntimeException, std::exception) override; + const css::uno::Reference< css::form::submission::XSubmissionVetoListener >& listener ) override; virtual void SAL_CALL removeSubmissionVetoListener( - const css::uno::Reference< css::form::submission::XSubmissionVetoListener >& listener ) - throw (css::lang::NoSupportException, css::uno::RuntimeException, std::exception) override; + const css::uno::Reference< css::form::submission::XSubmissionVetoListener >& listener ) override; // XPropertySet // (need to disambiguate this) - virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override; + virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override; + virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override; + virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override; + virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override; + virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override; + virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override; }; diff --git a/forms/source/xforms/submission/submission.hxx b/forms/source/xforms/submission/submission.hxx index bfdb0922898d..facbc64d5be7 100644 --- a/forms/source/xforms/submission/submission.hxx +++ b/forms/source/xforms/submission/submission.hxx @@ -62,11 +62,11 @@ protected: css::uno::Reference< css::ucb::XProgressHandler > m_aProgressHandler; public: - virtual css::uno::Reference< css::task::XInteractionHandler > SAL_CALL getInteractionHandler() throw (css::uno::RuntimeException, std::exception) override + virtual css::uno::Reference< css::task::XInteractionHandler > SAL_CALL getInteractionHandler() override { return m_aInteractionHandler; } - virtual css::uno::Reference< css::ucb::XProgressHandler > SAL_CALL getProgressHandler() throw (css::uno::RuntimeException, std::exception) override + virtual css::uno::Reference< css::ucb::XProgressHandler > SAL_CALL getProgressHandler() override { return m_aProgressHandler; } @@ -85,16 +85,16 @@ public: CProgressHandlerHelper() : m_count(0) {} - virtual void SAL_CALL push( const css::uno::Any& /*aStatus*/) throw(css::uno::RuntimeException, std::exception) override + virtual void SAL_CALL push( const css::uno::Any& /*aStatus*/) override { m_mLock.acquire(); m_count++; m_mLock.release(); } - virtual void SAL_CALL update(const css::uno::Any& /*aStatus*/) throw(css::uno::RuntimeException, std::exception) override + virtual void SAL_CALL update(const css::uno::Any& /*aStatus*/) override { } - virtual void SAL_CALL pop() throw(css::uno::RuntimeException, std::exception) override + virtual void SAL_CALL pop() override { m_mLock.acquire(); m_count--; diff --git a/forms/source/xforms/xforms_services.cxx b/forms/source/xforms/xforms_services.cxx index 1ca4843f2bac..9c6081abe2af 100644 --- a/forms/source/xforms/xforms_services.cxx +++ b/forms/source/xforms/xforms_services.cxx @@ -35,16 +35,13 @@ class Implementation: NameContainer<css::uno::Reference<css::beans::XPropertySet>>, css::lang::XServiceInfo> { - OUString SAL_CALL getImplementationName() - throw (css::uno::RuntimeException, std::exception) override + OUString SAL_CALL getImplementationName() override { return OUString("com.sun.star.form.XForms"); } - sal_Bool SAL_CALL supportsService(OUString const & ServiceName) - throw (css::uno::RuntimeException, std::exception) override + sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override { return cppu::supportsService(this, ServiceName); } - css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() - throw (css::uno::RuntimeException, std::exception) override + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override { return css::uno::Sequence<OUString>{"com.sun.star.xforms.XForms"}; } diff --git a/forms/source/xforms/xformsevent.cxx b/forms/source/xforms/xformsevent.cxx index 63bcc482539d..c11664308295 100644 --- a/forms/source/xforms/xformsevent.cxx +++ b/forms/source/xforms/xformsevent.cxx @@ -29,57 +29,56 @@ using com::sun::star::uno::RuntimeException; void SAL_CALL XFormsEventConcrete::initXFormsEvent(const OUString& typeArg, sal_Bool canBubbleArg, sal_Bool cancelableArg) - throw (RuntimeException, std::exception) { initEvent(typeArg, canBubbleArg, cancelableArg); } -OUString SAL_CALL XFormsEventConcrete::getType() throw (RuntimeException, std::exception) +OUString SAL_CALL XFormsEventConcrete::getType() { return m_eventType; } -css::uno::Reference< css::xml::dom::events::XEventTarget > SAL_CALL XFormsEventConcrete::getTarget() throw (RuntimeException, std::exception) +css::uno::Reference< css::xml::dom::events::XEventTarget > SAL_CALL XFormsEventConcrete::getTarget() { return m_target; } -css::uno::Reference< css::xml::dom::events::XEventTarget > SAL_CALL XFormsEventConcrete::getCurrentTarget() throw (RuntimeException, std::exception) +css::uno::Reference< css::xml::dom::events::XEventTarget > SAL_CALL XFormsEventConcrete::getCurrentTarget() { return m_currentTarget; } -css::xml::dom::events::PhaseType SAL_CALL XFormsEventConcrete::getEventPhase() throw (RuntimeException, std::exception) +css::xml::dom::events::PhaseType SAL_CALL XFormsEventConcrete::getEventPhase() { return css::xml::dom::events::PhaseType_CAPTURING_PHASE; } -sal_Bool SAL_CALL XFormsEventConcrete::getBubbles() throw (RuntimeException, std::exception) +sal_Bool SAL_CALL XFormsEventConcrete::getBubbles() { return m_bubbles; } -sal_Bool SAL_CALL XFormsEventConcrete::getCancelable() throw (RuntimeException, std::exception) +sal_Bool SAL_CALL XFormsEventConcrete::getCancelable() { return m_cancelable; } -css::util::Time SAL_CALL XFormsEventConcrete::getTimeStamp() throw (RuntimeException, std::exception) +css::util::Time SAL_CALL XFormsEventConcrete::getTimeStamp() { return m_time; } -void SAL_CALL XFormsEventConcrete::stopPropagation() throw (RuntimeException, std::exception) +void SAL_CALL XFormsEventConcrete::stopPropagation() { if(m_cancelable) m_canceled = true; } -void SAL_CALL XFormsEventConcrete::preventDefault() throw (RuntimeException, std::exception) +void SAL_CALL XFormsEventConcrete::preventDefault() { } void SAL_CALL XFormsEventConcrete::initEvent(const OUString& eventTypeArg, sal_Bool canBubbleArg, - sal_Bool cancelableArg) throw (RuntimeException, std::exception) + sal_Bool cancelableArg) { m_eventType = eventTypeArg; m_bubbles = canBubbleArg; diff --git a/forms/source/xforms/xformsevent.hxx b/forms/source/xforms/xformsevent.hxx index 36bbcecddb94..3bdfb857cbe3 100644 --- a/forms/source/xforms/xformsevent.hxx +++ b/forms/source/xforms/xformsevent.hxx @@ -41,27 +41,25 @@ class XFormsEventConcrete : public cppu::WeakImplHelper< XFormsEvent > { { } - virtual OUString SAL_CALL getType() throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::xml::dom::events::XEventTarget > SAL_CALL getTarget() throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::xml::dom::events::XEventTarget > SAL_CALL getCurrentTarget() throw (css::uno::RuntimeException, std::exception) override; - virtual css::xml::dom::events::PhaseType SAL_CALL getEventPhase() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL getBubbles() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL getCancelable() throw (css::uno::RuntimeException, std::exception) override; - virtual css::util::Time SAL_CALL getTimeStamp() throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL stopPropagation() throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL preventDefault() throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getType() override; + virtual css::uno::Reference< css::xml::dom::events::XEventTarget > SAL_CALL getTarget() override; + virtual css::uno::Reference< css::xml::dom::events::XEventTarget > SAL_CALL getCurrentTarget() override; + virtual css::xml::dom::events::PhaseType SAL_CALL getEventPhase() override; + virtual sal_Bool SAL_CALL getBubbles() override; + virtual sal_Bool SAL_CALL getCancelable() override; + virtual css::util::Time SAL_CALL getTimeStamp() override; + virtual void SAL_CALL stopPropagation() override; + virtual void SAL_CALL preventDefault() override; virtual void SAL_CALL initXFormsEvent( const OUString& typeArg, sal_Bool canBubbleArg, - sal_Bool cancelableArg ) - throw (css::uno::RuntimeException, std::exception) override; + sal_Bool cancelableArg ) override; virtual void SAL_CALL initEvent( const OUString& eventTypeArg, sal_Bool canBubbleArg, - sal_Bool cancelableArg) - throw (css::uno::RuntimeException, std::exception) override; + sal_Bool cancelableArg) override; private: diff --git a/forms/source/xforms/xpathlib/extension.cxx b/forms/source/xforms/xpathlib/extension.cxx index 5bf519918960..e171ac422328 100644 --- a/forms/source/xforms/xpathlib/extension.cxx +++ b/forms/source/xforms/xpathlib/extension.cxx @@ -30,7 +30,7 @@ using namespace com::sun::star::xforms; using namespace com::sun::star::xml::xpath; using namespace com::sun::star::beans; -Libxml2ExtensionHandle SAL_CALL CLibxml2XFormsExtension::getLibxml2ExtensionHandle() throw (RuntimeException, std::exception) +Libxml2ExtensionHandle SAL_CALL CLibxml2XFormsExtension::getLibxml2ExtensionHandle() { Libxml2ExtensionHandle aHandle; aHandle.functionLookupFunction = reinterpret_cast< sal_Int64 >( &xforms_lookupFunc ); @@ -40,7 +40,7 @@ Libxml2ExtensionHandle SAL_CALL CLibxml2XFormsExtension::getLibxml2ExtensionHand return aHandle; } -void SAL_CALL CLibxml2XFormsExtension::initialize(const Sequence< Any >& aSequence) throw (RuntimeException, std::exception) +void SAL_CALL CLibxml2XFormsExtension::initialize(const Sequence< Any >& aSequence) { if (aSequence.getLength() == 2 && (aSequence[0] >>= m_aModel) diff --git a/forms/source/xforms/xpathlib/extension.hxx b/forms/source/xforms/xpathlib/extension.hxx index b364a9be1f5b..906b4b70de28 100644 --- a/forms/source/xforms/xpathlib/extension.hxx +++ b/forms/source/xforms/xpathlib/extension.hxx @@ -49,8 +49,8 @@ public: const css::uno::Reference< css::xforms::XModel >& getModel() { return m_aModel;} const css::uno::Reference< css::xml::dom::XNode >& getContextNode() { return m_aContextNode;} - virtual css::xml::xpath::Libxml2ExtensionHandle SAL_CALL getLibxml2ExtensionHandle() throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any >& aSequence) throw (css::uno::RuntimeException, std::exception) override; + virtual css::xml::xpath::Libxml2ExtensionHandle SAL_CALL getLibxml2ExtensionHandle() override; + virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any >& aSequence) override; }; |