diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-25 21:31:58 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-26 18:22:20 +0100 |
commit | 5e21a413c788f839a66d9e4c14e745ed18058db8 (patch) | |
tree | d4451246461346a425ad6f796e08bf1514cdd942 /toolkit/source/controls/unocontrol.cxx | |
parent | 6fc2bd0094a23aafadeef3f4a8c2803d621a588d (diff) |
cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
Diffstat (limited to 'toolkit/source/controls/unocontrol.cxx')
-rw-r--r-- | toolkit/source/controls/unocontrol.cxx | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx index 2e16a7954ddc..4724d818918d 100644 --- a/toolkit/source/controls/unocontrol.cxx +++ b/toolkit/source/controls/unocontrol.cxx @@ -351,7 +351,7 @@ UnoControl::DisposeAccessibleContext(Reference<XComponent> const& xContextComp) } } -void UnoControl::dispose( ) throw(RuntimeException) +void UnoControl::dispose( ) throw(RuntimeException, std::exception) { Reference< XWindowPeer > xPeer; Reference<XComponent> xAccessibleComp; @@ -390,14 +390,14 @@ void UnoControl::dispose( ) throw(RuntimeException) setContext( Reference< XInterface > () ); } -void UnoControl::addEventListener( const Reference< XEventListener >& rxListener ) throw(RuntimeException) +void UnoControl::addEventListener( const Reference< XEventListener >& rxListener ) throw(RuntimeException, std::exception) { ::osl::MutexGuard aGuard( GetMutex() ); maDisposeListeners.addInterface( rxListener ); } -void UnoControl::removeEventListener( const Reference< XEventListener >& rxListener ) throw(RuntimeException) +void UnoControl::removeEventListener( const Reference< XEventListener >& rxListener ) throw(RuntimeException, std::exception) { ::osl::MutexGuard aGuard( GetMutex() ); @@ -410,7 +410,7 @@ bool UnoControl::requiresNewPeer( const OUString& /* _rPropertyName */ ) const } // XPropertiesChangeListener -void UnoControl::propertiesChange( const Sequence< PropertyChangeEvent >& rEvents ) throw(RuntimeException) +void UnoControl::propertiesChange( const Sequence< PropertyChangeEvent >& rEvents ) throw(RuntimeException, std::exception) { Sequence< PropertyChangeEvent > aEvents( rEvents ); { @@ -666,7 +666,7 @@ void UnoControl::ImplModelPropertiesChanged( const Sequence< PropertyChangeEvent } } -void UnoControl::disposing( const EventObject& rEvt ) throw(RuntimeException) +void UnoControl::disposing( const EventObject& rEvt ) throw(RuntimeException, std::exception) { ::osl::ClearableMutexGuard aGuard( GetMutex() ); // do not compare differing types in case of multible inheritance @@ -690,7 +690,7 @@ void UnoControl::disposing( const EventObject& rEvt ) throw(RuntimeException) } -void SAL_CALL UnoControl::setOutputSize( const awt::Size& aSize ) throw (RuntimeException) +void SAL_CALL UnoControl::setOutputSize( const awt::Size& aSize ) throw (RuntimeException, std::exception) { Reference< XWindow2 > xPeerWindow; { @@ -717,33 +717,33 @@ namespace } } -awt::Size SAL_CALL UnoControl::getOutputSize( ) throw (RuntimeException) +awt::Size SAL_CALL UnoControl::getOutputSize( ) throw (RuntimeException, std::exception) { return lcl_askPeer( getPeer(), &XWindow2::getOutputSize, awt::Size() ); } -::sal_Bool SAL_CALL UnoControl::isVisible( ) throw (RuntimeException) +::sal_Bool SAL_CALL UnoControl::isVisible( ) throw (RuntimeException, std::exception) { return lcl_askPeer( getPeer(), &XWindow2::isVisible, maComponentInfos.bVisible ); } -::sal_Bool SAL_CALL UnoControl::isActive( ) throw (RuntimeException) +::sal_Bool SAL_CALL UnoControl::isActive( ) throw (RuntimeException, std::exception) { return lcl_askPeer( getPeer(), &XWindow2::isActive, sal_False ); } -::sal_Bool SAL_CALL UnoControl::isEnabled( ) throw (RuntimeException) +::sal_Bool SAL_CALL UnoControl::isEnabled( ) throw (RuntimeException, std::exception) { return lcl_askPeer( getPeer(), &XWindow2::isEnabled, maComponentInfos.bEnable ); } -::sal_Bool SAL_CALL UnoControl::hasFocus( ) throw (RuntimeException) +::sal_Bool SAL_CALL UnoControl::hasFocus( ) throw (RuntimeException, std::exception) { return lcl_askPeer( getPeer(), &XWindow2::hasFocus, sal_False ); } // XWindow -void UnoControl::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags ) throw(RuntimeException) +void UnoControl::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags ) throw(RuntimeException, std::exception) { Reference< XWindow > xWindow; { @@ -766,7 +766,7 @@ void UnoControl::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int3 xWindow->setPosSize( X, Y, Width, Height, Flags ); } -awt::Rectangle UnoControl::getPosSize( ) throw(RuntimeException) +awt::Rectangle UnoControl::getPosSize( ) throw(RuntimeException, std::exception) { awt::Rectangle aRect( maComponentInfos.nX, maComponentInfos.nY, maComponentInfos.nWidth, maComponentInfos.nHeight); Reference< XWindow > xWindow; @@ -781,7 +781,7 @@ awt::Rectangle UnoControl::getPosSize( ) throw(RuntimeException) return aRect; } -void UnoControl::setVisible( sal_Bool bVisible ) throw(RuntimeException) +void UnoControl::setVisible( sal_Bool bVisible ) throw(RuntimeException, std::exception) { Reference< XWindow > xWindow; { @@ -795,7 +795,7 @@ void UnoControl::setVisible( sal_Bool bVisible ) throw(RuntimeException) xWindow->setVisible( bVisible ); } -void UnoControl::setEnable( sal_Bool bEnable ) throw(RuntimeException) +void UnoControl::setEnable( sal_Bool bEnable ) throw(RuntimeException, std::exception) { Reference< XWindow > xWindow; { @@ -809,7 +809,7 @@ void UnoControl::setEnable( sal_Bool bEnable ) throw(RuntimeException) xWindow->setEnable( bEnable ); } -void UnoControl::setFocus( ) throw(RuntimeException) +void UnoControl::setFocus( ) throw(RuntimeException, std::exception) { Reference< XWindow > xWindow; { @@ -820,7 +820,7 @@ void UnoControl::setFocus( ) throw(RuntimeException) xWindow->setFocus(); } -void UnoControl::addWindowListener( const Reference< XWindowListener >& rxListener ) throw(RuntimeException) +void UnoControl::addWindowListener( const Reference< XWindowListener >& rxListener ) throw(RuntimeException, std::exception) { Reference< XWindow > xPeerWindow; { @@ -833,7 +833,7 @@ void UnoControl::addWindowListener( const Reference< XWindowListener >& rxListen xPeerWindow->addWindowListener( &maWindowListeners ); } -void UnoControl::removeWindowListener( const Reference< XWindowListener >& rxListener ) throw(RuntimeException) +void UnoControl::removeWindowListener( const Reference< XWindowListener >& rxListener ) throw(RuntimeException, std::exception) { Reference< XWindow > xPeerWindow; { @@ -846,7 +846,7 @@ void UnoControl::removeWindowListener( const Reference< XWindowListener >& rxLis xPeerWindow->removeWindowListener( &maWindowListeners ); } -void UnoControl::addFocusListener( const Reference< XFocusListener >& rxListener ) throw(RuntimeException) +void UnoControl::addFocusListener( const Reference< XFocusListener >& rxListener ) throw(RuntimeException, std::exception) { Reference< XWindow > xPeerWindow; { @@ -859,7 +859,7 @@ void UnoControl::addFocusListener( const Reference< XFocusListener >& rxListener xPeerWindow->addFocusListener( &maFocusListeners ); } -void UnoControl::removeFocusListener( const Reference< XFocusListener >& rxListener ) throw(RuntimeException) +void UnoControl::removeFocusListener( const Reference< XFocusListener >& rxListener ) throw(RuntimeException, std::exception) { Reference< XWindow > xPeerWindow; { @@ -872,7 +872,7 @@ void UnoControl::removeFocusListener( const Reference< XFocusListener >& rxListe xPeerWindow->removeFocusListener( &maFocusListeners ); } -void UnoControl::addKeyListener( const Reference< XKeyListener >& rxListener ) throw(RuntimeException) +void UnoControl::addKeyListener( const Reference< XKeyListener >& rxListener ) throw(RuntimeException, std::exception) { Reference< XWindow > xPeerWindow; { @@ -885,7 +885,7 @@ void UnoControl::addKeyListener( const Reference< XKeyListener >& rxListener ) t xPeerWindow->addKeyListener( &maKeyListeners); } -void UnoControl::removeKeyListener( const Reference< XKeyListener >& rxListener ) throw(RuntimeException) +void UnoControl::removeKeyListener( const Reference< XKeyListener >& rxListener ) throw(RuntimeException, std::exception) { Reference< XWindow > xPeerWindow; { @@ -898,7 +898,7 @@ void UnoControl::removeKeyListener( const Reference< XKeyListener >& rxListener xPeerWindow->removeKeyListener( &maKeyListeners); } -void UnoControl::addMouseListener( const Reference< XMouseListener >& rxListener ) throw(RuntimeException) +void UnoControl::addMouseListener( const Reference< XMouseListener >& rxListener ) throw(RuntimeException, std::exception) { Reference< XWindow > xPeerWindow; { @@ -911,7 +911,7 @@ void UnoControl::addMouseListener( const Reference< XMouseListener >& rxListener xPeerWindow->addMouseListener( &maMouseListeners); } -void UnoControl::removeMouseListener( const Reference< XMouseListener >& rxListener ) throw(RuntimeException) +void UnoControl::removeMouseListener( const Reference< XMouseListener >& rxListener ) throw(RuntimeException, std::exception) { Reference< XWindow > xPeerWindow; { @@ -924,7 +924,7 @@ void UnoControl::removeMouseListener( const Reference< XMouseListener >& rxListe xPeerWindow->removeMouseListener( &maMouseListeners ); } -void UnoControl::addMouseMotionListener( const Reference< XMouseMotionListener >& rxListener ) throw(RuntimeException) +void UnoControl::addMouseMotionListener( const Reference< XMouseMotionListener >& rxListener ) throw(RuntimeException, std::exception) { Reference< XWindow > xPeerWindow; { @@ -937,7 +937,7 @@ void UnoControl::addMouseMotionListener( const Reference< XMouseMotionListener > xPeerWindow->addMouseMotionListener( &maMouseMotionListeners); } -void UnoControl::removeMouseMotionListener( const Reference< XMouseMotionListener >& rxListener ) throw(RuntimeException) +void UnoControl::removeMouseMotionListener( const Reference< XMouseMotionListener >& rxListener ) throw(RuntimeException, std::exception) { Reference< XWindow > xPeerWindow; { @@ -950,7 +950,7 @@ void UnoControl::removeMouseMotionListener( const Reference< XMouseMotionListene xPeerWindow->removeMouseMotionListener( &maMouseMotionListeners ); } -void UnoControl::addPaintListener( const Reference< XPaintListener >& rxListener ) throw(RuntimeException) +void UnoControl::addPaintListener( const Reference< XPaintListener >& rxListener ) throw(RuntimeException, std::exception) { Reference< XWindow > xPeerWindow; { @@ -963,7 +963,7 @@ void UnoControl::addPaintListener( const Reference< XPaintListener >& rxListener xPeerWindow->addPaintListener( &maPaintListeners); } -void UnoControl::removePaintListener( const Reference< XPaintListener >& rxListener ) throw(RuntimeException) +void UnoControl::removePaintListener( const Reference< XPaintListener >& rxListener ) throw(RuntimeException, std::exception) { Reference< XWindow > xPeerWindow; { @@ -977,7 +977,7 @@ void UnoControl::removePaintListener( const Reference< XPaintListener >& rxListe } // XView -sal_Bool UnoControl::setGraphics( const Reference< XGraphics >& rDevice ) throw(RuntimeException) +sal_Bool UnoControl::setGraphics( const Reference< XGraphics >& rDevice ) throw(RuntimeException, std::exception) { Reference< XView > xView; { @@ -989,18 +989,18 @@ sal_Bool UnoControl::setGraphics( const Reference< XGraphics >& rDevice ) throw( return xView.is() ? xView->setGraphics( rDevice ) : sal_True; } -Reference< XGraphics > UnoControl::getGraphics( ) throw(RuntimeException) +Reference< XGraphics > UnoControl::getGraphics( ) throw(RuntimeException, std::exception) { return mxGraphics; } -awt::Size UnoControl::getSize( ) throw(RuntimeException) +awt::Size UnoControl::getSize( ) throw(RuntimeException, std::exception) { ::osl::MutexGuard aGuard( GetMutex() ); return awt::Size( maComponentInfos.nWidth, maComponentInfos.nHeight ); } -void UnoControl::draw( sal_Int32 x, sal_Int32 y ) throw(RuntimeException) +void UnoControl::draw( sal_Int32 x, sal_Int32 y ) throw(RuntimeException, std::exception) { Reference< XWindowPeer > xDrawPeer; Reference< XView > xDrawPeerView; @@ -1029,7 +1029,7 @@ void UnoControl::draw( sal_Int32 x, sal_Int32 y ) throw(RuntimeException) xDrawPeer->dispose(); } -void UnoControl::setZoom( float fZoomX, float fZoomY ) throw(RuntimeException) +void UnoControl::setZoom( float fZoomX, float fZoomY ) throw(RuntimeException, std::exception) { Reference< XView > xView; { @@ -1045,14 +1045,14 @@ void UnoControl::setZoom( float fZoomX, float fZoomY ) throw(RuntimeException) } // XControl -void UnoControl::setContext( const Reference< XInterface >& rxContext ) throw(RuntimeException) +void UnoControl::setContext( const Reference< XInterface >& rxContext ) throw(RuntimeException, std::exception) { ::osl::MutexGuard aGuard( GetMutex() ); mxContext = rxContext; } -Reference< XInterface > UnoControl::getContext( ) throw(RuntimeException) +Reference< XInterface > UnoControl::getContext( ) throw(RuntimeException, std::exception) { ::osl::MutexGuard aGuard( GetMutex() ); @@ -1084,7 +1084,7 @@ void UnoControl::peerCreated() xWindow->addPaintListener( &maPaintListeners ); } -void UnoControl::createPeer( const Reference< XToolkit >& rxToolkit, const Reference< XWindowPeer >& rParentPeer ) throw(RuntimeException) +void UnoControl::createPeer( const Reference< XToolkit >& rxToolkit, const Reference< XWindowPeer >& rParentPeer ) throw(RuntimeException, std::exception) { ::osl::ClearableMutexGuard aGuard( GetMutex() ); if ( !mxModel.is() ) @@ -1326,13 +1326,13 @@ void UnoControl::createPeer( const Reference< XToolkit >& rxToolkit, const Refer } } -Reference< XWindowPeer > UnoControl::getPeer() throw(RuntimeException) +Reference< XWindowPeer > UnoControl::getPeer() throw(RuntimeException, std::exception) { ::osl::MutexGuard aGuard( GetMutex() ); return mxPeer; } -sal_Bool UnoControl::setModel( const Reference< XControlModel >& rxModel ) throw(RuntimeException) +sal_Bool UnoControl::setModel( const Reference< XControlModel >& rxModel ) throw(RuntimeException, std::exception) { ::osl::MutexGuard aGuard( GetMutex() ); @@ -1370,17 +1370,17 @@ sal_Bool UnoControl::setModel( const Reference< XControlModel >& rxModel ) throw return mxModel.is(); } -Reference< XControlModel > UnoControl::getModel( ) throw(RuntimeException) +Reference< XControlModel > UnoControl::getModel( ) throw(RuntimeException, std::exception) { return mxModel; } -Reference< XView > UnoControl::getView( ) throw(RuntimeException) +Reference< XView > UnoControl::getView( ) throw(RuntimeException, std::exception) { return static_cast< XView* >( this ); } -void UnoControl::setDesignMode( sal_Bool bOn ) throw(RuntimeException) +void UnoControl::setDesignMode( sal_Bool bOn ) throw(RuntimeException, std::exception) { ModeChangeEvent aModeChangeEvent; @@ -1415,36 +1415,36 @@ void UnoControl::setDesignMode( sal_Bool bOn ) throw(RuntimeException) maModeChangeListeners.notifyEach( &XModeChangeListener::modeChanged, aModeChangeEvent ); } -sal_Bool UnoControl::isDesignMode( ) throw(RuntimeException) +sal_Bool UnoControl::isDesignMode( ) throw(RuntimeException, std::exception) { return mbDesignMode; } -sal_Bool UnoControl::isTransparent( ) throw(RuntimeException) +sal_Bool UnoControl::isTransparent( ) throw(RuntimeException, std::exception) { return sal_False; } // XServiceInfo -OUString UnoControl::getImplementationName( ) throw(RuntimeException) +OUString UnoControl::getImplementationName( ) throw(RuntimeException, std::exception) { OSL_FAIL( "This method should be overloaded!" ); return OUString(); } -sal_Bool UnoControl::supportsService( const OUString& rServiceName ) throw(RuntimeException) +sal_Bool UnoControl::supportsService( const OUString& rServiceName ) throw(RuntimeException, std::exception) { return cppu::supportsService(this, rServiceName); } -Sequence< OUString > UnoControl::getSupportedServiceNames( ) throw(RuntimeException) +Sequence< OUString > UnoControl::getSupportedServiceNames( ) throw(RuntimeException, std::exception) { OUString sName( "com.sun.star.awt.UnoControl" ); return Sequence< OUString >( &sName, 1 ); } -Reference< XAccessibleContext > SAL_CALL UnoControl::getAccessibleContext( ) throw (RuntimeException) +Reference< XAccessibleContext > SAL_CALL UnoControl::getAccessibleContext( ) throw (RuntimeException, std::exception) { // creation of the context will certainly require the SolarMutex ... SolarMutexGuard aSolarGuard; @@ -1479,30 +1479,30 @@ Reference< XAccessibleContext > SAL_CALL UnoControl::getAccessibleContext( ) th return xCurrentContext; } -void SAL_CALL UnoControl::addModeChangeListener( const Reference< XModeChangeListener >& _rxListener ) throw (RuntimeException) +void SAL_CALL UnoControl::addModeChangeListener( const Reference< XModeChangeListener >& _rxListener ) throw (RuntimeException, std::exception) { ::osl::MutexGuard aGuard( GetMutex() ); maModeChangeListeners.addInterface( _rxListener ); } -void SAL_CALL UnoControl::removeModeChangeListener( const Reference< XModeChangeListener >& _rxListener ) throw (RuntimeException) +void SAL_CALL UnoControl::removeModeChangeListener( const Reference< XModeChangeListener >& _rxListener ) throw (RuntimeException, std::exception) { ::osl::MutexGuard aGuard( GetMutex() ); maModeChangeListeners.removeInterface( _rxListener ); } -void SAL_CALL UnoControl::addModeChangeApproveListener( const Reference< XModeChangeApproveListener >& ) throw (NoSupportException, RuntimeException) +void SAL_CALL UnoControl::addModeChangeApproveListener( const Reference< XModeChangeApproveListener >& ) throw (NoSupportException, RuntimeException, std::exception) { throw NoSupportException( ); } -void SAL_CALL UnoControl::removeModeChangeApproveListener( const Reference< XModeChangeApproveListener >& ) throw (NoSupportException, RuntimeException) +void SAL_CALL UnoControl::removeModeChangeApproveListener( const Reference< XModeChangeApproveListener >& ) throw (NoSupportException, RuntimeException, std::exception) { throw NoSupportException( ); } -awt::Point SAL_CALL UnoControl::convertPointToLogic( const awt::Point& i_Point, ::sal_Int16 i_TargetUnit ) throw (IllegalArgumentException, RuntimeException) +awt::Point SAL_CALL UnoControl::convertPointToLogic( const awt::Point& i_Point, ::sal_Int16 i_TargetUnit ) throw (IllegalArgumentException, RuntimeException, std::exception) { Reference< XUnitConversion > xPeerConversion; { @@ -1515,7 +1515,7 @@ awt::Point SAL_CALL UnoControl::convertPointToLogic( const awt::Point& i_Point, } -awt::Point SAL_CALL UnoControl::convertPointToPixel( const awt::Point& i_Point, ::sal_Int16 i_SourceUnit ) throw (IllegalArgumentException, RuntimeException) +awt::Point SAL_CALL UnoControl::convertPointToPixel( const awt::Point& i_Point, ::sal_Int16 i_SourceUnit ) throw (IllegalArgumentException, RuntimeException, std::exception) { Reference< XUnitConversion > xPeerConversion; { @@ -1528,7 +1528,7 @@ awt::Point SAL_CALL UnoControl::convertPointToPixel( const awt::Point& i_Point, } -awt::Size SAL_CALL UnoControl::convertSizeToLogic( const awt::Size& i_Size, ::sal_Int16 i_TargetUnit ) throw (IllegalArgumentException, RuntimeException) +awt::Size SAL_CALL UnoControl::convertSizeToLogic( const awt::Size& i_Size, ::sal_Int16 i_TargetUnit ) throw (IllegalArgumentException, RuntimeException, std::exception) { Reference< XUnitConversion > xPeerConversion; { @@ -1541,7 +1541,7 @@ awt::Size SAL_CALL UnoControl::convertSizeToLogic( const awt::Size& i_Size, ::sa } -awt::Size SAL_CALL UnoControl::convertSizeToPixel( const awt::Size& i_Size, ::sal_Int16 i_SourceUnit ) throw (IllegalArgumentException, RuntimeException) +awt::Size SAL_CALL UnoControl::convertSizeToPixel( const awt::Size& i_Size, ::sal_Int16 i_SourceUnit ) throw (IllegalArgumentException, RuntimeException, std::exception) { Reference< XUnitConversion > xPeerConversion; { @@ -1554,7 +1554,7 @@ awt::Size SAL_CALL UnoControl::convertSizeToPixel( const awt::Size& i_Size, ::sa } -uno::Reference< awt::XStyleSettings > SAL_CALL UnoControl::getStyleSettings() throw (RuntimeException) +uno::Reference< awt::XStyleSettings > SAL_CALL UnoControl::getStyleSettings() throw (RuntimeException, std::exception) { Reference< awt::XStyleSettingsSupplier > xPeerSupplier; { |