[Libreoffice-commits] .: basctl/source

Takeshi Abe tabe at kemper.freedesktop.org
Mon Jul 30 18:22:40 PDT 2012


 basctl/source/basicide/baside3.cxx  |    2 +-
 basctl/source/basicide/basides1.cxx |   17 ++++++++---------
 basctl/source/basicide/basides2.cxx |    2 +-
 basctl/source/basicide/basidesh.cxx |   34 +++++++++++++++++-----------------
 basctl/source/basicide/basobj2.cxx  |   12 ++++++------
 basctl/source/basicide/bastype2.cxx |   10 +++++-----
 basctl/source/inc/basidesh.hxx      |   10 +++++-----
 basctl/source/inc/basobj.hxx        |    2 +-
 8 files changed, 44 insertions(+), 45 deletions(-)

New commits:
commit 6e6564e60605dded9b0514b82c168e7f88f6e7db
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Tue Jul 31 10:14:06 2012 +0900

    sal_Bool -> bool
    
    Change-Id: Ic982c4da144ecdf7198b84b98d672ced8f1f70b6

diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index 5038740..cad5d8c 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -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
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index f4eb16d..86af285 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -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 );
     }
 }
 
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx
index 4de4d77..13db522 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -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)
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index bccc73d..e2a0960 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -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 )
     {
diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx
index b355d1a..600f23c 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -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;
         }
     }
 
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index d8ccb8b..6d49fef 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -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 )
diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx
index 2152b92..6ec1666 100644
--- a/basctl/source/inc/basidesh.hxx
+++ b/basctl/source/inc/basidesh.hxx
@@ -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 );
diff --git a/basctl/source/inc/basobj.hxx b/basctl/source/inc/basobj.hxx
index 36fc8c0..5e72308 100644
--- a/basctl/source/inc/basobj.hxx
+++ b/basctl/source/inc/basobj.hxx
@@ -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


More information about the Libreoffice-commits mailing list