diff options
Diffstat (limited to 'basctl/source/basicide/basides1.cxx')
-rw-r--r-- | basctl/source/basicide/basides1.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index c6374bf8e43d..c9aaa23447c7 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -126,7 +126,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) break; if (it != aWindowTable.end()) ++it; - BaseWindow* pWin = it != aWindowTable.end() ? it->second : 0; + BaseWindow* pWin = it != aWindowTable.end() ? it->second.get() : 0; bool bSearchedFromStart = false; while ( !nFound && !bCanceled && ( pWin || !bSearchedFromStart ) ) @@ -166,7 +166,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) { if ( it != aWindowTable.end() ) ++it; - pWin = it != aWindowTable.end() ? it->second : 0; + pWin = it != aWindowTable.end() ? it->second.get() : 0; } else pWin = 0; @@ -202,7 +202,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) case SID_BASICSTOP: { // maybe do not simply stop if on breakpoint! - if (ModulWindow* pMCurWin = dynamic_cast<ModulWindow*>(pCurWin)) + if (ModulWindow* pMCurWin = dynamic_cast<ModulWindow*>(pCurWin.get())) pMCurWin->BasicStop(); StopBasic(); } @@ -769,7 +769,7 @@ void Shell::GetState(SfxItemSet &rSet) case SID_BASICSAVEAS: case SID_BASICIDE_MATCHGROUP: { - if (!dynamic_cast<ModulWindow*>(pCurWin)) + if (!dynamic_cast<ModulWindow*>(pCurWin.get())) rSet.DisableItem( nWh ); else if ( ( nWh == SID_BASICLOAD ) && ( StarBASIC::IsRunning() || ( pCurWin && pCurWin->IsReadOnly() ) ) ) rSet.DisableItem( nWh ); @@ -782,7 +782,7 @@ void Shell::GetState(SfxItemSet &rSet) case SID_BASICIDE_TOGGLEBRKPNT: case SID_BASICIDE_MANAGEBRKPNTS: { - if (ModulWindow* pMCurWin = dynamic_cast<ModulWindow*>(pCurWin)) + if (ModulWindow* pMCurWin = dynamic_cast<ModulWindow*>(pCurWin.get())) { if (StarBASIC::IsRunning() && !pMCurWin->GetBasicStatus().bIsInReschedule) rSet.DisableItem(nWh); @@ -793,7 +793,7 @@ void Shell::GetState(SfxItemSet &rSet) break; case SID_BASICCOMPILE: { - if (StarBASIC::IsRunning() || !dynamic_cast<ModulWindow*>(pCurWin)) + if (StarBASIC::IsRunning() || !dynamic_cast<ModulWindow*>(pCurWin.get())) rSet.DisableItem( nWh ); } break; @@ -814,7 +814,7 @@ void Shell::GetState(SfxItemSet &rSet) case SID_INSERT_FORM_HSCROLL: case SID_INSERT_FORM_SPIN: { - if (!dynamic_cast<DialogWindow*>(pCurWin)) + if (!dynamic_cast<DialogWindow*>(pCurWin.get())) rSet.DisableItem( nWh ); } break; @@ -945,7 +945,7 @@ void Shell::GetState(SfxItemSet &rSet) // if this is not a module window hide the // setting, doesn't make sense for example if the // dialog editor is open - if (pCurWin && !dynamic_cast<ModulWindow*>(pCurWin)) + if (pCurWin && !dynamic_cast<ModulWindow*>(pCurWin.get())) { rSet.DisableItem( nWh ); rSet.Put(SfxVisibilityItem(nWh, false)); @@ -968,7 +968,7 @@ bool Shell::HasUIFeature( sal_uInt32 nFeature ) if ( (nFeature & BASICIDE_UI_FEATURE_SHOW_BROWSER) == BASICIDE_UI_FEATURE_SHOW_BROWSER ) { // fade out (in) property browser in module (dialog) windows - if (dynamic_cast<DialogWindow*>(pCurWin) && !pCurWin->IsReadOnly()) + if (dynamic_cast<DialogWindow*>(pCurWin.get()) && !pCurWin->IsReadOnly()) bResult = true; } @@ -1035,7 +1035,7 @@ void Shell::SetCurWindow( BaseWindow* pNewWin, bool bUpdateTabBar, bool bRemembe aObjectCatalog->SetCurrentEntry(pCurWin); SetUndoManager( pCurWin ? pCurWin->GetUndoManager() : 0 ); InvalidateBasicIDESlots(); - EnableScrollbars(pCurWin != 0); + EnableScrollbars(pCurWin != nullptr); if ( m_pCurLocalizationMgr ) m_pCurLocalizationMgr->handleTranslationbar(); @@ -1067,7 +1067,7 @@ void Shell::ManageToolbars() if ( xLayoutManager.is() ) { xLayoutManager->lock(); - if (dynamic_cast<DialogWindow*>(pCurWin)) + if (dynamic_cast<DialogWindow*>(pCurWin.get())) { xLayoutManager->destroyElement( aMacroBarResName ); @@ -1213,7 +1213,7 @@ void Shell::AdjustPosSizePixel( const Point &rPos, const Size &rSize ) } if (pLayout) - pLayout->SetPosSizePixel(rPos, dynamic_cast<DialogWindow*>(pCurWin) ? aSz : aOutSz); + pLayout->SetPosSizePixel(rPos, dynamic_cast<DialogWindow*>(pCurWin.get()) ? aSz : aOutSz); } Reference< XModel > Shell::GetCurrentDocument() const @@ -1230,7 +1230,7 @@ void Shell::Activate( bool bMDI ) if ( bMDI ) { - if (DialogWindow* pDCurWin = dynamic_cast<DialogWindow*>(pCurWin)) + if (DialogWindow* pDCurWin = dynamic_cast<DialogWindow*>(pCurWin.get())) pDCurWin->UpdateBrowser(); } } @@ -1241,7 +1241,7 @@ void Shell::Deactivate( bool bMDI ) // deactivate due to a MessageBox bMDI is false if ( bMDI ) { - if (DialogWindow* pXDlgWin = dynamic_cast<DialogWindow*>(pCurWin)) + if (DialogWindow* pXDlgWin = dynamic_cast<DialogWindow*>(pCurWin.get())) { pXDlgWin->DisableBrowser(); if( pXDlgWin->IsModified() ) |