diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-06-08 16:29:04 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-06-08 16:29:04 +0200 |
commit | e5de5696a49bec2876526fb30c49b30ff299fe6d (patch) | |
tree | cdd7cfa355f3aa83d959755db386c2496ea7b29f /toolkit/source | |
parent | d4e57ae426efd3666494374b5fd56ddf5ed82891 (diff) |
loplugin:cstylecast: deal with remaining pointer casts
Change-Id: Ib636a7566825dd4bd30cc7e8c2e6b744b619b59b
Diffstat (limited to 'toolkit/source')
-rw-r--r-- | toolkit/source/awt/vclxaccessiblecomponent.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/awt/vclxmenu.cxx | 16 | ||||
-rw-r--r-- | toolkit/source/awt/vclxtoolkit.cxx | 18 | ||||
-rw-r--r-- | toolkit/source/awt/vclxwindow.cxx | 46 | ||||
-rw-r--r-- | toolkit/source/awt/vclxwindows.cxx | 48 | ||||
-rw-r--r-- | toolkit/source/controls/controlmodelcontainerbase.cxx | 4 | ||||
-rw-r--r-- | toolkit/source/controls/dialogcontrol.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/geometrycontrolmodel.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/grid/gridcontrol.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/roadmapcontrol.cxx | 10 | ||||
-rw-r--r-- | toolkit/source/controls/tabpagecontainer.cxx | 6 | ||||
-rw-r--r-- | toolkit/source/controls/tkscrollbar.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrol.cxx | 4 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrolmodel.cxx | 4 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrols.cxx | 14 | ||||
-rw-r--r-- | toolkit/source/helper/vclunohelper.cxx | 2 |
16 files changed, 91 insertions, 91 deletions
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx index 9031492fbf2a..e5addcbe7787 100644 --- a/toolkit/source/awt/vclxaccessiblecomponent.cxx +++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx @@ -587,7 +587,7 @@ sal_Int32 VCLXAccessibleComponent::getAccessibleIndexInParent( ) throw (uno::Ru if ( xChild.is() ) { uno::Reference< accessibility::XAccessibleContext > xChildContext = xChild->getAccessibleContext(); - if ( xChildContext == (accessibility::XAccessibleContext*) this ) + if ( xChildContext == static_cast<accessibility::XAccessibleContext*>(this) ) { nIndex = i; break; diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx index 76469d7ca2b6..c30ad50b3858 100644 --- a/toolkit/source/awt/vclxmenu.cxx +++ b/toolkit/source/awt/vclxmenu.cxx @@ -96,7 +96,7 @@ IMPL_LINK( VCLXMenu, MenuEventListener, VclSimpleEvent*, pEvent ) if ( maMenuListeners.getLength() ) { css::awt::MenuEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); aEvent.MenuId = mpMenu->GetCurItemId(); maMenuListeners.itemSelected( aEvent ); } @@ -112,7 +112,7 @@ IMPL_LINK( VCLXMenu, MenuEventListener, VclSimpleEvent*, pEvent ) if ( maMenuListeners.getLength() ) { css::awt::MenuEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); aEvent.MenuId = mpMenu->GetCurItemId(); maMenuListeners.itemHighlighted( aEvent ); } @@ -123,7 +123,7 @@ IMPL_LINK( VCLXMenu, MenuEventListener, VclSimpleEvent*, pEvent ) if ( maMenuListeners.getLength() ) { css::awt::MenuEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); aEvent.MenuId = mpMenu->GetCurItemId(); maMenuListeners.itemActivated( aEvent ); } @@ -134,7 +134,7 @@ IMPL_LINK( VCLXMenu, MenuEventListener, VclSimpleEvent*, pEvent ) if ( maMenuListeners.getLength() ) { css::awt::MenuEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); aEvent.MenuId = mpMenu->GetCurItemId(); maMenuListeners.itemDeactivated( aEvent ); } @@ -216,14 +216,14 @@ throw(css::uno::RuntimeException, std::exception) if ( bIsPopupMenu ) aRet = ::cppu::queryInterface( rType, - (static_cast< css::awt::XMenu* >((css::awt::XMenuBar*) this) ), + (static_cast< css::awt::XMenu* >(static_cast<css::awt::XMenuBar*>(this)) ), (static_cast< css::awt::XPopupMenu* >(this)), (static_cast< css::lang::XTypeProvider* >(this)), (static_cast< css::lang::XServiceInfo* >(this)), (static_cast< css::lang::XUnoTunnel* >(this)) ); else aRet = ::cppu::queryInterface( rType, - (static_cast< css::awt::XMenu* >((css::awt::XMenuBar*) this) ), + (static_cast< css::awt::XMenu* >(static_cast<css::awt::XMenuBar*>(this)) ), (static_cast< css::awt::XMenuBar* >(this)), (static_cast< css::lang::XTypeProvider* >(this)), (static_cast< css::lang::XServiceInfo* >(this)), @@ -895,7 +895,7 @@ VCLXMenuBar::VCLXMenuBar() ImplCreateMenu( false ); } -VCLXMenuBar::VCLXMenuBar( MenuBar* pMenuBar ) : VCLXMenu( (Menu *)pMenuBar ) +VCLXMenuBar::VCLXMenuBar( MenuBar* pMenuBar ) : VCLXMenu( static_cast<Menu *>(pMenuBar) ) { } @@ -912,7 +912,7 @@ VCLXPopupMenu::VCLXPopupMenu() ImplCreateMenu( true ); } -VCLXPopupMenu::VCLXPopupMenu( PopupMenu* pPopMenu ) : VCLXMenu( (Menu *)pPopMenu ) +VCLXPopupMenu::VCLXPopupMenu( PopupMenu* pPopMenu ) : VCLXMenu( static_cast<Menu *>(pPopMenu) ) { } diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index d65f3b126257..b5ddd771926a 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -491,7 +491,7 @@ sal_uInt16 ImplGetComponentType( const OUString& rServiceName ) static bool bSorted = false; if( !bSorted ) { - qsort( (void*) aComponentInfos, + qsort( static_cast<void*>(aComponentInfos), sizeof( aComponentInfos ) / sizeof( ComponentInfo ), sizeof( ComponentInfo ), ComponentInfoCompare ); @@ -507,7 +507,7 @@ sal_uInt16 ImplGetComponentType( const OUString& rServiceName ) aSearch.pName = "window"; ComponentInfo* pInf = static_cast<ComponentInfo*>(bsearch( &aSearch, - (void*) aComponentInfos, + static_cast<void*>(aComponentInfos), sizeof( aComponentInfos ) / sizeof( ComponentInfo ), sizeof( ComponentInfo ), ComponentInfoCompare )); @@ -839,7 +839,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, pNewWindow = VclPtr<CurrencyField>::Create( pParent, nWinBits ); static_cast<CurrencyField*>(pNewWindow)->EnableEmptyFieldValue( true ); *ppNewComp = new VCLXNumericField; - static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( (FormatterBase*)static_cast<CurrencyField*>(pNewWindow) ); + static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( static_cast<FormatterBase*>(static_cast<CurrencyField*>(pNewWindow)) ); break; case WINDOW_DATEBOX: pNewWindow = VclPtr<DateBox>::Create( pParent, nWinBits ); @@ -848,7 +848,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, pNewWindow = VclPtr<DateField>::Create( pParent, nWinBits ); static_cast<DateField*>(pNewWindow)->EnableEmptyFieldValue( true ); *ppNewComp = new VCLXDateField; - static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( (FormatterBase*)static_cast<DateField*>(pNewWindow) ); + static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( static_cast<FormatterBase*>(static_cast<DateField*>(pNewWindow)) ); break; case WINDOW_DOCKINGAREA: pNewWindow = VclPtr<DockingAreaWindow>::Create( pParent ); @@ -913,7 +913,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, case WINDOW_LONGCURRENCYFIELD: pNewWindow = VclPtr<LongCurrencyField>::Create( pParent, nWinBits ); *ppNewComp = new VCLXCurrencyField; - static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( (FormatterBase*)static_cast<LongCurrencyField*>(pNewWindow) ); + static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( static_cast<FormatterBase*>(static_cast<LongCurrencyField*>(pNewWindow)) ); break; case WINDOW_MENUBUTTON: pNewWindow = VclPtr<MenuButton>::Create( pParent, nWinBits ); @@ -929,7 +929,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, case WINDOW_METRICFIELD: pNewWindow = VclPtr<MetricField>::Create( pParent, nWinBits ); *ppNewComp = new VCLXMetricField; - static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( (FormatterBase*)static_cast<MetricField*>(pNewWindow) ); + static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( static_cast<FormatterBase*>(static_cast<MetricField*>(pNewWindow)) ); break; case WINDOW_DIALOG: case WINDOW_MODALDIALOG: @@ -965,7 +965,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, pNewWindow = VclPtr<NumericField>::Create( pParent, nWinBits ); static_cast<NumericField*>(pNewWindow)->EnableEmptyFieldValue( true ); *ppNewComp = new VCLXNumericField; - static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( (FormatterBase*)static_cast<NumericField*>(pNewWindow) ); + static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( static_cast<FormatterBase*>(static_cast<NumericField*>(pNewWindow)) ); break; case WINDOW_OKBUTTON: pNewWindow = VclPtr<OKButton>::Create( pParent, nWinBits ); @@ -977,7 +977,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, case WINDOW_PATTERNFIELD: pNewWindow = VclPtr<PatternField>::Create( pParent, nWinBits ); *ppNewComp = new VCLXPatternField; - static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( (FormatterBase*)static_cast<PatternField*>(pNewWindow) ); + static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( static_cast<FormatterBase*>(static_cast<PatternField*>(pNewWindow)) ); break; case WINDOW_PUSHBUTTON: pNewWindow = VclPtr<PushButton>::Create( pParent, nWinBits ); @@ -1050,7 +1050,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, pNewWindow = VclPtr<TimeField>::Create( pParent, nWinBits ); static_cast<TimeField*>(pNewWindow)->EnableEmptyFieldValue( true ); *ppNewComp = new VCLXTimeField; - static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( (FormatterBase*)static_cast<TimeField*>(pNewWindow) ); + static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( static_cast<FormatterBase*>(static_cast<TimeField*>(pNewWindow)) ); break; case WINDOW_TOOLBOX: pNewWindow = VclPtr<ToolBox>::Create( pParent, nWinBits ); diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index bf49bbe97e1f..3aeb93602602 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -443,7 +443,7 @@ namespace void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xThis( (::cppu::OWeakObject*)this ); + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xThis( static_cast<cppu::OWeakObject*>(this) ); switch ( rVclWindowEvent.GetId() ) { @@ -464,7 +464,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( mpImpl->getPaintListeners().getLength() ) { ::com::sun::star::awt::PaintEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); aEvent.UpdateRect = AWTRectangle( *static_cast<Rectangle*>(rVclWindowEvent.GetData()) ); aEvent.Count = 0; mpImpl->getPaintListeners().windowPaint( aEvent ); @@ -476,7 +476,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( mpImpl->getWindowListeners().getLength() ) { ::com::sun::star::awt::WindowEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); ImplInitWindowEvent( aEvent, rVclWindowEvent.GetWindow() ); mpImpl->getWindowListeners().windowMoved( aEvent ); } @@ -487,7 +487,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( mpImpl->getWindowListeners().getLength() ) { ::com::sun::star::awt::WindowEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); ImplInitWindowEvent( aEvent, rVclWindowEvent.GetWindow() ); mpImpl->getWindowListeners().windowResized( aEvent ); } @@ -498,7 +498,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( mpImpl->getWindowListeners().getLength() ) { ::com::sun::star::awt::WindowEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); ImplInitWindowEvent( aEvent, rVclWindowEvent.GetWindow() ); mpImpl->getWindowListeners().windowShown( aEvent ); } @@ -507,7 +507,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( mpImpl->getTopWindowListeners().getLength() ) { ::com::sun::star::lang::EventObject aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); mpImpl->getTopWindowListeners().windowOpened( aEvent ); } } @@ -517,7 +517,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( mpImpl->getWindowListeners().getLength() ) { ::com::sun::star::awt::WindowEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); ImplInitWindowEvent( aEvent, rVclWindowEvent.GetWindow() ); mpImpl->getWindowListeners().windowHidden( aEvent ); } @@ -526,7 +526,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( mpImpl->getTopWindowListeners().getLength() ) { ::com::sun::star::lang::EventObject aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); mpImpl->getTopWindowListeners().windowClosed( aEvent ); } } @@ -536,7 +536,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( mpImpl->getTopWindowListeners().getLength() ) { ::com::sun::star::lang::EventObject aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); mpImpl->getTopWindowListeners().windowActivated( aEvent ); } } @@ -546,7 +546,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( mpImpl->getTopWindowListeners().getLength() ) { ::com::sun::star::lang::EventObject aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); mpImpl->getTopWindowListeners().windowDeactivated( aEvent ); } } @@ -556,13 +556,13 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( mpImpl->getDockableWindowListeners().getLength() ) { ::com::sun::star::lang::EventObject aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); mpImpl->getDockableWindowListeners().notifyEach( &XDockableWindowListener::closed, aEvent ); } if ( mpImpl->getTopWindowListeners().getLength() ) { ::com::sun::star::lang::EventObject aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); mpImpl->getTopWindowListeners().windowClosing( aEvent ); } } @@ -581,7 +581,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( mpImpl->getFocusListeners().getLength() ) { ::com::sun::star::awt::FocusEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); aEvent.FocusFlags = static_cast<sal_Int16>(rVclWindowEvent.GetWindow()->GetGetFocusFlags()); aEvent.Temporary = sal_False; mpImpl->getFocusListeners().focusGained( aEvent ); @@ -603,7 +603,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( mpImpl->getFocusListeners().getLength() ) { ::com::sun::star::awt::FocusEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); aEvent.FocusFlags = static_cast<sal_Int16>(rVclWindowEvent.GetWindow()->GetGetFocusFlags()); aEvent.Temporary = sal_False; @@ -618,7 +618,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) pNext = pNextC; pNext->GetComponentInterface( true ); - aEvent.NextFocus = (::cppu::OWeakObject*)pNext->GetWindowPeer(); + aEvent.NextFocus = static_cast<cppu::OWeakObject*>(pNext->GetWindowPeer()); } mpImpl->getFocusListeners().focusLost( aEvent ); } @@ -630,7 +630,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( mpImpl->getTopWindowListeners().getLength() ) { ::com::sun::star::lang::EventObject aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); mpImpl->getTopWindowListeners().windowMinimized( aEvent ); } } @@ -640,7 +640,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( mpImpl->getTopWindowListeners().getLength() ) { ::com::sun::star::lang::EventObject aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); mpImpl->getTopWindowListeners().windowNormalized( aEvent ); } } @@ -758,7 +758,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if( pData ) { ::com::sun::star::awt::DockingEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); aEvent.TrackingRectangle = AWTRectangle( pData->maTrackRect ); aEvent.MousePos.X = pData->maMousePos.X(); aEvent.MousePos.Y = pData->maMousePos.Y(); @@ -779,7 +779,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if( pData ) { ::com::sun::star::awt::DockingEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); aEvent.TrackingRectangle = AWTRectangle( pData->maTrackRect ); aEvent.MousePos.X = pData->maMousePos.X(); aEvent.MousePos.Y = pData->maMousePos.Y(); @@ -810,7 +810,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if( pData ) { ::com::sun::star::awt::EndDockingEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); aEvent.WindowRectangle = AWTRectangle( pData->maWindowRect ); aEvent.bFloating = pData->mbFloating; aEvent.bCancelled = pData->mbCancelled; @@ -826,7 +826,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) sal_Bool *p_bFloating = static_cast<sal_Bool*>(rVclWindowEvent.GetData()); ::com::sun::star::lang::EventObject aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); Reference< XDockableWindowListener > xFirstListener; ::cppu::OInterfaceIteratorHelper aIter( mpImpl->getDockableWindowListeners() ); @@ -844,7 +844,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( mpImpl->getDockableWindowListeners().getLength() ) { ::com::sun::star::lang::EventObject aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); mpImpl->getDockableWindowListeners().notifyEach( &XDockableWindowListener::toggleFloatingMode, aEvent ); } } @@ -858,7 +858,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if( pData ) { ::com::sun::star::awt::EndPopupModeEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); aEvent.FloatingPosition.X = pData->maFloatingPos.X(); aEvent.FloatingPosition.Y = pData->maFloatingPos.Y(); aEvent.bTearoff = pData->mbTearoff; diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 22bdcb4f9df7..a02ac474f864 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -392,7 +392,7 @@ void VCLXButton::dispose() throw(::com::sun::star::uno::RuntimeException, std::e SolarMutexGuard aGuard; ::com::sun::star::lang::EventObject aObj; - aObj.Source = (::cppu::OWeakObject*)this; + aObj.Source = static_cast<cppu::OWeakObject*>(this); maActionListeners.disposeAndClear( aObj ); maItemListeners.disposeAndClear( aObj ); VCLXGraphicControl::dispose(); @@ -585,7 +585,7 @@ void VCLXButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( maActionListeners.getLength() ) { ::com::sun::star::awt::ActionEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); aEvent.ActionCommand = maActionCommand; Callback aCallback = ::boost::bind( @@ -606,7 +606,7 @@ void VCLXButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( maItemListeners.getLength() ) { ::com::sun::star::awt::ItemEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); aEvent.Selected = ( rButton.GetState() == TRISTATE_TRUE ) ? 1 : 0; maItemListeners.itemStateChanged( aEvent ); } @@ -814,7 +814,7 @@ void VCLXCheckBox::dispose() throw(::com::sun::star::uno::RuntimeException, std: SolarMutexGuard aGuard; ::com::sun::star::lang::EventObject aObj; - aObj.Source = (::cppu::OWeakObject*)this; + aObj.Source = static_cast<cppu::OWeakObject*>(this); maItemListeners.disposeAndClear( aObj ); VCLXGraphicControl::dispose(); } @@ -1030,7 +1030,7 @@ void VCLXCheckBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( maItemListeners.getLength() ) { ::com::sun::star::awt::ItemEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); aEvent.Highlighted = 0; aEvent.Selected = pCheckBox->GetState(); maItemListeners.itemStateChanged( aEvent ); @@ -1038,7 +1038,7 @@ void VCLXCheckBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( !IsSynthesizingVCLEvent() && maActionListeners.getLength() ) { ::com::sun::star::awt::ActionEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); aEvent.ActionCommand = maActionCommand; maActionListeners.actionPerformed( aEvent ); } @@ -1115,7 +1115,7 @@ void VCLXRadioButton::dispose() throw(::com::sun::star::uno::RuntimeException, s SolarMutexGuard aGuard; ::com::sun::star::lang::EventObject aObj; - aObj.Source = (::cppu::OWeakObject*)this; + aObj.Source = static_cast<cppu::OWeakObject*>(this); maItemListeners.disposeAndClear( aObj ); VCLXGraphicControl::dispose(); } @@ -1303,7 +1303,7 @@ void VCLXRadioButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent if ( !IsSynthesizingVCLEvent() && maActionListeners.getLength() ) { ::com::sun::star::awt::ActionEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); aEvent.ActionCommand = maActionCommand; maActionListeners.actionPerformed( aEvent ); } @@ -1328,7 +1328,7 @@ void VCLXRadioButton::ImplClickedOrToggled( bool bToggled ) if ( pRadioButton && ( pRadioButton->IsRadioCheckEnabled() == bToggled ) && ( bToggled || pRadioButton->IsStateChanged() ) && maItemListeners.getLength() ) { ::com::sun::star::awt::ItemEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); aEvent.Highlighted = 0; aEvent.Selected = pRadioButton->IsChecked() ? 1 : 0; maItemListeners.itemStateChanged( aEvent ); @@ -1445,7 +1445,7 @@ void VCLXSpinField::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( maSpinListeners.getLength() ) { ::com::sun::star::awt::SpinEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); switch ( rVclWindowEvent.GetId() ) { case VCLEVENT_SPINFIELD_UP: maSpinListeners.up( aEvent ); @@ -1515,7 +1515,7 @@ void VCLXListBox::dispose() throw(::com::sun::star::uno::RuntimeException, std:: SolarMutexGuard aGuard; ::com::sun::star::lang::EventObject aObj; - aObj.Source = (::cppu::OWeakObject*)this; + aObj.Source = static_cast<cppu::OWeakObject*>(this); maItemListeners.disposeAndClear( aObj ); maActionListeners.disposeAndClear( aObj ); VCLXWindow::dispose(); @@ -1801,7 +1801,7 @@ void VCLXListBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { // Call ActionListener on DropDown event ::com::sun::star::awt::ActionEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); aEvent.ActionCommand = pListBox->GetSelectEntry(); maActionListeners.actionPerformed( aEvent ); } @@ -1818,7 +1818,7 @@ void VCLXListBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( GetWindow() && maActionListeners.getLength() ) { ::com::sun::star::awt::ActionEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); aEvent.ActionCommand = GetAs<ListBox>()->GetSelectEntry(); maActionListeners.actionPerformed( aEvent ); } @@ -2030,7 +2030,7 @@ void VCLXListBox::ImplCallItemListeners() if ( pListBox && maItemListeners.getLength() ) { ::com::sun::star::awt::ItemEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); aEvent.Highlighted = 0; // Set to 0xFFFF on multiple selection, selected entry ID otherwise @@ -2459,7 +2459,7 @@ void SAL_CALL VCLXMultiPage::dispose() throw(::com::sun::star::uno::RuntimeExcep SolarMutexGuard aGuard; ::com::sun::star::lang::EventObject aObj; - aObj.Source = (::cppu::OWeakObject*)this; + aObj.Source = static_cast<cppu::OWeakObject*>(this); maTabListeners.disposeAndClear( aObj ); VCLXContainer::dispose(); } @@ -2871,7 +2871,7 @@ void VCLXFixedHyperlink::dispose() throw(::com::sun::star::uno::RuntimeException SolarMutexGuard aGuard; ::com::sun::star::lang::EventObject aObj; - aObj.Source = (::cppu::OWeakObject*)this; + aObj.Source = static_cast<cppu::OWeakObject*>(this); maActionListeners.disposeAndClear( aObj ); VCLXWindow::dispose(); } @@ -2891,7 +2891,7 @@ void VCLXFixedHyperlink::ProcessWindowEvent( const VclWindowEvent& rVclWindowEve if ( maActionListeners.getLength() ) { ::com::sun::star::awt::ActionEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); maActionListeners.actionPerformed( aEvent ); } else @@ -3336,7 +3336,7 @@ void VCLXScrollBar::dispose() throw(::com::sun::star::uno::RuntimeException, std SolarMutexGuard aGuard; ::com::sun::star::lang::EventObject aObj; - aObj.Source = (::cppu::OWeakObject*)this; + aObj.Source = static_cast<cppu::OWeakObject*>(this); maAdjustmentListeners.disposeAndClear( aObj ); VCLXWindow::dispose(); } @@ -3709,7 +3709,7 @@ void VCLXScrollBar::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if( pScrollBar ) { ::com::sun::star::awt::AdjustmentEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); aEvent.Value = pScrollBar->GetThumbPos(); // set adjustment type @@ -3823,7 +3823,7 @@ void VCLXEdit::dispose() throw(::com::sun::star::uno::RuntimeException, std::exc SolarMutexGuard aGuard; ::com::sun::star::lang::EventObject aObj; - aObj.Source = (::cppu::OWeakObject*)this; + aObj.Source = static_cast<cppu::OWeakObject*>(this); maTextListeners.disposeAndClear( aObj ); VCLXWindow::dispose(); } @@ -4117,7 +4117,7 @@ void VCLXEdit::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( GetTextListeners().getLength() ) { ::com::sun::star::awt::TextEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); GetTextListeners().textChanged( aEvent ); } } @@ -4189,7 +4189,7 @@ void VCLXComboBox::dispose() throw(::com::sun::star::uno::RuntimeException, std: SolarMutexGuard aGuard; ::com::sun::star::lang::EventObject aObj; - aObj.Source = (::cppu::OWeakObject*)this; + aObj.Source = static_cast<cppu::OWeakObject*>(this); maItemListeners.disposeAndClear( aObj ); maActionListeners.disposeAndClear( aObj ); VCLXEdit::dispose(); @@ -4435,7 +4435,7 @@ void VCLXComboBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( !pComboBox->IsTravelSelect() ) { ::com::sun::star::awt::ItemEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); aEvent.Highlighted = 0; // Set to 0xFFFF on multiple selection, selected entry ID otherwise @@ -4451,7 +4451,7 @@ void VCLXComboBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( maActionListeners.getLength() ) { ::com::sun::star::awt::ActionEvent aEvent; - aEvent.Source = (::cppu::OWeakObject*)this; + aEvent.Source = static_cast<cppu::OWeakObject*>(this); // aEvent.ActionCommand = ...; maActionListeners.actionPerformed( aEvent ); } diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx index 5457d162db6a..21c559d58edc 100644 --- a/toolkit/source/controls/controlmodelcontainerbase.cxx +++ b/toolkit/source/controls/controlmodelcontainerbase.cxx @@ -409,7 +409,7 @@ Reference< XInterface > ControlModelContainerBase::createInstance( const OUStrin } } - Reference< XInterface > xNewModel = (::cppu::OWeakObject*)pNewModel; + Reference< XInterface > xNewModel = static_cast<cppu::OWeakObject*>(pNewModel); return xNewModel; } @@ -1695,7 +1695,7 @@ void ControlContainerBase::ImplModelPropertiesChanged( const Sequence< PropertyC if ( !mbPosModified && !mbSizeModified ) { // Don't set new pos/size if we get new values from window listener - Reference< XControl > xThis( (XAggregation*)(::cppu::OWeakAggObject*)this, UNO_QUERY ); + Reference< XControl > xThis( static_cast<XAggregation*>(static_cast<cppu::OWeakAggObject*>(this)), UNO_QUERY ); ImplSetPosSize( xThis ); } } diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index f194f3d8c021..a19b255311b1 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -721,7 +721,7 @@ void SAL_CALL UnoMultiPageControl::disposing(const EventObject&) throw (RuntimeE void SAL_CALL UnoMultiPageControl::dispose() throw (RuntimeException, std::exception) { lang::EventObject aEvt; - aEvt.Source = (::cppu::OWeakObject*)this; + aEvt.Source = static_cast<cppu::OWeakObject*>(this); maTabListeners.disposeAndClear( aEvt ); ControlContainerBase::dispose(); } diff --git a/toolkit/source/controls/geometrycontrolmodel.cxx b/toolkit/source/controls/geometrycontrolmodel.cxx index a5b67972568a..354b5625cf5d 100644 --- a/toolkit/source/controls/geometrycontrolmodel.cxx +++ b/toolkit/source/controls/geometrycontrolmodel.cxx @@ -420,7 +420,7 @@ Reference< XNameContainer > SAL_CALL OGeometryControlModel_Base::getEvents() throw(RuntimeException, std::exception) { if( !mxEventContainer.is() ) - mxEventContainer = (XNameContainer*)new toolkit::ScriptEventContainer(); + mxEventContainer = static_cast<XNameContainer*>(new toolkit::ScriptEventContainer()); return mxEventContainer; } diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index 18736fe8acc2..444d7b1243d4 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -294,7 +294,7 @@ OUString UnoGridControl::GetComponentServiceName() void SAL_CALL UnoGridControl::dispose( ) throw(RuntimeException, std::exception) { lang::EventObject aEvt; - aEvt.Source = (::cppu::OWeakObject*)this; + aEvt.Source = static_cast<cppu::OWeakObject*>(this); m_aSelectionListeners.disposeAndClear( aEvt ); UnoControl::dispose(); } diff --git a/toolkit/source/controls/roadmapcontrol.cxx b/toolkit/source/controls/roadmapcontrol.cxx index b63b72bf68cd..31b25b9d679c 100644 --- a/toolkit/source/controls/roadmapcontrol.cxx +++ b/toolkit/source/controls/roadmapcontrol.cxx @@ -130,7 +130,7 @@ static void lcl_throwIndexOutOfBoundsException( ) Reference< XInterface > SAL_CALL UnoControlRoadmapModel::createInstance( ) throw (Exception, ::com::sun::star::uno::RuntimeException, std::exception) { ORoadmapEntry* pRoadmapItem = new ORoadmapEntry(); - Reference< XInterface > xNewRoadmapItem = (::cppu::OWeakObject*)pRoadmapItem; + Reference< XInterface > xNewRoadmapItem = static_cast<cppu::OWeakObject*>(pRoadmapItem); return xNewRoadmapItem; } @@ -139,7 +139,7 @@ static void lcl_throwIndexOutOfBoundsException( ) { // Todo: implementation of the arguments handling ORoadmapEntry* pRoadmapItem = new ORoadmapEntry(); - Reference< XInterface > xNewRoadmapItem = (::cppu::OWeakObject*)pRoadmapItem; + Reference< XInterface > xNewRoadmapItem = static_cast<cppu::OWeakObject*>(pRoadmapItem); return xNewRoadmapItem; } @@ -289,7 +289,7 @@ static void lcl_throwIndexOutOfBoundsException( ) maRoadmapItems.insert( maRoadmapItems.begin() + Index, xRoadmapItem); ContainerEvent aEvent = GetContainerEvent(Index, xRoadmapItem); maContainerListeners.elementInserted( aEvent ); - Reference< XPropertySet > xPropertySet( (XAggregation*) (::cppu::OWeakAggObject*)this, UNO_QUERY ); + Reference< XPropertySet > xPropertySet( static_cast<XAggregation*>(static_cast<cppu::OWeakAggObject*>(this)), UNO_QUERY ); sal_Int16 n_CurrentItemID = GetCurrentItemID( xPropertySet ); if ( Index <= n_CurrentItemID ) { @@ -310,7 +310,7 @@ static void lcl_throwIndexOutOfBoundsException( ) maRoadmapItems.erase( maRoadmapItems.begin() + Index ); ContainerEvent aEvent = GetContainerEvent(Index, xRoadmapItem); maContainerListeners.elementRemoved( aEvent ); - Reference< XPropertySet > xPropertySet( (XAggregation*) (::cppu::OWeakAggObject*)this, UNO_QUERY ); + Reference< XPropertySet > xPropertySet( static_cast<XAggregation*>(static_cast<cppu::OWeakAggObject*>(this)), UNO_QUERY ); sal_Int16 n_CurrentItemID = GetCurrentItemID( xPropertySet ); Any aAny; if ( Index <= n_CurrentItemID ) @@ -412,7 +412,7 @@ sal_Bool SAL_CALL UnoRoadmapControl::setModel(const Reference< XControlModel >& void UnoRoadmapControl::dispose() throw(RuntimeException, std::exception) { EventObject aEvt; - aEvt.Source = (::cppu::OWeakObject*)this; + aEvt.Source = static_cast<cppu::OWeakObject*>(this); maItemListeners.disposeAndClear( aEvt ); UnoControl::dispose(); } diff --git a/toolkit/source/controls/tabpagecontainer.cxx b/toolkit/source/controls/tabpagecontainer.cxx index fac6cc0a6a4b..e5363402dd84 100644 --- a/toolkit/source/controls/tabpagecontainer.cxx +++ b/toolkit/source/controls/tabpagecontainer.cxx @@ -159,7 +159,7 @@ void SAL_CALL UnoControlTabPageContainerModel::insertByIndex( ::sal_Int32 nIndex m_aTabPageVector.insert( aIter, xTabPageModel ); } else - throw IndexOutOfBoundsException( OUString(), (OWeakObject *)this ); + throw IndexOutOfBoundsException( OUString(), static_cast<OWeakObject *>(this) ); ContainerEvent aEvent; aEvent.Source = *this; aEvent.Element <<= aElement; @@ -167,7 +167,7 @@ void SAL_CALL UnoControlTabPageContainerModel::insertByIndex( ::sal_Int32 nIndex maContainerListeners.elementInserted( aEvent ); } else - throw IllegalArgumentException( WRONG_TYPE_EXCEPTION, (OWeakObject *)this, 2 ); + throw IllegalArgumentException( WRONG_TYPE_EXCEPTION, static_cast<OWeakObject *>(this), 2 ); } void SAL_CALL UnoControlTabPageContainerModel::removeByIndex( ::sal_Int32 /*Index*/ ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException, std::exception) @@ -232,7 +232,7 @@ OUString UnoControlTabPageContainer::GetComponentServiceName() void SAL_CALL UnoControlTabPageContainer::dispose( ) throw(RuntimeException, std::exception) { lang::EventObject aEvt; - aEvt.Source = (::cppu::OWeakObject*)this; + aEvt.Source = static_cast<cppu::OWeakObject*>(this); m_aTabPageListeners.disposeAndClear( aEvt ); UnoControl::dispose(); } diff --git a/toolkit/source/controls/tkscrollbar.cxx b/toolkit/source/controls/tkscrollbar.cxx index 52fc7cd7beed..114b04fe15fc 100644 --- a/toolkit/source/controls/tkscrollbar.cxx +++ b/toolkit/source/controls/tkscrollbar.cxx @@ -133,7 +133,7 @@ namespace toolkit void UnoScrollBarControl::dispose() throw(uno::RuntimeException, std::exception) { lang::EventObject aEvt; - aEvt.Source = (::cppu::OWeakObject*)this; + aEvt.Source = static_cast<cppu::OWeakObject*>(this); maAdjustmentListeners.disposeAndClear( aEvt ); UnoControl::dispose(); } diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx index 5bfbc0d6a8a1..9c85e6270596 100644 --- a/toolkit/source/controls/unocontrol.cxx +++ b/toolkit/source/controls/unocontrol.cxx @@ -573,7 +573,7 @@ void UnoControl::ImplModelPropertiesChanged( const Sequence< PropertyChangeEvent } Reference< XWindow > xParent = getParentPeer(); - Reference< XControl > xThis( (XAggregation*)(::cppu::OWeakAggObject*)this, UNO_QUERY ); + Reference< XControl > xThis( static_cast<XAggregation*>(static_cast<cppu::OWeakAggObject*>(this)), UNO_QUERY ); // call createPeer via a interface got from queryInterface, so the aggregating class can intercept it DBG_ASSERT( !bNeedNewPeer || xParent.is(), "Need new peer, but don't have a parent!" ); @@ -1083,7 +1083,7 @@ void UnoControl::createPeer( const Reference< XToolkit >& rxToolkit, const Refer { RuntimeException aException; aException.Message = "createPeer: no model!"; - aException.Context = (XAggregation*)(::cppu::OWeakAggObject*)this; + aException.Context = static_cast<XAggregation*>(static_cast<cppu::OWeakAggObject*>(this)); throw( aException ); } diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx index da993516c86c..6babb44ced15 100644 --- a/toolkit/source/controls/unocontrolmodel.cxx +++ b/toolkit/source/controls/unocontrolmodel.cxx @@ -432,7 +432,7 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( UnoControlModel, UnoControlModel_Base, ::cppu: uno::Reference< util::XCloneable > UnoControlModel::createClone() throw(::com::sun::star::uno::RuntimeException, std::exception) { UnoControlModel* pClone = Clone(); - uno::Reference< util::XCloneable > xClone( (::cppu::OWeakObject*) pClone, uno::UNO_QUERY ); + uno::Reference< util::XCloneable > xClone( static_cast<cppu::OWeakObject*>(pClone), uno::UNO_QUERY ); return xClone; } @@ -442,7 +442,7 @@ void UnoControlModel::dispose( ) throw(::com::sun::star::uno::RuntimeException, ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); ::com::sun::star::lang::EventObject aEvt; - aEvt.Source = (::com::sun::star::uno::XAggregation*)(::cppu::OWeakAggObject*)this; + aEvt.Source = static_cast<com::sun::star::uno::XAggregation*>(static_cast<cppu::OWeakAggObject*>(this)); maDisposeListeners.disposeAndClear( aEvt ); BrdcstHelper.aLC.disposeAndClear( aEvt ); diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index a495f1488b3f..1101e57edfa8 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -825,7 +825,7 @@ OUString UnoButtonControl::GetComponentServiceName() void UnoButtonControl::dispose() throw(uno::RuntimeException, std::exception) { lang::EventObject aEvt; - aEvt.Source = (::cppu::OWeakObject*)this; + aEvt.Source = static_cast<cppu::OWeakObject*>(this); maActionListeners.disposeAndClear( aEvt ); maItemListeners.disposeAndClear( aEvt ); UnoControlBase::dispose(); @@ -1078,7 +1078,7 @@ OUString UnoImageControlControl::GetComponentServiceName() void UnoImageControlControl::dispose() throw(uno::RuntimeException, std::exception) { lang::EventObject aEvt; - aEvt.Source = (::cppu::OWeakObject*)this; + aEvt.Source = static_cast<cppu::OWeakObject*>(this); maActionListeners.disposeAndClear( aEvt ); UnoControl::dispose(); } @@ -1220,7 +1220,7 @@ OUString UnoRadioButtonControl::GetComponentServiceName() void UnoRadioButtonControl::dispose() throw(uno::RuntimeException, std::exception) { lang::EventObject aEvt; - aEvt.Source = (::cppu::OWeakObject*)this; + aEvt.Source = static_cast<cppu::OWeakObject*>(this); maItemListeners.disposeAndClear( aEvt ); UnoControlBase::dispose(); } @@ -1475,7 +1475,7 @@ OUString UnoCheckBoxControl::GetComponentServiceName() void UnoCheckBoxControl::dispose() throw(uno::RuntimeException, std::exception) { lang::EventObject aEvt; - aEvt.Source = (::cppu::OWeakObject*)this; + aEvt.Source = static_cast<cppu::OWeakObject*>(this); maItemListeners.disposeAndClear( aEvt ); UnoControlBase::dispose(); } @@ -1778,7 +1778,7 @@ awt::Size UnoFixedHyperlinkControl::calcAdjustedSize( const awt::Size& rNewSize void UnoFixedHyperlinkControl::dispose() throw(uno::RuntimeException, std::exception) { lang::EventObject aEvt; - aEvt.Source = (::cppu::OWeakObject*)this; + aEvt.Source = static_cast<cppu::OWeakObject*>(this); maActionListeners.disposeAndClear( aEvt ); UnoControlBase::dispose(); } @@ -2725,7 +2725,7 @@ css::uno::Sequence<OUString> UnoListBoxControl::getSupportedServiceNames() void UnoListBoxControl::dispose() throw(uno::RuntimeException, std::exception) { lang::EventObject aEvt; - aEvt.Source = (::cppu::OWeakObject*)this; + aEvt.Source = static_cast<cppu::OWeakObject*>(this); maActionListeners.disposeAndClear( aEvt ); maItemListeners.disposeAndClear( aEvt ); UnoControl::dispose(); @@ -3270,7 +3270,7 @@ OUString UnoComboBoxControl::GetComponentServiceName() void UnoComboBoxControl::dispose() throw(uno::RuntimeException, std::exception) { lang::EventObject aEvt; - aEvt.Source = (::cppu::OWeakObject*)this; + aEvt.Source = static_cast<cppu::OWeakObject*>(this); maActionListeners.disposeAndClear( aEvt ); maItemListeners.disposeAndClear( aEvt ); UnoControl::dispose(); diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx index 53cf47473005..273a6cf577b1 100644 --- a/toolkit/source/helper/vclunohelper.cxx +++ b/toolkit/source/helper/vclunohelper.cxx @@ -193,7 +193,7 @@ Polygon VCLUnoHelper::CreatePolygon( const ::com::sun::star::uno::Sequence< sal_ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > x = pContainer; UnoControlModel* pContainerModel = new UnoControlContainerModel( ::comphelper::getProcessComponentContext() ); - pContainer->setModel( (::com::sun::star::awt::XControlModel*)pContainerModel ); + pContainer->setModel( static_cast<com::sun::star::awt::XControlModel*>(pContainerModel) ); return x; } |