const_cast: convert some C-style casts and remove some redundant ones

Change-Id: I43f7a4c372502214c6f36413077d686921dba73b
This commit is contained in:
Stephan Bergmann 2015-03-26 15:27:26 +01:00
parent 69c2825708
commit 21997319a3

View File

@ -275,7 +275,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
{
DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
const SfxMacroInfoItem& rInfo = static_cast<const SfxMacroInfoItem&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_MACROINFO ));
BasicManager* pBasMgr = (BasicManager*)rInfo.GetBasicManager();
BasicManager* pBasMgr = const_cast<BasicManager*>(rInfo.GetBasicManager());
DBG_ASSERT( pBasMgr, "Nichts selektiert im Basic-Baum ?" );
ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) );
@ -394,7 +394,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
{
DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
const SfxMacroInfoItem& rInfo = static_cast<const SfxMacroInfoItem&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_MACROINFO ));
BasicManager* pBasMgr = (BasicManager*)rInfo.GetBasicManager();
BasicManager* pBasMgr = const_cast<BasicManager*>(rInfo.GetBasicManager());
DBG_ASSERT( pBasMgr, "Store source: Kein BasMgr?" );
ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) );
ModulWindow* pWin = FindBasWin( aDocument, rInfo.GetLib(), rInfo.GetModule(), false, true );