sal_Bool -> bool

Change-Id: Ic982c4da144ecdf7198b84b98d672ced8f1f70b6
This commit is contained in:
Takeshi Abe
2012-07-31 10:14:06 +09:00
parent d602a3b280
commit 6e6564e606
8 changed files with 44 additions and 45 deletions

View File

@@ -1201,7 +1201,7 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri
{
IDEBaseWindow* pDlgWin = pIDEShell->FindDlgWin( rDocument, aLibName, aNewDlgName, false, true );
if( pDlgWin != NULL )
pIDEShell->RemoveWindow( pDlgWin, sal_True );
pIDEShell->RemoveWindow( pDlgWin, true );
BasicIDE::MarkDocumentModified( rDocument );
}
else

View File

@@ -1,4 +1,3 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
@@ -95,7 +94,7 @@ void BasicIDEShell::ExecuteCurrent( SfxRequest& rReq )
case SID_BASICIDE_HIDECURPAGE:
{
pCurWin->StoreData();
RemoveWindow( pCurWin, sal_False );
RemoveWindow( pCurWin, false );
}
break;
case SID_BASICIDE_DELETECURRENT:
@@ -120,7 +119,7 @@ void BasicIDEShell::ExecuteCurrent( SfxRequest& rReq )
{
if ( BasicIDE::RemoveDialog( aDocument, aLibName, aName ) )
{
RemoveWindow( pCurWin, sal_True );
RemoveWindow( pCurWin, true );
BasicIDE::MarkDocumentModified( aDocument );
}
}
@@ -578,7 +577,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
{
if ( m_aCurLibName.isEmpty() || ( aDocument == m_aCurDocument && aLibName == m_aCurLibName ) )
{
RemoveWindows( aDocument, aLibName, sal_True );
RemoveWindows( aDocument, aLibName, true );
if ( aDocument == m_aCurDocument && aLibName == m_aCurLibName )
{
m_aCurDocument = ScriptDocument::getApplicationScriptDocument();
@@ -636,7 +635,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
ScriptDocument aDocument( rSbxItem.GetDocument() );
IDEBaseWindow* pWin = FindWindow( aDocument, rSbxItem.GetLibName(), rSbxItem.GetName(), rSbxItem.GetType(), sal_True );
if ( pWin )
RemoveWindow( pWin, sal_True );
RemoveWindow( pWin, true );
}
break;
case SID_BASICIDE_SHOWSBX:
@@ -1119,7 +1118,7 @@ void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, bool bUpdateTabBar, bo
pModulLayout->Show();
AdjustPosSizePixel( Point( 0, 0 ), GetViewFrame()->GetWindow().GetOutputSizePixel() );
SetWindow( pModulLayout );
EnableScrollbars( sal_False );
EnableScrollbars( false );
aVScrollBar.Hide();
}
@@ -1209,7 +1208,7 @@ void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, bool bUpdateTabBar, bo
pModulLayout->GetObjectCatalog().SetCurrentEntry(pCurWin);
SetUndoManager( pCurWin ? pCurWin->GetUndoManager() : 0 );
InvalidateBasicIDESlots();
EnableScrollbars( pCurWin ? sal_True : sal_False );
EnableScrollbars( pCurWin ? true : false );
if ( m_pCurLocalizationMgr )
m_pCurLocalizationMgr->handleTranslationbar();
@@ -1426,7 +1425,7 @@ void BasicIDEShell::Activate( sal_Bool bMDI )
if( pCurWin && pCurWin->IsA( TYPE( DialogWindow ) ) )
((DialogWindow*)pCurWin)->UpdateBrowser();
ShowObjectDialog( sal_True, sal_False );
ShowObjectDialog( true, false );
}
}
@@ -1458,7 +1457,7 @@ void BasicIDEShell::Deactivate( sal_Bool bMDI )
}
}
ShowObjectDialog( sal_False, sal_False );
ShowObjectDialog( false, false );
}
}

View File

@@ -47,7 +47,7 @@ namespace css = ::com::sun::star;
IMPL_LINK_NOARG_INLINE_START(BasicIDEShell, ObjectDialogCancelHdl)
{
ShowObjectDialog( sal_False, sal_True );
ShowObjectDialog( false, true );
return 0;
}
IMPL_LINK_NOARG_INLINE_END(BasicIDEShell, ObjectDialogCancelHdl)

View File

