sal_Bool -> bool
Change-Id: I97618ffb138f292665edb634a29c39ab5a332ab1
This commit is contained in:
@@ -266,7 +266,7 @@ String EditorWindow::GetWordAtCursor()
|
|||||||
|
|
||||||
void EditorWindow::RequestHelp( const HelpEvent& rHEvt )
|
void EditorWindow::RequestHelp( const HelpEvent& rHEvt )
|
||||||
{
|
{
|
||||||
sal_Bool bDone = sal_False;
|
bool bDone = false;
|
||||||
|
|
||||||
// Should have been activated at some point
|
// Should have been activated at some point
|
||||||
if ( pEditEngine )
|
if ( pEditEngine )
|
||||||
@@ -275,7 +275,7 @@ void EditorWindow::RequestHelp( const HelpEvent& rHEvt )
|
|||||||
{
|
{
|
||||||
String aKeyword = GetWordAtCursor();
|
String aKeyword = GetWordAtCursor();
|
||||||
Application::GetHelp()->SearchKeyword( aKeyword );
|
Application::GetHelp()->SearchKeyword( aKeyword );
|
||||||
bDone = sal_True;
|
bDone = true;
|
||||||
}
|
}
|
||||||
else if ( rHEvt.GetMode() & HELPMODE_QUICK )
|
else if ( rHEvt.GetMode() & HELPMODE_QUICK )
|
||||||
{
|
{
|
||||||
@@ -325,7 +325,7 @@ void EditorWindow::RequestHelp( const HelpEvent& rHEvt )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Help::ShowQuickHelp( this, Rectangle( aTopLeft, Size( 1, 1 ) ), aHelpText, QUICKHELP_TOP|QUICKHELP_LEFT);
|
Help::ShowQuickHelp( this, Rectangle( aTopLeft, Size( 1, 1 ) ), aHelpText, QUICKHELP_TOP|QUICKHELP_LEFT);
|
||||||
bDone = sal_True;
|
bDone = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1954,7 +1954,7 @@ sal_Bool WatchTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString
|
|||||||
if( cFirst == '\"' && cLast == '\"' )
|
if( cFirst == '\"' && cLast == '\"' )
|
||||||
aResult = aResult.Copy( 1, nResultLen - 2 );
|
aResult = aResult.Copy( 1, nResultLen - 2 );
|
||||||
|
|
||||||
sal_Bool bResModified = ( aResult != aEditingRes ) ? sal_True : sal_False;
|
bool bResModified = ( aResult != aEditingRes );
|
||||||
sal_Bool bRet = sal_False;
|
sal_Bool bRet = sal_False;
|
||||||
|
|
||||||
if ( bResModified )
|
if ( bResModified )
|
||||||
|
@@ -1199,7 +1199,7 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri
|
|||||||
{
|
{
|
||||||
if ( BasicIDE::RemoveDialog( rDocument, aLibName, aNewDlgName ) )
|
if ( BasicIDE::RemoveDialog( rDocument, aLibName, aNewDlgName ) )
|
||||||
{
|
{
|
||||||
IDEBaseWindow* pDlgWin = pIDEShell->FindDlgWin( rDocument, aLibName, aNewDlgName, sal_False, sal_True );
|
IDEBaseWindow* pDlgWin = pIDEShell->FindDlgWin( rDocument, aLibName, aNewDlgName, false, true );
|
||||||
if( pDlgWin != NULL )
|
if( pDlgWin != NULL )
|
||||||
pIDEShell->RemoveWindow( pDlgWin, sal_True );
|
pIDEShell->RemoveWindow( pDlgWin, sal_True );
|
||||||
BasicIDE::MarkDocumentModified( rDocument );
|
BasicIDE::MarkDocumentModified( rDocument );
|
||||||
@@ -1244,7 +1244,7 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri
|
|||||||
if( bSuccess )
|
if( bSuccess )
|
||||||
{
|
{
|
||||||
DialogWindow* pNewDlgWin = pIDEShell->CreateDlgWin( rDocument, aLibName, aNewDlgName );
|
DialogWindow* pNewDlgWin = pIDEShell->CreateDlgWin( rDocument, aLibName, aNewDlgName );
|
||||||
pIDEShell->SetCurWindow( pNewDlgWin, sal_True );
|
pIDEShell->SetCurWindow( pNewDlgWin, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
bDone = true;
|
bDone = true;
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||||
/*
|
/*
|
||||||
* This file is part of the LibreOffice project.
|
* This file is part of the LibreOffice project.
|
||||||
@@ -148,7 +149,7 @@ void BasicIDEShell::ExecuteCurrent( SfxRequest& rReq )
|
|||||||
// memorize item because of the adjustments...
|
// memorize item because of the adjustments...
|
||||||
BasicIDEGlobals::GetExtraData()->SetSearchItem( (const SvxSearchItem&)rItem );
|
BasicIDEGlobals::GetExtraData()->SetSearchItem( (const SvxSearchItem&)rItem );
|
||||||
sal_Int32 nFound = 0;
|
sal_Int32 nFound = 0;
|
||||||
sal_Bool bCanceled = sal_False;
|
bool bCanceled = false;
|
||||||
if ( ((const SvxSearchItem&)rItem).GetCommand() == SVX_SEARCHCMD_REPLACE_ALL )
|
if ( ((const SvxSearchItem&)rItem).GetCommand() == SVX_SEARCHCMD_REPLACE_ALL )
|
||||||
{
|
{
|
||||||
sal_uInt16 nActModWindows = 0;
|
sal_uInt16 nActModWindows = 0;
|
||||||
@@ -181,7 +182,7 @@ void BasicIDEShell::ExecuteCurrent( SfxRequest& rReq )
|
|||||||
if ( !nFound && !((const SvxSearchItem&)rItem).GetSelection() )
|
if ( !nFound && !((const SvxSearchItem&)rItem).GetSelection() )
|
||||||
{
|
{
|
||||||
// search other modules...
|
// search other modules...
|
||||||
sal_Bool bChangeCurWindow = sal_False;
|
bool bChangeCurWindow = false;
|
||||||
for( it = aIDEWindowTable.begin(); it != aIDEWindowTable.end(); ++it )
|
for( it = aIDEWindowTable.begin(); it != aIDEWindowTable.end(); ++it )
|
||||||
if ( it->second == pCurWin)
|
if ( it->second == pCurWin)
|
||||||
break;
|
break;
|
||||||
@@ -191,7 +192,7 @@ void BasicIDEShell::ExecuteCurrent( SfxRequest& rReq )
|
|||||||
if ( it != aIDEWindowTable.end() )
|
if ( it != aIDEWindowTable.end() )
|
||||||
pWin = it->second;
|
pWin = it->second;
|
||||||
|
|
||||||
sal_Bool bSearchedFromStart = sal_False;
|
bool bSearchedFromStart = false;
|
||||||
while ( !nFound && !bCanceled && ( pWin || !bSearchedFromStart ) )
|
while ( !nFound && !bCanceled && ( pWin || !bSearchedFromStart ) )
|
||||||
{
|
{
|
||||||
if ( !pWin )
|
if ( !pWin )
|
||||||
@@ -205,10 +206,10 @@ void BasicIDEShell::ExecuteCurrent( SfxRequest& rReq )
|
|||||||
it = aIDEWindowTable.begin();
|
it = aIDEWindowTable.begin();
|
||||||
if ( it != aIDEWindowTable.end() )
|
if ( it != aIDEWindowTable.end() )
|
||||||
pWin = it->second;
|
pWin = it->second;
|
||||||
bSearchedFromStart = sal_True;
|
bSearchedFromStart = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
bCanceled = sal_True;
|
bCanceled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( pWin && !pWin->IsSuspended() && pWin->IsA( TYPE( ModulWindow ) ) )
|
if ( pWin && !pWin->IsSuspended() && pWin->IsA( TYPE( ModulWindow ) ) )
|
||||||
@@ -221,7 +222,7 @@ void BasicIDEShell::ExecuteCurrent( SfxRequest& rReq )
|
|||||||
}
|
}
|
||||||
if ( nFound )
|
if ( nFound )
|
||||||
{
|
{
|
||||||
bChangeCurWindow = sal_True;
|
bChangeCurWindow = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -240,7 +241,7 @@ void BasicIDEShell::ExecuteCurrent( SfxRequest& rReq )
|
|||||||
if ( !nFound && bSearchedFromStart )
|
if ( !nFound && bSearchedFromStart )
|
||||||
nFound = ((ModulWindow*)pCurWin)->StartSearchAndReplace( (const SvxSearchItem&)rItem, true );
|
nFound = ((ModulWindow*)pCurWin)->StartSearchAndReplace( (const SvxSearchItem&)rItem, true );
|
||||||
if ( bChangeCurWindow )
|
if ( bChangeCurWindow )
|
||||||
SetCurWindow( pWin, sal_True );
|
SetCurWindow( pWin, true );
|
||||||
}
|
}
|
||||||
if ( !nFound && !bCanceled )
|
if ( !nFound && !bCanceled )
|
||||||
InfoBox( pCurWin, String( IDEResId( RID_STR_SEARCHNOTFOUND ) ) ).Execute();
|
InfoBox( pCurWin, String( IDEResId( RID_STR_SEARCHNOTFOUND ) ) ).Execute();
|
||||||
@@ -433,9 +434,9 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
|
|||||||
SfxViewFrame* pViewFrame = GetViewFrame();
|
SfxViewFrame* pViewFrame = GetViewFrame();
|
||||||
if ( pViewFrame )
|
if ( pViewFrame )
|
||||||
pViewFrame->ToTop();
|
pViewFrame->ToTop();
|
||||||
ModulWindow* pWin = FindBasWin( aDocument, aLibName, rInfo.GetModule(), sal_True );
|
ModulWindow* pWin = FindBasWin( aDocument, aLibName, rInfo.GetModule(), true );
|
||||||
DBG_ASSERT( pWin, "Edit/Create Macro: Fenster wurde nicht erzeugt/gefunden!" );
|
DBG_ASSERT( pWin, "Edit/Create Macro: Fenster wurde nicht erzeugt/gefunden!" );
|
||||||
SetCurWindow( pWin, sal_True );
|
SetCurWindow( pWin, true );
|
||||||
pWin->EditMacro( rInfo.GetMethod() );
|
pWin->EditMacro( rInfo.GetMethod() );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -469,7 +470,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
|
|||||||
// Because we listen for container events for script
|
// Because we listen for container events for script
|
||||||
// modules, rename will delete the 'old' window
|
// modules, rename will delete the 'old' window
|
||||||
// pWin has been invalidated, restore now
|
// pWin has been invalidated, restore now
|
||||||
pWin = FindBasWin( aDocument, aLibName, aNewName, sal_True );
|
pWin = FindBasWin( aDocument, aLibName, aNewName, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -505,7 +506,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
|
|||||||
BasicManager* pBasMgr = (BasicManager*)rInfo.GetBasicManager();
|
BasicManager* pBasMgr = (BasicManager*)rInfo.GetBasicManager();
|
||||||
DBG_ASSERT( pBasMgr, "Store source: Kein BasMgr?" );
|
DBG_ASSERT( pBasMgr, "Store source: Kein BasMgr?" );
|
||||||
ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) );
|
ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) );
|
||||||
ModulWindow* pWin = FindBasWin( aDocument, rInfo.GetLib(), rInfo.GetModule(), sal_False, sal_True );
|
ModulWindow* pWin = FindBasWin( aDocument, rInfo.GetLib(), rInfo.GetModule(), false, true );
|
||||||
if ( pWin )
|
if ( pWin )
|
||||||
{
|
{
|
||||||
if ( rReq.GetSlot() == SID_BASICIDE_STOREMODULESOURCE )
|
if ( rReq.GetSlot() == SID_BASICIDE_STOREMODULESOURCE )
|
||||||
@@ -597,14 +598,14 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
|
|||||||
{
|
{
|
||||||
ModulWindow* pWin = CreateBasWin( m_aCurDocument, m_aCurLibName, String() );
|
ModulWindow* pWin = CreateBasWin( m_aCurDocument, m_aCurLibName, String() );
|
||||||
DBG_ASSERT( pWin, "New Module: Konnte Fenster nicht erzeugen!" );
|
DBG_ASSERT( pWin, "New Module: Konnte Fenster nicht erzeugen!" );
|
||||||
SetCurWindow( pWin, sal_True );
|
SetCurWindow( pWin, true );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SID_BASICIDE_NEWDIALOG:
|
case SID_BASICIDE_NEWDIALOG:
|
||||||
{
|
{
|
||||||
DialogWindow* pWin = CreateDlgWin( m_aCurDocument, m_aCurLibName, String() );
|
DialogWindow* pWin = CreateDlgWin( m_aCurDocument, m_aCurLibName, String() );
|
||||||
DBG_ASSERT( pWin, "New Module: Konnte Fenster nicht erzeugen!" );
|
DBG_ASSERT( pWin, "New Module: Konnte Fenster nicht erzeugen!" );
|
||||||
SetCurWindow( pWin, sal_True );
|
SetCurWindow( pWin, true );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SID_BASICIDE_SBXRENAMED:
|
case SID_BASICIDE_SBXRENAMED:
|
||||||
@@ -622,9 +623,9 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
|
|||||||
if ( m_aCurLibName.isEmpty() || ( aDocument == m_aCurDocument && aLibName == m_aCurLibName ) )
|
if ( m_aCurLibName.isEmpty() || ( aDocument == m_aCurDocument && aLibName == m_aCurLibName ) )
|
||||||
{
|
{
|
||||||
if ( rSbxItem.GetType() == BASICIDE_TYPE_MODULE )
|
if ( rSbxItem.GetType() == BASICIDE_TYPE_MODULE )
|
||||||
FindBasWin( aDocument, aLibName, aName, sal_True );
|
FindBasWin( aDocument, aLibName, aName, true );
|
||||||
else if ( rSbxItem.GetType() == BASICIDE_TYPE_DIALOG )
|
else if ( rSbxItem.GetType() == BASICIDE_TYPE_DIALOG )
|
||||||
FindDlgWin( aDocument, aLibName, aName, sal_True );
|
FindDlgWin( aDocument, aLibName, aName, true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -649,19 +650,19 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
|
|||||||
IDEBaseWindow* pWin = 0;
|
IDEBaseWindow* pWin = 0;
|
||||||
if ( rSbxItem.GetType() == BASICIDE_TYPE_DIALOG )
|
if ( rSbxItem.GetType() == BASICIDE_TYPE_DIALOG )
|
||||||
{
|
{
|
||||||
pWin = FindDlgWin( aDocument, aLibName, aName, sal_True );
|
pWin = FindDlgWin( aDocument, aLibName, aName, true );
|
||||||
}
|
}
|
||||||
else if ( rSbxItem.GetType() == BASICIDE_TYPE_MODULE )
|
else if ( rSbxItem.GetType() == BASICIDE_TYPE_MODULE )
|
||||||
{
|
{
|
||||||
pWin = FindBasWin( aDocument, aLibName, aName, sal_True );
|
pWin = FindBasWin( aDocument, aLibName, aName, true );
|
||||||
}
|
}
|
||||||
else if ( rSbxItem.GetType() == BASICIDE_TYPE_METHOD )
|
else if ( rSbxItem.GetType() == BASICIDE_TYPE_METHOD )
|
||||||
{
|
{
|
||||||
pWin = FindBasWin( aDocument, aLibName, aName, sal_True );
|
pWin = FindBasWin( aDocument, aLibName, aName, true );
|
||||||
((ModulWindow*)pWin)->EditMacro( rSbxItem.GetMethodName() );
|
((ModulWindow*)pWin)->EditMacro( rSbxItem.GetMethodName() );
|
||||||
}
|
}
|
||||||
DBG_ASSERT( pWin, "Fenster wurde nicht erzeugt!" );
|
DBG_ASSERT( pWin, "Fenster wurde nicht erzeugt!" );
|
||||||
SetCurWindow( pWin, sal_True );
|
SetCurWindow( pWin, true );
|
||||||
pTabBar->MakeVisible( pTabBar->GetCurPageId() );
|
pTabBar->MakeVisible( pTabBar->GetCurPageId() );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -714,13 +715,13 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
|
|||||||
|
|
||||||
IDEBaseWindow* pWin = 0;
|
IDEBaseWindow* pWin = 0;
|
||||||
if ( aType == aModType )
|
if ( aType == aModType )
|
||||||
pWin = FindBasWin( *pDocument, aLibName, aName, sal_False );
|
pWin = FindBasWin( *pDocument, aLibName, aName, false );
|
||||||
else if ( aType == aDlgType )
|
else if ( aType == aDlgType )
|
||||||
pWin = FindDlgWin( *pDocument, aLibName, aName, sal_False );
|
pWin = FindDlgWin( *pDocument, aLibName, aName, false );
|
||||||
|
|
||||||
if ( pWin )
|
if ( pWin )
|
||||||
{
|
{
|
||||||
SetCurWindow( pWin, sal_True );
|
SetCurWindow( pWin, true );
|
||||||
if ( pTabBar )
|
if ( pTabBar )
|
||||||
pTabBar->MakeVisible( pTabBar->GetCurPageId() );
|
pTabBar->MakeVisible( pTabBar->GetCurPageId() );
|
||||||
|
|
||||||
@@ -1110,7 +1111,7 @@ sal_Bool BasicIDEShell::HasUIFeature( sal_uInt32 nFeature )
|
|||||||
return bResult;
|
return bResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, sal_Bool bUpdateTabBar, sal_Bool bRememberAsCurrent )
|
void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, bool bUpdateTabBar, bool bRememberAsCurrent )
|
||||||
{
|
{
|
||||||
// an EditWindow must be set at Sfx for resizing...
|
// an EditWindow must be set at Sfx for resizing...
|
||||||
if ( !pNewWin && ( GetWindow() != pModulLayout ) )
|
if ( !pNewWin && ( GetWindow() != pModulLayout ) )
|
||||||
@@ -1306,7 +1307,7 @@ long BasicIDEShell::CallBasicBreakHdl( StarBASIC* pBasic )
|
|||||||
ModulWindow* pModWin = ShowActiveModuleWindow( pBasic );
|
ModulWindow* pModWin = ShowActiveModuleWindow( pBasic );
|
||||||
if ( pModWin )
|
if ( pModWin )
|
||||||
{
|
{
|
||||||
sal_Bool bAppWindowDisabled, bDispatcherLocked;
|
bool bAppWindowDisabled, bDispatcherLocked;
|
||||||
sal_uInt16 nWaitCount;
|
sal_uInt16 nWaitCount;
|
||||||
SfxUInt16Item *pSWActionCount, *pSWLockViewCount;
|
SfxUInt16Item *pSWActionCount, *pSWLockViewCount;
|
||||||
BasicIDE::BasicStopped( &bAppWindowDisabled, &bDispatcherLocked,
|
BasicIDE::BasicStopped( &bAppWindowDisabled, &bDispatcherLocked,
|
||||||
@@ -1353,10 +1354,10 @@ ModulWindow* BasicIDEShell::ShowActiveModuleWindow( StarBASIC* pBasic )
|
|||||||
{
|
{
|
||||||
ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) );
|
ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) );
|
||||||
::rtl::OUString aLibName = pLib->GetName();
|
::rtl::OUString aLibName = pLib->GetName();
|
||||||
pWin = FindBasWin( aDocument, aLibName, pActiveModule->GetName(), sal_True );
|
pWin = FindBasWin( aDocument, aLibName, pActiveModule->GetName(), true );
|
||||||
DBG_ASSERT( pWin, "Error/Step-Hdl: Fenster wurde nicht erzeugt/gefunden!" );
|
DBG_ASSERT( pWin, "Error/Step-Hdl: Fenster wurde nicht erzeugt/gefunden!" );
|
||||||
SetCurLib( aDocument, aLibName );
|
SetCurLib( aDocument, aLibName );
|
||||||
SetCurWindow( pWin, sal_True );
|
SetCurWindow( pWin, true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BasicManager* pBasicMgr = BasicIDE::FindBasicManager( pBasic );
|
BasicManager* pBasicMgr = BasicIDE::FindBasicManager( pBasic );
|
||||||
@@ -1452,7 +1453,7 @@ void BasicIDEShell::Deactivate( sal_Bool bMDI )
|
|||||||
{
|
{
|
||||||
if ( !m_aCurLibName.isEmpty() && ( pWin->IsDocument( m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName ) )
|
if ( !m_aCurLibName.isEmpty() && ( pWin->IsDocument( m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName ) )
|
||||||
SetCurLib( ScriptDocument::getApplicationScriptDocument(), ::rtl::OUString(), false );
|
SetCurLib( ScriptDocument::getApplicationScriptDocument(), ::rtl::OUString(), false );
|
||||||
SetCurWindow( pWin, sal_True );
|
SetCurWindow( pWin, true );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -192,7 +192,7 @@ ModulWindow* BasicIDEShell::CreateBasWin( const ScriptDocument& rDocument, const
|
|||||||
aModName = rDocument.createObjectName( E_SCRIPTS, aLibName );
|
aModName = rDocument.createObjectName( E_SCRIPTS, aLibName );
|
||||||
|
|
||||||
// maybe there's an suspended one?
|
// maybe there's an suspended one?
|
||||||
pWin = FindBasWin( rDocument, aLibName, aModName, sal_False, sal_True );
|
pWin = FindBasWin( rDocument, aLibName, aModName, false, true );
|
||||||
|
|
||||||
if ( !pWin )
|
if ( !pWin )
|
||||||
{
|
{
|
||||||
@@ -205,7 +205,7 @@ ModulWindow* BasicIDEShell::CreateBasWin( const ScriptDocument& rDocument, const
|
|||||||
|
|
||||||
if ( bSuccess )
|
if ( bSuccess )
|
||||||
{
|
{
|
||||||
pWin = FindBasWin( rDocument, aLibName, aModName, sal_False, sal_True );
|
pWin = FindBasWin( rDocument, aLibName, aModName, false, true );
|
||||||
if( !pWin )
|
if( !pWin )
|
||||||
{
|
{
|
||||||
// new module window
|
// new module window
|
||||||
@@ -242,13 +242,13 @@ ModulWindow* BasicIDEShell::CreateBasWin( const ScriptDocument& rDocument, const
|
|||||||
pTabBar->Sort();
|
pTabBar->Sort();
|
||||||
pWin->GrabScrollBars( &aHScrollBar, &aVScrollBar );
|
pWin->GrabScrollBars( &aHScrollBar, &aVScrollBar );
|
||||||
if ( !pCurWin )
|
if ( !pCurWin )
|
||||||
SetCurWindow( pWin, sal_False, sal_False );
|
SetCurWindow( pWin, false, false );
|
||||||
|
|
||||||
bCreatingWindow = sal_False;
|
bCreatingWindow = sal_False;
|
||||||
return pWin;
|
return pWin;
|
||||||
}
|
}
|
||||||
|
|
||||||
ModulWindow* BasicIDEShell::FindBasWin( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName, sal_Bool bCreateIfNotExist, sal_Bool bFindSuspended )
|
ModulWindow* BasicIDEShell::FindBasWin( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName, bool bCreateIfNotExist, bool bFindSuspended )
|
||||||
{
|
{
|
||||||
ModulWindow* pModWin = 0;
|
ModulWindow* pModWin = 0;
|
||||||
for( IDEWindowTable::const_iterator it = aIDEWindowTable.begin();
|
for( IDEWindowTable::const_iterator it = aIDEWindowTable.begin();
|
||||||
|
@@ -59,7 +59,7 @@ DialogWindow* BasicIDEShell::CreateDlgWin( const ScriptDocument& rDocument, cons
|
|||||||
aDlgName = rDocument.createObjectName( E_DIALOGS, aLibName );
|
aDlgName = rDocument.createObjectName( E_DIALOGS, aLibName );
|
||||||
|
|
||||||
// maybe there's a suspended one?
|
// maybe there's a suspended one?
|
||||||
pWin = FindDlgWin( rDocument, aLibName, aDlgName, sal_False, sal_True );
|
pWin = FindDlgWin( rDocument, aLibName, aDlgName, false, true );
|
||||||
|
|
||||||
if ( !pWin )
|
if ( !pWin )
|
||||||
{
|
{
|
||||||
@@ -108,14 +108,14 @@ DialogWindow* BasicIDEShell::CreateDlgWin( const ScriptDocument& rDocument, cons
|
|||||||
pTabBar->InsertPage( (sal_uInt16)nKey, aDlgName );
|
pTabBar->InsertPage( (sal_uInt16)nKey, aDlgName );
|
||||||
pTabBar->Sort();
|
pTabBar->Sort();
|
||||||
if ( !pCurWin )
|
if ( !pCurWin )
|
||||||
SetCurWindow( pWin, sal_False, sal_False );
|
SetCurWindow( pWin, false, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
bCreatingWindow = sal_False;
|
bCreatingWindow = sal_False;
|
||||||
return pWin;
|
return pWin;
|
||||||
}
|
}
|
||||||
|
|
||||||
DialogWindow* BasicIDEShell::FindDlgWin( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rDlgName, sal_Bool bCreateIfNotExist, sal_Bool bFindSuspended )
|
DialogWindow* BasicIDEShell::FindDlgWin( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rDlgName, bool bCreateIfNotExist, bool bFindSuspended )
|
||||||
{
|
{
|
||||||
DialogWindow* pDlgWin = 0;
|
DialogWindow* pDlgWin = 0;
|
||||||
for( IDEWindowTable::const_iterator it = aIDEWindowTable.begin(); it != aIDEWindowTable.end(); ++it )
|
for( IDEWindowTable::const_iterator it = aIDEWindowTable.begin(); it != aIDEWindowTable.end(); ++it )
|
||||||
|
@@ -109,7 +109,7 @@ public:
|
|||||||
{
|
{
|
||||||
rtl::OUString sModuleName;
|
rtl::OUString sModuleName;
|
||||||
if( mpShell && ( Event.Accessor >>= sModuleName ) )
|
if( mpShell && ( Event.Accessor >>= sModuleName ) )
|
||||||
mpShell->FindBasWin( mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, sal_True, sal_False );
|
mpShell->FindBasWin( mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, true, false );
|
||||||
}
|
}
|
||||||
virtual void SAL_CALL elementReplaced( const container::ContainerEvent& ) throw( com::sun::star::uno::RuntimeException ) { }
|
virtual void SAL_CALL elementReplaced( const container::ContainerEvent& ) throw( com::sun::star::uno::RuntimeException ) { }
|
||||||
virtual void SAL_CALL elementRemoved( const container::ContainerEvent& Event ) throw( com::sun::star::uno::RuntimeException )
|
virtual void SAL_CALL elementRemoved( const container::ContainerEvent& Event ) throw( com::sun::star::uno::RuntimeException )
|
||||||
@@ -337,7 +337,7 @@ void BasicIDEShell::onDocumentClosed( const ScriptDocument& _rDocument )
|
|||||||
if ( bSetCurLib )
|
if ( bSetCurLib )
|
||||||
SetCurLib( ScriptDocument::getApplicationScriptDocument(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard")), true, false );
|
SetCurLib( ScriptDocument::getApplicationScriptDocument(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard")), true, false );
|
||||||
else if ( bSetCurWindow )
|
else if ( bSetCurWindow )
|
||||||
SetCurWindow( FindApplicationWindow(), sal_True );
|
SetCurWindow( FindApplicationWindow(), true );
|
||||||
}
|
}
|
||||||
|
|
||||||
void BasicIDEShell::onDocumentTitleChanged( const ScriptDocument& /*_rDocument*/ )
|
void BasicIDEShell::onDocumentTitleChanged( const ScriptDocument& /*_rDocument*/ )
|
||||||
@@ -409,7 +409,7 @@ sal_uInt16 BasicIDEShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
|
|||||||
{
|
{
|
||||||
if ( !m_aCurLibName.isEmpty() && ( pWin->IsDocument( m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName ) )
|
if ( !m_aCurLibName.isEmpty() && ( pWin->IsDocument( m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName ) )
|
||||||
SetCurLib( ScriptDocument::getApplicationScriptDocument(), ::rtl::OUString(), false );
|
SetCurLib( ScriptDocument::getApplicationScriptDocument(), ::rtl::OUString(), false );
|
||||||
SetCurWindow( pWin, sal_True );
|
SetCurWindow( pWin, true );
|
||||||
bCanClose = sal_False;
|
bCanClose = sal_False;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -494,7 +494,7 @@ sal_Bool BasicIDEShell::NextPage( sal_Bool bPrev )
|
|||||||
if ( nPos < pTabBar->GetPageCount() )
|
if ( nPos < pTabBar->GetPageCount() )
|
||||||
{
|
{
|
||||||
IDEBaseWindow* pWin = aIDEWindowTable[ pTabBar->GetPageId( nPos ) ];
|
IDEBaseWindow* pWin = aIDEWindowTable[ pTabBar->GetPageId( nPos ) ];
|
||||||
SetCurWindow( pWin, sal_True );
|
SetCurWindow( pWin, true );
|
||||||
bRet = sal_True;
|
bRet = sal_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -654,7 +654,7 @@ void BasicIDEShell::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId&,
|
|||||||
|
|
||||||
void BasicIDEShell::CheckWindows()
|
void BasicIDEShell::CheckWindows()
|
||||||
{
|
{
|
||||||
sal_Bool bSetCurWindow = sal_False;
|
bool bSetCurWindow = false;
|
||||||
std::vector<IDEBaseWindow*> aDeleteVec;
|
std::vector<IDEBaseWindow*> aDeleteVec;
|
||||||
for( IDEWindowTable::const_iterator it = aIDEWindowTable.begin(); it != aIDEWindowTable.end(); ++it )
|
for( IDEWindowTable::const_iterator it = aIDEWindowTable.begin(); it != aIDEWindowTable.end(); ++it )
|
||||||
{
|
{
|
||||||
@@ -667,11 +667,11 @@ void BasicIDEShell::CheckWindows()
|
|||||||
IDEBaseWindow* pWin = *it;
|
IDEBaseWindow* pWin = *it;
|
||||||
pWin->StoreData();
|
pWin->StoreData();
|
||||||
if ( pWin == pCurWin )
|
if ( pWin == pCurWin )
|
||||||
bSetCurWindow = sal_True;
|
bSetCurWindow = true;
|
||||||
RemoveWindow( pWin, sal_True, sal_False );
|
RemoveWindow( pWin, sal_True, sal_False );
|
||||||
}
|
}
|
||||||
if ( bSetCurWindow )
|
if ( bSetCurWindow )
|
||||||
SetCurWindow( FindApplicationWindow(), sal_True );
|
SetCurWindow( FindApplicationWindow(), true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -695,7 +695,7 @@ void BasicIDEShell::RemoveWindows( const ScriptDocument& rDocument, const ::rtl:
|
|||||||
RemoveWindow( pWin, bDestroy, sal_False );
|
RemoveWindow( pWin, bDestroy, sal_False );
|
||||||
}
|
}
|
||||||
if ( bChangeCurWindow )
|
if ( bChangeCurWindow )
|
||||||
SetCurWindow( FindApplicationWindow(), sal_True );
|
SetCurWindow( FindApplicationWindow(), true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -788,7 +788,7 @@ void BasicIDEShell::UpdateWindows()
|
|||||||
for ( sal_Int32 j = 0 ; j < nModCount ; j++ )
|
for ( sal_Int32 j = 0 ; j < nModCount ; j++ )
|
||||||
{
|
{
|
||||||
::rtl::OUString aModName = pModNames[ j ];
|
::rtl::OUString aModName = pModNames[ j ];
|
||||||
ModulWindow* pWin = FindBasWin( *doc, aLibName, aModName, sal_False );
|
ModulWindow* pWin = FindBasWin( *doc, aLibName, aModName, false );
|
||||||
if ( !pWin )
|
if ( !pWin )
|
||||||
pWin = CreateBasWin( *doc, aLibName, aModName );
|
pWin = CreateBasWin( *doc, aLibName, aModName );
|
||||||
if ( !pNextActiveWindow && pLibInfoItem && pLibInfoItem->GetCurrentName() == aModName &&
|
if ( !pNextActiveWindow && pLibInfoItem && pLibInfoItem->GetCurrentName() == aModName &&
|
||||||
@@ -819,7 +819,7 @@ void BasicIDEShell::UpdateWindows()
|
|||||||
::rtl::OUString aDlgName = pDlgNames[ j ];
|
::rtl::OUString aDlgName = pDlgNames[ j ];
|
||||||
// this find only looks for non-suspended windows;
|
// this find only looks for non-suspended windows;
|
||||||
// suspended windows are handled in CreateDlgWin
|
// suspended windows are handled in CreateDlgWin
|
||||||
DialogWindow* pWin = FindDlgWin( *doc, aLibName, aDlgName, sal_False );
|
DialogWindow* pWin = FindDlgWin( *doc, aLibName, aDlgName, false );
|
||||||
if ( !pWin )
|
if ( !pWin )
|
||||||
pWin = CreateDlgWin( *doc, aLibName, aDlgName );
|
pWin = CreateDlgWin( *doc, aLibName, aDlgName );
|
||||||
if ( !pNextActiveWindow && pLibInfoItem && pLibInfoItem->GetCurrentName() == aDlgName &&
|
if ( !pNextActiveWindow && pLibInfoItem && pLibInfoItem->GetCurrentName() == aDlgName &&
|
||||||
@@ -843,7 +843,7 @@ void BasicIDEShell::UpdateWindows()
|
|||||||
{
|
{
|
||||||
if ( !pNextActiveWindow )
|
if ( !pNextActiveWindow )
|
||||||
pNextActiveWindow = FindApplicationWindow();
|
pNextActiveWindow = FindApplicationWindow();
|
||||||
SetCurWindow( pNextActiveWindow, sal_True );
|
SetCurWindow( pNextActiveWindow, true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -856,9 +856,9 @@ void BasicIDEShell::RemoveWindow( IDEBaseWindow* pWindow_, sal_Bool bDestroy, sa
|
|||||||
if ( pWindow_ == pCurWin )
|
if ( pWindow_ == pCurWin )
|
||||||
{
|
{
|
||||||
if ( bAllowChangeCurWindow )
|
if ( bAllowChangeCurWindow )
|
||||||
SetCurWindow( FindApplicationWindow(), sal_True );
|
SetCurWindow( FindApplicationWindow(), true );
|
||||||
else
|
else
|
||||||
SetCurWindow( NULL, sal_False );
|
SetCurWindow( NULL, false );
|
||||||
}
|
}
|
||||||
if ( bDestroy )
|
if ( bDestroy )
|
||||||
{
|
{
|
||||||
|
@@ -230,7 +230,7 @@ bool RemoveDialog( const ScriptDocument& rDocument, const ::rtl::OUString& rLibN
|
|||||||
BasicIDEShell* pIDEShell = BasicIDEGlobals::GetShell();
|
BasicIDEShell* pIDEShell = BasicIDEGlobals::GetShell();
|
||||||
if ( pIDEShell )
|
if ( pIDEShell )
|
||||||
{
|
{
|
||||||
DialogWindow* pDlgWin = pIDEShell->FindDlgWin( rDocument, rLibName, rDlgName, sal_False );
|
DialogWindow* pDlgWin = pIDEShell->FindDlgWin( rDocument, rLibName, rDlgName, false );
|
||||||
if( pDlgWin )
|
if( pDlgWin )
|
||||||
{
|
{
|
||||||
Reference< container::XNameContainer > xDialogModel = pDlgWin->GetDialog();
|
Reference< container::XNameContainer > xDialogModel = pDlgWin->GetDialog();
|
||||||
@@ -344,17 +344,17 @@ void StopBasic()
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
void BasicStopped( sal_Bool* pbAppWindowDisabled,
|
void BasicStopped( bool* pbAppWindowDisabled,
|
||||||
sal_Bool* pbDispatcherLocked, sal_uInt16* pnWaitCount,
|
bool* pbDispatcherLocked, sal_uInt16* pnWaitCount,
|
||||||
SfxUInt16Item** ppSWActionCount, SfxUInt16Item** ppSWLockViewCount )
|
SfxUInt16Item** ppSWActionCount, SfxUInt16Item** ppSWLockViewCount )
|
||||||
{
|
{
|
||||||
// maybe there are some locks to be removed after an error
|
// maybe there are some locks to be removed after an error
|
||||||
// or an explicit cancelling of the basic...
|
// or an explicit cancelling of the basic...
|
||||||
|
|
||||||
if ( pbAppWindowDisabled )
|
if ( pbAppWindowDisabled )
|
||||||
*pbAppWindowDisabled = sal_False;
|
*pbAppWindowDisabled = false;
|
||||||
if ( pbDispatcherLocked )
|
if ( pbDispatcherLocked )
|
||||||
*pbDispatcherLocked = sal_False;
|
*pbDispatcherLocked = false;
|
||||||
if ( pnWaitCount )
|
if ( pnWaitCount )
|
||||||
*pnWaitCount = 0;
|
*pnWaitCount = 0;
|
||||||
if ( ppSWActionCount )
|
if ( ppSWActionCount )
|
||||||
@@ -381,7 +381,7 @@ void BasicStopped( sal_Bool* pbAppWindowDisabled,
|
|||||||
{
|
{
|
||||||
pDefParent->Enable( sal_True );
|
pDefParent->Enable( sal_True );
|
||||||
if ( pbAppWindowDisabled )
|
if ( pbAppWindowDisabled )
|
||||||
*pbAppWindowDisabled = sal_True;
|
*pbAppWindowDisabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -134,7 +134,7 @@ void LocalizationMgr::implEnableDisableResourceForAllLibraryDialogs( HandleResou
|
|||||||
for( sal_Int32 i = 0 ; i < nDlgCount ; i++ )
|
for( sal_Int32 i = 0 ; i < nDlgCount ; i++ )
|
||||||
{
|
{
|
||||||
String aDlgName = pDlgNames[ i ];
|
String aDlgName = pDlgNames[ i ];
|
||||||
DialogWindow* pWin = m_pIDEShell->FindDlgWin( m_aDocument, m_aLibName, aDlgName, sal_False );
|
DialogWindow* pWin = m_pIDEShell->FindDlgWin( m_aDocument, m_aLibName, aDlgName, false );
|
||||||
if( pWin && pWin->IsA( TYPE( DialogWindow ) ) )
|
if( pWin && pWin->IsA( TYPE( DialogWindow ) ) )
|
||||||
{
|
{
|
||||||
DialogWindow* pDialogWin = static_cast< DialogWindow* >( pWin );
|
DialogWindow* pDialogWin = static_cast< DialogWindow* >( pWin );
|
||||||
|
@@ -120,7 +120,7 @@ protected:
|
|||||||
sal_uInt16 InsertWindowInTable( IDEBaseWindow* pNewWin );
|
sal_uInt16 InsertWindowInTable( IDEBaseWindow* pNewWin );
|
||||||
virtual sal_uInt16 PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing );
|
virtual sal_uInt16 PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing );
|
||||||
|
|
||||||
void SetCurWindow( IDEBaseWindow* pNewWin, sal_Bool bUpdateTabBar = sal_False, sal_Bool bRememberAsCurrent = sal_True );
|
void SetCurWindow( IDEBaseWindow* pNewWin, bool bUpdateTabBar = false, bool bRememberAsCurrent = true );
|
||||||
void ManageToolbars();
|
void ManageToolbars();
|
||||||
void RemoveWindow( IDEBaseWindow* pWindow, sal_Bool bDestroy, sal_Bool bAllowChangeCurWindow = sal_True );
|
void RemoveWindow( IDEBaseWindow* pWindow, sal_Bool bDestroy, sal_Bool bAllowChangeCurWindow = sal_True );
|
||||||
void ArrangeTabBar();
|
void ArrangeTabBar();
|
||||||
@@ -128,7 +128,7 @@ protected:
|
|||||||
ModulWindow* CreateBasWin( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName );
|
ModulWindow* CreateBasWin( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName );
|
||||||
DialogWindow* CreateDlgWin( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rDlgName );
|
DialogWindow* CreateDlgWin( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rDlgName );
|
||||||
|
|
||||||
ModulWindow* FindBasWin( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName, sal_Bool bCreateIfNotExist, sal_Bool bFindSuspended = sal_False );
|
ModulWindow* FindBasWin( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName, bool bCreateIfNotExist, bool bFindSuspended = false );
|
||||||
ModulWindow* ShowActiveModuleWindow( StarBASIC* pBasic );
|
ModulWindow* ShowActiveModuleWindow( StarBASIC* pBasic );
|
||||||
|
|
||||||
virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
|
virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
|
||||||
@@ -204,7 +204,7 @@ public:
|
|||||||
ModulWindowLayout* GetLayoutWindow() const { return pModulLayout; }
|
ModulWindowLayout* GetLayoutWindow() const { return pModulLayout; }
|
||||||
|
|
||||||
IDEBaseWindow* FindWindow( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName = ::rtl::OUString(), const ::rtl::OUString& rName = ::rtl::OUString(), BasicIDEType nType = BASICIDE_TYPE_UNKNOWN, sal_Bool bFindSuspended = sal_False );
|
IDEBaseWindow* FindWindow( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName = ::rtl::OUString(), const ::rtl::OUString& rName = ::rtl::OUString(), BasicIDEType nType = BASICIDE_TYPE_UNKNOWN, sal_Bool bFindSuspended = sal_False );
|
||||||
DialogWindow* FindDlgWin( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rDlgName, sal_Bool bCreateIfNotExist, sal_Bool bFindSuspended = sal_False );
|
DialogWindow* FindDlgWin( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rDlgName, bool bCreateIfNotExist, bool bFindSuspended = false );
|
||||||
IDEBaseWindow* FindApplicationWindow();
|
IDEBaseWindow* FindApplicationWindow();
|
||||||
sal_Bool NextPage( sal_Bool bPrev = sal_False );
|
sal_Bool NextPage( sal_Bool bPrev = sal_False );
|
||||||
|
|
||||||
|
@@ -43,7 +43,7 @@ namespace BasicIDE
|
|||||||
StarBASIC* FindBasic( const SbxVariable* pVar );
|
StarBASIC* FindBasic( const SbxVariable* pVar );
|
||||||
void StopBasic();
|
void StopBasic();
|
||||||
long HandleBasicError( StarBASIC* pBasic );
|
long HandleBasicError( StarBASIC* pBasic );
|
||||||
void BasicStopped( sal_Bool* pbAppWindowDisabled = 0, sal_Bool* pbDispatcherLocked = 0, sal_uInt16* pnWaitCount = 0,
|
void BasicStopped( bool* pbAppWindowDisabled = 0, bool* pbDispatcherLocked = 0, sal_uInt16* pnWaitCount = 0,
|
||||||
SfxUInt16Item** ppSWActionCount = 0, SfxUInt16Item** ppSWLockViewCount = 0 );
|
SfxUInt16Item** ppSWActionCount = 0, SfxUInt16Item** ppSWLockViewCount = 0 );
|
||||||
|
|
||||||
sal_Bool IsValidSbxName( const String& rName );
|
sal_Bool IsValidSbxName( const String& rName );
|
||||||
|
Reference in New Issue
Block a user