diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2012-05-04 15:51:56 +0200 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2012-05-04 15:52:57 +0200 |
commit | 135c63c8f9cc363c0895542b0f3bed48b61ea836 (patch) | |
tree | 5afa3bcc304e246b38058c2ad7b0d1fd1e76a05f /framework | |
parent | c48fe716225b1b784d657685396b6cf5fee4fc3d (diff) |
fdo#48253 Expand SAL_STATIC_CAST and SAL_CONST_CAST
Change-Id: I50f0887ceb4517d7ef234f970ca2ba679d533382
Diffstat (limited to 'framework')
16 files changed, 43 insertions, 43 deletions
diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx index f1e10511cfc4..8319bec42913 100644 --- a/framework/source/classes/menumanager.cxx +++ b/framework/source/classes/menumanager.cxx @@ -313,7 +313,7 @@ MenuManager::~MenuManager() MenuItemHandler* pItemHandler = *p; pItemHandler->xMenuItemDispatch.clear(); if ( pItemHandler->pSubMenuManager ) - SAL_STATIC_CAST( ::com::sun::star::uno::XInterface*, (OWeakObject*)pItemHandler->pSubMenuManager )->release(); + (static_cast< ::com::sun::star::uno::XInterface* >((OWeakObject*)pItemHandler->pSubMenuManager))->release(); delete pItemHandler; } @@ -394,7 +394,7 @@ throw ( RuntimeException ) { pStatusChangedMenu->xMenuItemDispatch = xMenuItemDispatch; pStatusChangedMenu->aMenuItemURL = aTargetURL.Complete; - xMenuItemDispatch->addStatusListener( SAL_STATIC_CAST( XSTATUSLISTENER*, this ), aTargetURL ); + xMenuItemDispatch->addStatusListener( (static_cast< XSTATUSLISTENER* >(this)), aTargetURL ); } } } @@ -423,7 +423,7 @@ void MenuManager::ClearMenuDispatch(const EVENTOBJECT& Source,bool _bRemoveOnly) m_xURLTransformer->parseStrict( aTargetURL ); pItemHandler->xMenuItemDispatch->removeStatusListener( - SAL_STATIC_CAST( XSTATUSLISTENER*, this ), aTargetURL ); + (static_cast< XSTATUSLISTENER* >(this)), aTargetURL ); } pItemHandler->xMenuItemDispatch.clear(); @@ -471,7 +471,7 @@ void SAL_CALL MenuManager::disposing( const EVENTOBJECT& Source ) throw ( RUNTIM m_xURLTransformer->parseStrict( aTargetURL ); - pMenuItemDisposing->xMenuItemDispatch->removeStatusListener(SAL_STATIC_CAST( XSTATUSLISTENER*, this ), aTargetURL ); + pMenuItemDisposing->xMenuItemDispatch->removeStatusListener((static_cast< XSTATUSLISTENER* >(this)), aTargetURL ); pMenuItemDisposing->xMenuItemDispatch.clear(); } } @@ -847,7 +847,7 @@ IMPL_LINK( MenuManager, Activate, Menu *, pMenu ) { pMenuItemHandler->xMenuItemDispatch = xMenuItemDispatch; pMenuItemHandler->aMenuItemURL = aTargetURL.Complete; - xMenuItemDispatch->addStatusListener( SAL_STATIC_CAST( XSTATUSLISTENER*, this ), aTargetURL ); + xMenuItemDispatch->addStatusListener( (static_cast< XSTATUSLISTENER* >(this)), aTargetURL ); } else pMenu->EnableItem( pMenuItemHandler->nItemId, sal_False ); diff --git a/framework/source/dispatch/menudispatcher.cxx b/framework/source/dispatch/menudispatcher.cxx index 969d68ff26a5..7a46065d6a18 100644 --- a/framework/source/dispatch/menudispatcher.cxx +++ b/framework/source/dispatch/menudispatcher.cxx @@ -320,7 +320,7 @@ sal_Bool MenuDispatcher::impl_setMenuBar( MenuBar* pMenuBar, sal_Bool bMenuFromR // remove listener before we destruct ourself, so we cannot be called back afterwards m_pMenuManager->RemoveListener(); - SAL_STATIC_CAST( ::com::sun::star::uno::XInterface*, (OWeakObject*)m_pMenuManager )->release(); + (static_cast< ::com::sun::star::uno::XInterface* >((OWeakObject*)m_pMenuManager))->release(); m_pMenuManager = 0; } diff --git a/framework/source/fwe/classes/actiontriggercontainer.cxx b/framework/source/fwe/classes/actiontriggercontainer.cxx index 2243973a70e1..b3b5e12aea5b 100644 --- a/framework/source/fwe/classes/actiontriggercontainer.cxx +++ b/framework/source/fwe/classes/actiontriggercontainer.cxx @@ -56,8 +56,8 @@ throw ( RuntimeException ) { Any a = ::cppu::queryInterface( aType , - SAL_STATIC_CAST( XMultiServiceFactory*, this ), - SAL_STATIC_CAST( XServiceInfo* , this )); + (static_cast< XMultiServiceFactory* >(this)), + (static_cast< XServiceInfo* >(this))); if( a.hasValue() ) { diff --git a/framework/source/fwe/classes/actiontriggerpropertyset.cxx b/framework/source/fwe/classes/actiontriggerpropertyset.cxx index 51a8671d367b..3aee88fe4f8e 100644 --- a/framework/source/fwe/classes/actiontriggerpropertyset.cxx +++ b/framework/source/fwe/classes/actiontriggerpropertyset.cxx @@ -63,7 +63,7 @@ namespace framework ActionTriggerPropertySet::ActionTriggerPropertySet( const Reference< XMultiServiceFactory >& /*xServiceManager*/ ) : ThreadHelpBase ( &Application::GetSolarMutex() ) , OBroadcastHelper ( m_aLock.getShareableOslMutex() ) - , OPropertySetHelper ( *SAL_STATIC_CAST( OBroadcastHelper *, this )) + , OPropertySetHelper ( *(static_cast< OBroadcastHelper * >(this))) , OWeakObject () , m_xBitmap ( 0 ) , m_xActionTriggerContainer( 0 ) @@ -80,7 +80,7 @@ throw ( RuntimeException ) { Any a = ::cppu::queryInterface( aType , - SAL_STATIC_CAST( XServiceInfo*, this )); + (static_cast< XServiceInfo* >(this))); if( a.hasValue() ) return a; diff --git a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx index d188cea265a7..ad5fc30638c2 100644 --- a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx +++ b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx @@ -57,7 +57,7 @@ namespace framework ActionTriggerSeparatorPropertySet::ActionTriggerSeparatorPropertySet( const Reference< XMultiServiceFactory >& /*ServiceManager*/ ) : ThreadHelpBase ( &Application::GetSolarMutex() ) , OBroadcastHelper ( m_aLock.getShareableOslMutex() ) - , OPropertySetHelper ( *SAL_STATIC_CAST( OBroadcastHelper *, this ) ) + , OPropertySetHelper ( *(static_cast< OBroadcastHelper * >(this)) ) , OWeakObject ( ) , m_nSeparatorType( 0 ) { @@ -73,7 +73,7 @@ throw ( RuntimeException ) { Any a = ::cppu::queryInterface( aType , - SAL_STATIC_CAST( XServiceInfo*, this )); + (static_cast< XServiceInfo* >(this))); if( a.hasValue() ) return a; diff --git a/framework/source/fwe/classes/rootactiontriggercontainer.cxx b/framework/source/fwe/classes/rootactiontriggercontainer.cxx index cfc87091c9ee..0e6348beeeea 100644 --- a/framework/source/fwe/classes/rootactiontriggercontainer.cxx +++ b/framework/source/fwe/classes/rootactiontriggercontainer.cxx @@ -76,11 +76,11 @@ throw ( RuntimeException ) { Any a = ::cppu::queryInterface( aType , - SAL_STATIC_CAST( XMultiServiceFactory* , this ), - SAL_STATIC_CAST( XServiceInfo* , this ), - SAL_STATIC_CAST( XUnoTunnel* , this ), - SAL_STATIC_CAST( XTypeProvider* , this ), - SAL_STATIC_CAST( XNamed* , this )); + (static_cast< XMultiServiceFactory* >(this)), + (static_cast< XServiceInfo* >(this)), + (static_cast< XUnoTunnel* >(this)), + (static_cast< XTypeProvider* >(this)), + (static_cast< XNamed* >(this))); if( a.hasValue() ) { diff --git a/framework/source/fwe/helper/propertysetcontainer.cxx b/framework/source/fwe/helper/propertysetcontainer.cxx index 86872b2310cb..b61e2a545a8e 100644 --- a/framework/source/fwe/helper/propertysetcontainer.cxx +++ b/framework/source/fwe/helper/propertysetcontainer.cxx @@ -72,10 +72,10 @@ throw ( RuntimeException ) { Any a = ::cppu::queryInterface( rType , - SAL_STATIC_CAST( XIndexContainer*, this ), - SAL_STATIC_CAST( XIndexReplace*, this ), - SAL_STATIC_CAST( XIndexAccess*, this ), - SAL_STATIC_CAST( XElementAccess*, this ) ); + (static_cast< XIndexContainer* >(this)), + (static_cast< XIndexReplace* >(this)), + (static_cast< XIndexAccess* >(this)), + (static_cast< XElementAccess* >(this)) ); if( a.hasValue() ) { diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 082d2422693a..993fb2fb56a6 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -788,7 +788,7 @@ void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible ) pMenuBar = (MenuBar *)pInplaceMenuBar->GetMenuBar(); else { - MenuBarWrapper* pMenuBarWrapper = SAL_STATIC_CAST( MenuBarWrapper*, xMenuBar.get() ); + MenuBarWrapper* pMenuBarWrapper = (static_cast< MenuBarWrapper* >(xMenuBar.get()) ); pMenuBar = (MenuBar *)pMenuBarWrapper->GetMenuBarManager()->GetMenuBar(); } @@ -1214,7 +1214,7 @@ throw (uno::RuntimeException) if ( m_xContainerWindow.is() ) { SolarMutexGuard aGuard; - MenuBarWrapper* pMenuBarWrapper = SAL_STATIC_CAST( MenuBarWrapper*, m_xMenuBar.get() ); + MenuBarWrapper* pMenuBarWrapper = (static_cast< MenuBarWrapper* >(m_xMenuBar.get()) ); SystemWindow* pSysWindow = getTopSystemWindow( m_xContainerWindow ); if ( pSysWindow ) { diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 0845c00bbd98..449610dc6a54 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -108,9 +108,9 @@ void SAL_CALL ToolbarLayoutManager::release() throw() uno::Any SAL_CALL ToolbarLayoutManager::queryInterface( const uno::Type & rType ) throw( uno::RuntimeException ) { uno::Any a = ::cppu::queryInterface( rType, - SAL_STATIC_CAST( awt::XDockableWindowListener*, this ), - SAL_STATIC_CAST( ui::XUIConfigurationListener*, this ), - SAL_STATIC_CAST( awt::XWindowListener*, this )); + (static_cast< awt::XDockableWindowListener* >(this)), + (static_cast< ui::XUIConfigurationListener* >(this)), + (static_cast< awt::XWindowListener* >(this))); if ( a.hasValue() ) return a; diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx index 53a4483bc8f6..b356448844ee 100644 --- a/framework/source/uielement/controlmenucontroller.cxx +++ b/framework/source/uielement/controlmenucontroller.cxx @@ -409,8 +409,8 @@ void SAL_CALL ControlMenuController::updatePopupMenu() throw (::com::sun::star:: Reference< XDispatch > xDispatch = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 ); if ( xDispatch.is() ) { - xDispatch->addStatusListener( SAL_STATIC_CAST( XStatusListener*, this ), aTargetURL ); - xDispatch->removeStatusListener( SAL_STATIC_CAST( XStatusListener*, this ), aTargetURL ); + xDispatch->addStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL ); + xDispatch->removeStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL ); m_aURLToDispatchMap.insert( UrlToDispatchMap::value_type( aTargetURL.Complete, xDispatch )); } } diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx index a31b9f91c853..1c437f8ea75d 100644 --- a/framework/source/uielement/fontmenucontroller.cxx +++ b/framework/source/uielement/fontmenucontroller.cxx @@ -240,8 +240,8 @@ void SAL_CALL FontMenuController::updatePopupMenu() throw ( ::com::sun::star::un if ( xDispatch.is() ) { - xDispatch->addStatusListener( SAL_STATIC_CAST( XStatusListener*, this ), aTargetURL ); - xDispatch->removeStatusListener( SAL_STATIC_CAST( XStatusListener*, this ), aTargetURL ); + xDispatch->addStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL ); + xDispatch->removeStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL ); } } diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx index 3016cffe89c8..dc60f115b232 100644 --- a/framework/source/uielement/fontsizemenucontroller.cxx +++ b/framework/source/uielement/fontsizemenucontroller.cxx @@ -341,8 +341,8 @@ void SAL_CALL FontSizeMenuController::updatePopupMenu() throw ( ::com::sun::star if ( xDispatch.is() ) { - xDispatch->addStatusListener( SAL_STATIC_CAST( XStatusListener*, this ), aTargetURL ); - xDispatch->removeStatusListener( SAL_STATIC_CAST( XStatusListener*, this ), aTargetURL ); + xDispatch->addStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL ); + xDispatch->removeStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL ); } svt::PopupMenuControllerBase::updatePopupMenu(); diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx index 2a9e54f99878..f0917fb8e9da 100644 --- a/framework/source/uielement/langselectionmenucontroller.cxx +++ b/framework/source/uielement/langselectionmenucontroller.cxx @@ -320,8 +320,8 @@ void SAL_CALL LanguageSelectionMenuController::updatePopupMenu() throw ( ::com:: if ( xDispatch.is() ) { - xDispatch->addStatusListener( SAL_STATIC_CAST( XStatusListener*, this ), aTargetURL ); - xDispatch->removeStatusListener( SAL_STATIC_CAST( XStatusListener*, this ), aTargetURL ); + xDispatch->addStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL ); + xDispatch->removeStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL ); } // TODO: Fill menu with the information retrieved by the status update diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index f1075e9611fe..0a3922d44d5d 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -262,12 +262,12 @@ Any SAL_CALL MenuBarManager::queryInterface( const Type & rType ) throw ( Runtim { Any a = ::cppu::queryInterface( rType , - SAL_STATIC_CAST( ::com::sun::star::frame::XStatusListener*, this ), - SAL_STATIC_CAST( ::com::sun::star::frame::XFrameActionListener*, this ), - SAL_STATIC_CAST( ::com::sun::star::ui::XUIConfigurationListener*, this ), - SAL_STATIC_CAST( XEventListener*, (XStatusListener *)this ), - SAL_STATIC_CAST( XComponent*, this ), - SAL_STATIC_CAST( ::com::sun::star::awt::XSystemDependentMenuPeer*, this )); + (static_cast< ::com::sun::star::frame::XStatusListener* >(this)), + (static_cast< ::com::sun::star::frame::XFrameActionListener* >(this)), + (static_cast< ::com::sun::star::ui::XUIConfigurationListener* >(this)), + (static_cast< XEventListener* >((XStatusListener *)this)), + (static_cast< XComponent* >(this)), + (static_cast< ::com::sun::star::awt::XSystemDependentMenuPeer* >(this))); if ( a.hasValue() ) return a; diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index d500be371fc4..ca442fb1bb14 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -797,8 +797,8 @@ void SAL_CALL ToolbarsMenuController::activate( const css::awt::MenuEvent& ) thr Reference< XDispatch > xDispatch = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 ); if ( xDispatch.is() ) { - xDispatch->addStatusListener( SAL_STATIC_CAST( XStatusListener*, this ), aTargetURL ); - xDispatch->removeStatusListener( SAL_STATIC_CAST( XStatusListener*, this ), aTargetURL ); + xDispatch->addStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL ); + xDispatch->removeStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL ); } } else if ( aCmdVector[i].equalsAscii( CMD_RESTOREVISIBILITY )) diff --git a/framework/source/uielement/toolbarwrapper.cxx b/framework/source/uielement/toolbarwrapper.cxx index d9e279013995..212884d24b76 100644 --- a/framework/source/uielement/toolbarwrapper.cxx +++ b/framework/source/uielement/toolbarwrapper.cxx @@ -102,7 +102,7 @@ throw( ::com::sun::star::uno::RuntimeException ) { Any a = ::cppu::queryInterface( rType , - SAL_STATIC_CAST( ::com::sun::star::ui::XUIFunctionListener*, this ) ); + (static_cast< ::com::sun::star::ui::XUIFunctionListener* >(this)) ); if( a.hasValue() ) return a; |