diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-13 16:50:03 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-13 21:04:51 +0000 |
commit | 46a2576c130ce199f71492201980b3adb9a5cc07 (patch) | |
tree | 679e323680e94752bb72430dca4435b953e64cc3 | |
parent | d051a056c96e212b879a53444646a88dae1b8972 (diff) |
coverity#737846 Uncaught exception
Change-Id: I9257ec4d9ccb7c602a9537230b61be944371d3ad
-rw-r--r-- | include/svx/fmdpage.hxx | 6 | ||||
-rw-r--r-- | include/svx/unomaster.hxx | 14 | ||||
-rw-r--r-- | include/svx/unopage.hxx | 10 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unopage.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unopage.hxx | 11 |
5 files changed, 40 insertions, 11 deletions
diff --git a/include/svx/fmdpage.hxx b/include/svx/fmdpage.hxx index 16d5ed984d8e..9081076cfc55 100644 --- a/include/svx/fmdpage.hxx +++ b/include/svx/fmdpage.hxx @@ -34,11 +34,13 @@ protected: // Creating a SdrObject based on a Description. Cann be used by derived classes to // support own ::com::sun::star::drawing::Shapes (for example Controls) - virtual SdrObject *_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xShape )throw (); + virtual SdrObject *_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xShape ) + throw (std::exception); // The following method is called when a SvxShape object should be created. // Derived classes can create a derivation or an object aggregating SvxShape. - virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > _CreateShape( SdrObject *pObj ) const throw (); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > _CreateShape( SdrObject *pObj ) const + throw (std::exception); public: SvxFmDrawPage( SdrPage* pPage ); diff --git a/include/svx/unomaster.hxx b/include/svx/unomaster.hxx index 72cc9edbfa33..d0cbb0925b1d 100644 --- a/include/svx/unomaster.hxx +++ b/include/svx/unomaster.hxx @@ -36,8 +36,18 @@ public: virtual sal_Bool queryAggregation( const com::sun::star::uno::Type & rType, com::sun::star::uno::Any& aAny ) = 0; virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) = 0; - virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) = 0; - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) = 0; + virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, + std::exception) = 0; + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, + std::exception) = 0; virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException) = 0; virtual void SAL_CALL setPropertyToDefault( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException) = 0; diff --git a/include/svx/unopage.hxx b/include/svx/unopage.hxx index 78bc0b414857..bf7991914434 100644 --- a/include/svx/unopage.hxx +++ b/include/svx/unopage.hxx @@ -91,13 +91,15 @@ class SVX_DLLPUBLIC SvxDrawPage : public ::cppu::WeakAggImplHelper5< ::com::sun: // Creating a SdrObject using it's Description. // Can be used by derived classes to support their owen Shapes (e.g. Controls). - virtual SdrObject *_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(); + virtual SdrObject *_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) + throw (std::exception); static SvxShape* CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt32 nInventor, SdrObject *pObj = NULL, SvxDrawPage *pPage = NULL, OUString const & referer = OUString() ) throw(); // The following method is called if a SvxShape object is to be created. // Derived classes can create a derivation or an SvxShape aggregating object. - virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > _CreateShape( SdrObject *pObj ) const throw(); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > _CreateShape( SdrObject *pObj ) const + throw (std::exception); UNO3_GETIMPLEMENTATION_DECL( SvxDrawPage ) @@ -109,7 +111,9 @@ class SVX_DLLPUBLIC SvxDrawPage : public ::cppu::WeakAggImplHelper5< ::com::sun: // XShapes virtual void SAL_CALL add( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) + throw (::com::sun::star::uno::RuntimeException, + std::exception); // XElementAccess virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException); diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index d1f11baebf8e..3acd004ae46f 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -559,7 +559,12 @@ Reference< beans::XPropertySetInfo > SAL_CALL SdGenericDrawPage::getPropertySetI } void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName, const Any& aValue ) - throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) + throw (beans::UnknownPropertyException, + beans::PropertyVetoException, + lang::IllegalArgumentException, + lang::WrappedTargetException, + uno::RuntimeException, + std::exception) { ::SolarMutexGuard aGuard; @@ -1336,7 +1341,8 @@ void SAL_CALL SdGenericDrawPage::firePropertiesChangeEvent( const Sequence< OUSt { } -Reference< drawing::XShape > SdGenericDrawPage::_CreateShape( SdrObject *pObj ) const throw() +Reference< drawing::XShape > SdGenericDrawPage::_CreateShape( SdrObject *pObj ) const + throw (std::exception) { DBG_ASSERT( GetPage(), "SdGenericDrawPage::_CreateShape(), can't create shape for disposed page!" ); DBG_ASSERT( pObj, "SdGenericDrawPage::_CreateShape(), invalid call with pObj == 0!" ); diff --git a/sd/source/ui/unoidl/unopage.hxx b/sd/source/ui/unoidl/unopage.hxx index 916f81642a2c..c6742f6af75a 100644 --- a/sd/source/ui/unoidl/unopage.hxx +++ b/sd/source/ui/unoidl/unopage.hxx @@ -108,7 +108,8 @@ public: throw (std::exception); // SvxFmDrawPage - virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > _CreateShape( SdrObject *pObj ) const throw (); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > _CreateShape( SdrObject *pObj ) const + throw (std::exception); // XInterface virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); @@ -124,7 +125,13 @@ public: // XPropertySet virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) + throw (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException, + std::exception); virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); |