@@ -119,7 +119,7 @@ public:
{
IDEBaseWindow* pWin = mpShell->FindWindow( mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, BASICIDE_TYPE_MODULE, sal_True );
if( pWin )
mpShell->RemoveWindow( pWin, sal_True, sal_True );
mpShell->RemoveWindow( pWin, true, true );
}
}
@@ -326,7 +326,7 @@ void BasicIDEShell::onDocumentClosed( const ScriptDocument& _rDocument )
pWin->StoreData();
if ( pWin == pCurWin )
bSetCurWindow = true;
RemoveWindow( pWin, sal_True, sal_False );
RemoveWindow( pWin, true, false );
}
// remove lib info
@@ -358,7 +358,7 @@ void BasicIDEShell::onDocumentModeChanged( const ScriptDocument& _rDocument )
}
}
void BasicIDEShell::StoreAllWindowData( sal_Bool bPersistent )
void BasicIDEShell::StoreAllWindowData( bool bPersistent )
{
for( IDEWindowTable::const_iterator it = aIDEWindowTable.begin(); it != aIDEWindowTable.end(); ++it )
{
@@ -415,7 +415,7 @@ sal_uInt16 BasicIDEShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
}
if ( bCanClose )
StoreAllWindowData( sal_False ); // don't write on the disk, that will be done later automatically
StoreAllWindowData( false ); // don't write on the disk, that will be done later automatically
return bCanClose;
}
@@ -531,7 +531,7 @@ void BasicIDEShell::ArrangeTabBar()
void BasicIDEShell::ShowObjectDialog( sal_Bool bShow, sal_Bool bCreateOrDestroy )
void BasicIDEShell::ShowObjectDialog( bool bShow, bool bCreateOrDestroy )
{
if ( bShow )
{
@@ -668,7 +668,7 @@ void BasicIDEShell::CheckWindows()
pWin->StoreData();
if ( pWin == pCurWin )
bSetCurWindow = true;
RemoveWindow( pWin, sal_True, sal_False );
RemoveWindow( pWin, true, false );
}
if ( bSetCurWindow )
SetCurWindow( FindApplicationWindow(), true );
@@ -676,9 +676,9 @@ void BasicIDEShell::CheckWindows()
void BasicIDEShell::RemoveWindows( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, sal_Bool bDestroy )
void BasicIDEShell::RemoveWindows( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, bool bDestroy )
{
sal_Bool bChangeCurWindow = pCurWin ? sal_False : sal_True;
bool bChangeCurWindow = pCurWin ? false : true;
std::vector<IDEBaseWindow*> aDeleteVec;
for( IDEWindowTable::const_iterator it = aIDEWindowTable.begin(); it != aIDEWindowTable.end(); ++it )
{
@@ -690,9 +690,9 @@ void BasicIDEShell::RemoveWindows( const ScriptDocument& rDocument, const ::rtl:
{
IDEBaseWindow* pWin = *it;
if ( pWin == pCurWin )
bChangeCurWindow = sal_True;
bChangeCurWindow = true;
pWin->StoreData();
RemoveWindow( pWin, bDestroy, sal_False );
RemoveWindow( pWin, bDestroy, false );
}
if ( bChangeCurWindow )
SetCurWindow( FindApplicationWindow(), true );
@@ -703,7 +703,7 @@ void BasicIDEShell::RemoveWindows( const ScriptDocument& rDocument, const ::rtl:
void BasicIDEShell::UpdateWindows()
{
// remove all windows that may not be displayed
sal_Bool bChangeCurWindow = pCurWin ? sal_False : sal_True;
bool bChangeCurWindow = pCurWin ? false : true;
if ( !m_aCurLibName.isEmpty() )
{
std::vector<IDEBaseWindow*> aDeleteVec;
@@ -713,7 +713,7 @@ void BasicIDEShell::UpdateWindows()
if ( !pWin->IsDocument( m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName )
{
if ( pWin == pCurWin )
bChangeCurWindow = sal_True;
bChangeCurWindow = true;
pWin->StoreData();
// The request of RUNNING prevents the crash when in reschedule.
// Window is frozen at first, later the windows should be changed
@@ -724,7 +724,7 @@ void BasicIDEShell::UpdateWindows()
}
for ( std::vector<IDEBaseWindow*>::const_iterator it = aDeleteVec.begin(); it != aDeleteVec.end(); ++it )
{
RemoveWindow( *it, sal_False, sal_False );
RemoveWindow( *it, false, false );
}
}
@@ -754,14 +754,14 @@ void BasicIDEShell::UpdateWindows()
if ( m_aCurLibName.isEmpty() || ( *doc == m_aCurDocument && aLibName == m_aCurLibName ) )
{
// check, if library is password protected and not verified
sal_Bool bProtected = sal_False;
bool bProtected = false;
Reference< script::XLibraryContainer > xModLibContainer( doc->getLibraryContainer( E_SCRIPTS ) );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) )
{
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) )
{
bProtected = sal_True;
bProtected = true;
}
}
@@ -847,7 +847,7 @@ void BasicIDEShell::UpdateWindows()
}
}
void BasicIDEShell::RemoveWindow( IDEBaseWindow* pWindow_, sal_Bool bDestroy, sal_Bool bAllowChangeCurWindow )
void BasicIDEShell::RemoveWindow( IDEBaseWindow* pWindow_, bool bDestroy, bool bAllowChangeCurWindow )
{
DBG_ASSERT( pWindow_, "Kann keinen NULL-Pointer loeschen!" );
sal_uLong nKey = GetIDEWindowId( pWindow_ );
@@ -954,7 +954,7 @@ void BasicIDEShell::InvalidateBasicIDESlots()
}
}
void BasicIDEShell::EnableScrollbars( sal_Bool bEnable )
void BasicIDEShell::EnableScrollbars( bool bEnable )
{
if ( bEnable )
{

View File

@@ -108,7 +108,7 @@ sal_Bool IsValidSbxName( const String& rName )
return sal_True;
}
static sal_Bool StringCompareLessThan( const String& rStr1, const String& rStr2 )
static bool StringCompareLessThan( const String& rStr1, const String& rStr2 )
{
return (rStr1.CompareIgnoreCaseToAscii( rStr2 ) == COMPARE_LESS);
}
@@ -268,7 +268,7 @@ namespace
BasicIDEGlobals::GetExtraData()->ChoosingMacro() = true;
String aScriptURL;
sal_Bool bError = sal_False;
bool bError = false;
SbMethod* pMethod = NULL;
::std::auto_ptr< MacroChooser > pChooser( new MacroChooser( NULL, true ) );
@@ -358,7 +358,7 @@ namespace
if ( xLimitToDocument != aDocument.getDocument() )
{
// error
bError = sal_True;
bError = true;
ErrorBox( NULL, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_ERRORCHOOSEMACRO ) ) ).Execute();
}
}
@@ -433,9 +433,9 @@ Sequence< ::rtl::OUString > GetMethodNames( const ScriptDocument& rDocument, con
//----------------------------------------------------------------------------
sal_Bool HasMethod( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName, const ::rtl::OUString& rMethName )
bool HasMethod( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName, const ::rtl::OUString& rMethName )
{
sal_Bool bHasMethod = sal_False;
bool bHasMethod = false;
::rtl::OUString aOUSource;
if ( rDocument.hasModule( rLibName, rModName ) && rDocument.getModule( rLibName, rModName, aOUSource ) )
@@ -447,7 +447,7 @@ sal_Bool HasMethod( const ScriptDocument& rDocument, const ::rtl::OUString& rLib
{
SbMethod* pMethod = (SbMethod*)pMethods->Find( rMethName, SbxCLASS_METHOD );
if ( pMethod && !pMethod->IsHidden() )
bHasMethod = sal_True;
bHasMethod = true;
}
}

View File

@@ -252,19 +252,19 @@ void BasicTreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, con
if ( eLocation == rDocument.getLibraryLocation( aLibName ) )
{
// check, if the module library is loaded
sal_Bool bModLibLoaded = sal_False;
bool bModLibLoaded = false;
::rtl::OUString aOULibName( aLibName );
Reference< script::XLibraryContainer > xModLibContainer( rDocument.getLibraryContainer( E_SCRIPTS ) );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryLoaded( aOULibName ) )
bModLibLoaded = sal_True;
bModLibLoaded = true;
// check, if the dialog library is loaded
sal_Bool bDlgLibLoaded = sal_False;
bool bDlgLibLoaded = false;
Reference< script::XLibraryContainer > xDlgLibContainer( rDocument.getLibraryContainer( E_DIALOGS ) );
if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryLoaded( aOULibName ) )
bDlgLibLoaded = sal_True;
bDlgLibLoaded = true;
sal_Bool bLoaded = bModLibLoaded || bDlgLibLoaded;
bool bLoaded = bModLibLoaded || bDlgLibLoaded;
// if only one of the libraries is loaded, load also the other
if ( bLoaded )

View File

@@ -96,13 +96,13 @@ friend class ContainerListenerImpl;
void InitTabBar();
void InitScrollBars();
void CheckWindows();
void RemoveWindows( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, sal_Bool bDestroy );
void RemoveWindows( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, bool bDestroy );
void UpdateWindows();
void ShowObjectDialog( sal_Bool bShow, sal_Bool bCreateOrDestroy );
void ShowObjectDialog( bool bShow, bool bCreateOrDestroy );
void InvalidateBasicIDESlots();
void StoreAllWindowData( sal_Bool bPersistent = sal_True );
void StoreAllWindowData( bool bPersistent = true );
void SetMDITitle();
void EnableScrollbars( sal_Bool bEnable );
void EnableScrollbars( bool bEnable );
void SetCurLib( const ScriptDocument& rDocument, ::rtl::OUString aLibName, bool bUpdateWindows = true , bool bCheck = true );
void SetCurLibForLocalization( const ScriptDocument& rDocument, ::rtl::OUString aLibName );
@@ -122,7 +122,7 @@ protected:
void SetCurWindow( IDEBaseWindow* pNewWin, bool bUpdateTabBar = false, bool bRememberAsCurrent = true );
void ManageToolbars();
void RemoveWindow( IDEBaseWindow* pWindow, sal_Bool bDestroy, sal_Bool bAllowChangeCurWindow = sal_True );
void RemoveWindow( IDEBaseWindow* pWindow, bool bDestroy, bool bAllowChangeCurWindow = true );
void ArrangeTabBar();
ModulWindow* CreateBasWin( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName );

View File

@@ -84,7 +84,7 @@ namespace BasicIDE
const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName )
throw( ::com::sun::star::container::NoSuchElementException );
sal_Bool HasMethod(
bool HasMethod(
const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName, const ::rtl::OUString& rMethName );
// new methods for dialogs