diff options
Diffstat (limited to 'sfx2/source/view')
-rw-r--r-- | sfx2/source/view/frame.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/view/frame2.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/sfxbasecontroller.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 16 | ||||
-rw-r--r-- | sfx2/source/view/viewprn.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 2 |
6 files changed, 14 insertions, 14 deletions
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index 2fd824cc147e..054abf843993 100644 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -544,8 +544,8 @@ SfxFrameItem::SfxFrameItem( SfxFrame *p ): bool SfxFrameItem::operator==( const SfxPoolItem &rItem ) const { - return ((SfxFrameItem&)rItem).pFrame == pFrame && - ((SfxFrameItem&)rItem).wFrame == wFrame; + return static_cast<const SfxFrameItem&>(rItem).pFrame == pFrame && + static_cast<const SfxFrameItem&>(rItem).wFrame == wFrame; } diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx index 4a9cb220a4f1..5701c33ed695 100644 --- a/sfx2/source/view/frame2.cxx +++ b/sfx2/source/view/frame2.cxx @@ -349,7 +349,7 @@ SystemWindow* SfxFrame::GetSystemWindow() const SystemWindow* SfxFrame::GetTopWindow_Impl() const { if ( pImp->pExternalContainerWindow->IsSystemWindow() ) - return (SystemWindow*) pImp->pExternalContainerWindow; + return static_cast<SystemWindow*>( pImp->pExternalContainerWindow ); else return NULL; } diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index f62610a79ee0..0d08a0d5ea30 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -951,7 +951,7 @@ void SfxBaseController::BorderWidthsChanged_Impl() { try { - ((frame::XBorderResizeListener*)pIterator.next())->borderWidthsChanged( xThis, aBWidths ); + static_cast<frame::XBorderResizeListener*>(pIterator.next())->borderWidthsChanged( xThis, aBWidths ); } catch (const RuntimeException&) { diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index e4e44d166bde..0dac4a7f7d0c 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -251,7 +251,7 @@ void SfxViewNotificatedFrameList_Impl::Notify( SfxBroadcaster& rBC, const SfxHin switch( pSimpleHint->GetId() ) { case SFX_HINT_DYING: - SfxViewFrame* pFrame = (SfxViewFrame*) &rBC; + SfxViewFrame* pFrame = dynamic_cast<SfxViewFrame*>(&rBC); if( pFrame ) { iterator it = std::find( begin(), end(), pFrame ); @@ -964,7 +964,7 @@ void SfxViewFrame::ExecHistory_Impl( SfxRequest &rReq ) // The SW has its own undo in the View const SfxPoolItem *pRet = GetViewShell()->ExecuteSlot( rReq ); if ( pRet ) - bOK = ((SfxBoolItem*)pRet)->GetValue(); + bOK = static_cast<const SfxBoolItem*>(pRet)->GetValue(); } rReq.SetReturnValue( SfxBoolItem( rReq.GetSlot(), bOK ) ); @@ -2608,7 +2608,7 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const OUString& sMacro ) const SfxPoolItem* pRet = SfxGetpApp()->ExecuteSlot( aReq ); OUString aScriptURL; if ( pRet ) - aScriptURL = ((SfxStringItem*)pRet)->GetValue(); + aScriptURL = static_cast<const SfxStringItem*>(pRet)->GetValue(); if ( !aScriptURL.isEmpty() ) { // parse scriptURL @@ -2658,7 +2658,7 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const OUString& sMacro ) SbModule* pModule = pBasic->FindModule( aModuleName ); if ( pModule ) { - SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD ); + SbMethod* pMethod = static_cast<SbMethod*>(pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD )); aOUSource = pModule->GetSource32(); sal_uInt16 nStart, nEnd; pMethod->GetLineRange( nStart, nEnd ); @@ -2898,7 +2898,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq ) SfxViewFrame *pTop = GetTopViewFrame(); if ( pTop ) { - WorkWindow* pWork = (WorkWindow*) pTop->GetFrame().GetTopWindow_Impl(); + WorkWindow* pWork = static_cast<WorkWindow*>( pTop->GetFrame().GetTopWindow_Impl() ); if ( pWork ) { com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xFrame( @@ -3049,7 +3049,7 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet) SfxViewFrame* pTop = GetTopViewFrame(); if ( pTop ) { - WorkWindow* pWork = (WorkWindow*) pTop->GetFrame().GetTopWindow_Impl(); + WorkWindow* pWork = static_cast<WorkWindow*>( pTop->GetFrame().GetTopWindow_Impl() ); if ( pWork ) { rSet.Put( SfxBoolItem( nWhich, pWork->IsFullScreenMode() ) ); @@ -3358,7 +3358,7 @@ void SfxViewFrame::AppendInfoBar( const OUString& sId, const OUString& sMessage, SfxChildWindow* pChild = GetChildWindow( nId ); if ( pChild ) { - SfxInfoBarContainerWindow* pInfoBars = ( SfxInfoBarContainerWindow* )pChild->GetWindow(); + SfxInfoBarContainerWindow* pInfoBars = static_cast<SfxInfoBarContainerWindow*>( pChild->GetWindow() ); pInfoBars->appendInfoBar( sId, sMessage, aButtons ); ShowChildWindow( nId ); } @@ -3382,7 +3382,7 @@ void SfxViewFrame::RemoveInfoBar( const OUString& sId ) SfxChildWindow* pChild = GetChildWindow( nId ); if ( pChild ) { - SfxInfoBarContainerWindow* pInfoBars = ( SfxInfoBarContainerWindow* )pChild->GetWindow(); + SfxInfoBarContainerWindow* pInfoBars = static_cast<SfxInfoBarContainerWindow*>( pChild->GetWindow() ); SfxInfoBarWindow* pInfoBar = pInfoBars->getInfoBar( sId ); pInfoBars->removeInfoBar( pInfoBar ); ShowChildWindow( nId ); diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 9ae83cda38a0..5dbdc3b0ffc4 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -445,7 +445,7 @@ IMPL_LINK_NOARG(SfxDialogExecutor_Impl, Execute) { DBG_ASSERT( _pSetupParent, "no dialog parent" ); if( _pSetupParent ) - _pOptions = ( (SfxPrinter*)_pSetupParent->GetPrinter() )->GetOptions().Clone(); + _pOptions = static_cast<SfxPrinter*>( _pSetupParent->GetPrinter() )->GetOptions().Clone(); } assert(_pOptions); diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 6151d72da919..35b947e5ee81 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1980,7 +1980,7 @@ bool SfxViewShell::TryContextMenuInterception( Menu& rIn, const OUString& rMenuI try { ui::ContextMenuInterceptorAction eAction = - ((ui::XContextMenuInterceptor*)aIt.next())->notifyContextMenuExecute( aEvent ); + static_cast<ui::XContextMenuInterceptor*>(aIt.next())->notifyContextMenuExecute( aEvent ); switch ( eAction ) { case ui::ContextMenuInterceptorAction_CANCELLED : |