summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/basides1.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basctl/source/basicide/basides1.cxx')
-rw-r--r--basctl/source/basicide/basides1.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 59c3006377ab..3f8f34c48624 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -320,7 +320,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
SfxViewFrame* pViewFrame = GetViewFrame();
if ( pViewFrame )
pViewFrame->ToTop();
- ModulWindow* pWin = FindBasWin( aDocument, aLibName, rInfo.GetModule(), true );
+ VclPtr<ModulWindow> pWin = FindBasWin( aDocument, aLibName, rInfo.GetModule(), true );
DBG_ASSERT( pWin, "Edit/Create Macro: Fenster wurde nicht erzeugt/gefunden!" );
SetCurWindow( pWin, true );
pWin->EditMacro( rInfo.GetMethod() );
@@ -344,13 +344,13 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
const SfxStringItem &rModName = static_cast<const SfxStringItem&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_MODULENAME ));
if ( aWindowTable.find( rTabId.GetValue() ) != aWindowTable.end() )
{
- BaseWindow* pWin = aWindowTable[ rTabId.GetValue() ];
+ VclPtr<BaseWindow> pWin = aWindowTable[ rTabId.GetValue() ];
const OUString& aNewName( rModName.GetValue() );
OUString aOldName( pWin->GetName() );
if ( aNewName != aOldName )
{
bool bRenameOk = false;
- if (ModulWindow* pModWin = dynamic_cast<ModulWindow*>(pWin))
+ if (ModulWindow* pModWin = dynamic_cast<ModulWindow*>(pWin.get()))
{
OUString aLibName = pModWin->GetLibName();
ScriptDocument aDocument( pWin->GetDocument() );
@@ -365,7 +365,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
}
}
- else if (DialogWindow* pDlgWin = dynamic_cast<DialogWindow*>(pWin))
+ else if (DialogWindow* pDlgWin = dynamic_cast<DialogWindow*>(pWin.get()))
{
bRenameOk = pDlgWin->RenameDialog( aNewName );
}
@@ -396,7 +396,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
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 );
+ VclPtr<ModulWindow> pWin = FindBasWin( aDocument, rInfo.GetLib(), rInfo.GetModule(), false, true );
if ( pWin )
{
if ( rReq.GetSlot() == SID_BASICIDE_STOREMODULESOURCE )
@@ -522,7 +522,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
const SbxItem& rSbxItem = static_cast<const SbxItem&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX ));
const ScriptDocument& aDocument( rSbxItem.GetDocument() );
- BaseWindow* pWin = FindWindow( aDocument, rSbxItem.GetLibName(), rSbxItem.GetName(), rSbxItem.GetType(), true );
+ VclPtr<BaseWindow> pWin = FindWindow( aDocument, rSbxItem.GetLibName(), rSbxItem.GetName(), rSbxItem.GetType(), true );
if ( pWin )
RemoveWindow( pWin, true );
}
@@ -1103,7 +1103,7 @@ VclPtr<BaseWindow> Shell::FindWindow(
bool Shell::CallBasicErrorHdl( StarBASIC* pBasic )
{
bool bRet = false;
- ModulWindow* pModWin = ShowActiveModuleWindow( pBasic );
+ VclPtr<ModulWindow> pModWin = ShowActiveModuleWindow( pBasic );
if ( pModWin )
bRet = pModWin->BasicErrorHdl( pBasic );
return bRet;
@@ -1112,7 +1112,7 @@ bool Shell::CallBasicErrorHdl( StarBASIC* pBasic )
long Shell::CallBasicBreakHdl( StarBASIC* pBasic )
{
long nRet = 0;
- ModulWindow* pModWin = ShowActiveModuleWindow( pBasic );
+ VclPtr<ModulWindow> pModWin = ShowActiveModuleWindow( pBasic );
if ( pModWin )
{
bool bAppWindowDisabled, bDispatcherLocked;