summaryrefslogtreecommitdiffstats
path: root/basctl/source/basicide/bastypes.cxx
diff options
context:
space:
mode:
authorUray M. János <uray.janos@gmail.com>2012-08-07 14:33:56 +0200
committerTor Lillqvist <tlillqvist@suse.com>2012-08-07 16:00:14 +0300
commit51bb488ac1b3e0c18947d6c68be6b577106f27d9 (patch)
tree3b139929d7319f4a32f6116850e0a2dac4a48538 /basctl/source/basicide/bastypes.cxx
parentRemove forwards of non-existing structs (diff)
downloadcore-51bb488ac1b3e0c18947d6c68be6b577106f27d9.tar.gz
core-51bb488ac1b3e0c18947d6c68be6b577106f27d9.zip
IDE: PTR_CAST, ISA to dynamic_cast
Convert the obsolete PTR_CAST and ISA macros (from tools/rtti.hxx) to C++ dynamic_cast is basctl. Change-Id: I45530d1d34d132904f812e238ee3b59b1a4f227b
Diffstat (limited to 'basctl/source/basicide/bastypes.cxx')
-rw-r--r--basctl/source/basicide/bastypes.cxx20
1 files changed, 9 insertions, 11 deletions
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 7ca8c569b62b..ded9595bebb1 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -444,15 +444,13 @@ void BasicIDETabBar::Command( const CommandEvent& rCEvt )
if ( aDocument.isInVBAMode() )
{
// disable to delete or remove object modules in IDE
- BasicManager* pBasMgr = aDocument.getBasicManager();
- if ( pBasMgr )
+ if (BasicManager* pBasMgr = aDocument.getBasicManager())
{
- StarBASIC* pBasic = pBasMgr->GetLib( aOULibName );
- if( pBasic )
+ if (StarBASIC* pBasic = pBasMgr->GetLib(aOULibName))
{
IDEWindowTable& aIDEWindowTable = pIDEShell->GetIDEWindowTable();
IDEWindowTable::const_iterator it = aIDEWindowTable.find( GetCurPageId() );
- if( it != aIDEWindowTable.end() && it->second->ISA( ModulWindow ) )
+ if (it != aIDEWindowTable.end() && dynamic_cast<ModulWindow*>(it->second))
{
SbModule* pActiveModule = (SbModule*)pBasic->FindModule( it->second->GetName() );
if( pActiveModule && ( pActiveModule->GetModuleType() == script::ModuleType::DOCUMENT ) )
@@ -467,10 +465,10 @@ void BasicIDETabBar::Command( const CommandEvent& rCEvt )
}
- SfxViewFrame* pViewFrame = pIDEShell ? pIDEShell->GetViewFrame() : NULL;
- SfxDispatcher* pDispatcher = pViewFrame ? pViewFrame->GetDispatcher() : NULL;
- if ( pDispatcher )
- pDispatcher->Execute( aPopup.Execute( this, aPos ) );
+ if (pIDEShell)
+ if (SfxViewFrame* pViewFrame = pIDEShell->GetViewFrame())
+ if (SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher())
+ pDispatcher->Execute(aPopup.Execute(this, aPos));
}
}
@@ -523,11 +521,11 @@ void BasicIDETabBar::Sort()
aTabBarSortHelper.aPageText = GetPageText( nId );
IDEBaseWindow* pWin = aIDEWindowTable[ nId ];
- if ( pWin->IsA( TYPE( ModulWindow ) ) )
+ if (dynamic_cast<ModulWindow*>(pWin))
{
aModuleList.push_back( aTabBarSortHelper );
}
- else if ( pWin->IsA( TYPE( DialogWindow ) ) )
+ else if (dynamic_cast<DialogWindow*>(pWin))
{
aDialogList.push_back( aTabBarSortHelper );
}