[Libreoffice-commits] .: basctl/source

Takeshi Abe tabe at kemper.freedesktop.org
Wed Jul 25 00:06:55 PDT 2012


 basctl/source/basicide/baside2.cxx  |   42 ++++++++++++++++++------------------
 basctl/source/basicide/baside2.hxx  |   18 +++++++--------
 basctl/source/basicide/baside3.cxx  |   15 ++++++------
 basctl/source/basicide/basides1.cxx |    4 +--
 basctl/source/inc/baside3.hxx       |    4 +--
 basctl/source/inc/basidesh.hxx      |    2 -
 6 files changed, 42 insertions(+), 43 deletions(-)

New commits:
commit 264ff0e6e4ed386916b6e0ad20f0fa818d999953
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Tue Jul 24 17:46:32 2012 +0900

    sal_Bool -> bool
    
    Change-Id: I009a55e1e399198aef8e5ad3f43230b0aea0b6fe

diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 579b706..2be8005 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -417,10 +417,10 @@ void ModulWindow::BasicStop()
     aStatus.bIsRunning = false;
 }
 
-sal_Bool ModulWindow::LoadBasic()
+bool ModulWindow::LoadBasic()
 {
     DBG_CHKTHIS( ModulWindow, 0 );
-    sal_Bool bDone = sal_False;
+    bool bDone = false;
 
     Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
     Reference < XFilePicker > xFP;
@@ -462,7 +462,7 @@ sal_Bool ModulWindow::LoadBasic()
             if ( nError )
                 ErrorHandler::HandleError( nError );
             else
-                bDone = sal_True;
+                bDone = true;
         }
         else
             ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_COULDNTREAD) ).Execute();
@@ -471,10 +471,10 @@ sal_Bool ModulWindow::LoadBasic()
 }
 
 
-sal_Bool ModulWindow::SaveBasicSource()
+bool ModulWindow::SaveBasicSource()
 {
     DBG_CHKTHIS( ModulWindow, 0 );
-    sal_Bool bDone = sal_False;
+    bool bDone = false;
 
     Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
     Reference < XFilePicker > xFP;
@@ -517,7 +517,7 @@ sal_Bool ModulWindow::SaveBasicSource()
             if ( nError )
                 ErrorHandler::HandleError( nError );
             else
-                bDone = sal_True;
+                bDone = true;
         }
         else
             ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_COULDNTWRITE) ) ).Execute();
@@ -526,27 +526,27 @@ sal_Bool ModulWindow::SaveBasicSource()
     return bDone;
 }
 
-sal_Bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const ScriptDocument& rDocument, const ::rtl::OUString& aLibName );
+bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const ScriptDocument& rDocument, const ::rtl::OUString& aLibName );
 
-sal_Bool ModulWindow::ImportDialog()
+bool ModulWindow::ImportDialog()
 {
     const ScriptDocument& rDocument = GetDocument();
     ::rtl::OUString aLibName = GetLibName();
     return implImportDialog( this, aCurPath, rDocument, aLibName );
 }
 
-sal_Bool ModulWindow::ToggleBreakPoint( sal_uLong nLine )
+bool ModulWindow::ToggleBreakPoint( sal_uLong nLine )
 {
     DBG_ASSERT( XModule().Is(), "Kein Modul!" );
 
-    sal_Bool bNewBreakPoint = sal_False;
+    bool bNewBreakPoint = false;
 
     if ( XModule().Is() )
     {
         CheckCompileBasic();
         if ( aStatus.bError )
         {
-            return sal_False;
+            return false;
         }
 
         BreakPoint* pBrk = GetBreakPoints().FindBreakPoint( nLine );
@@ -560,7 +560,7 @@ sal_Bool ModulWindow::ToggleBreakPoint( sal_uLong nLine )
             if ( xModule->SetBP( (sal_uInt16)nLine) )
             {
                 GetBreakPoints().InsertSorted( new BreakPoint( nLine ) );
-                bNewBreakPoint = sal_True;
+                bNewBreakPoint = true;
                 if ( StarBASIC::IsRunning() )
                 {
                     for ( sal_uInt16 nMethod = 0; nMethod < xModule->GetMethods()->Count(); nMethod++ )
@@ -593,7 +593,7 @@ void ModulWindow::UpdateBreakPoint( const BreakPoint& rBrk )
 }
 
 
-sal_Bool ModulWindow::BasicToggleBreakPoint()
+bool ModulWindow::BasicToggleBreakPoint()
 {
     DBG_CHKTHIS( ModulWindow, 0 );
     AssertValidEditEngine();
@@ -602,12 +602,12 @@ sal_Bool ModulWindow::BasicToggleBreakPoint()
     aSel.GetStart().GetPara()++;    // Basic lines start at 1!
     aSel.GetEnd().GetPara()++;
 
-    sal_Bool bNewBreakPoint = sal_False;
+    bool bNewBreakPoint = false;
 
     for ( sal_uLong nLine = aSel.GetStart().GetPara(); nLine <= aSel.GetEnd().GetPara(); nLine++ )
     {
         if ( ToggleBreakPoint( nLine ) )
-            bNewBreakPoint = sal_True;
+            bNewBreakPoint = true;
     }
 
     aXEditorWindow.GetBrkWindow().Invalidate();
@@ -1184,7 +1184,7 @@ void ModulWindow::FrameWindowMoved()
 
 
 
-void ModulWindow::ShowCursor( sal_Bool bOn )
+void ModulWindow::ShowCursor( bool bOn )
 {
     if ( GetEditEngine() )
     {
@@ -1217,7 +1217,7 @@ void ModulWindow::Deactivating()
         GetEditView()->EraseVirtualDevice();
 }
 
-sal_uInt16 ModulWindow::StartSearchAndReplace( const SvxSearchItem& rSearchItem, sal_Bool bFromStart )
+sal_uInt16 ModulWindow::StartSearchAndReplace( const SvxSearchItem& rSearchItem, bool bFromStart )
 {
     // one could also relinquish syntaxhighlighting/formatting instead of the stupid replace-everything...
     AssertValidEditEngine();
@@ -1406,8 +1406,8 @@ ModulWindowLayout::ModulWindowLayout( Window* pParent ) :
     aWatchWindow( this ),
     aStackWindow( this ),
     aObjectCatalog( this ),
-    bVSplitted(sal_False),
-    bHSplitted(sal_False),
+    bVSplitted(false),
+    bHSplitted(false),
     m_pModulWindow(0),
     m_aImagesNormal(IDEResId(RID_IMGLST_LAYOUT))
 {
@@ -1549,9 +1549,9 @@ void ModulWindowLayout::ArrangeWindows()
 IMPL_LINK( ModulWindowLayout, SplitHdl, Splitter *, pSplitter )
 {
     if ( pSplitter == &aVSplitter )
-        bVSplitted = sal_True;
+        bVSplitted = true;
     else
-        bHSplitted = sal_True;
+        bHSplitted = true;
 
     ArrangeWindows();
     return 0;
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index e8f0cb6..24d2f46 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -377,20 +377,20 @@ public:
     bool            BasicStepInto();
     bool            BasicStepOut();
     void            BasicStop();
-    sal_Bool            BasicToggleBreakPoint();
+    bool            BasicToggleBreakPoint();
     void            BasicToggleBreakPointEnabled();
     void            ManageBreakPoints();
     void            UpdateBreakPoint( const BreakPoint& rBrk );
     void            BasicAddWatch();
     void            BasicRemoveWatch();
 
-    sal_Bool            LoadBasic();
-    sal_Bool            SaveBasicSource();
-    sal_Bool            ImportDialog();
+    bool            LoadBasic();
+    bool            SaveBasicSource();
+    bool            ImportDialog();
 
     void            EditMacro( const String& rMacroName );
 
-    sal_Bool            ToggleBreakPoint( sal_uLong nLine );
+    bool            ToggleBreakPoint( sal_uLong nLine );
 
     BasicStatus&    GetBasicStatus() { return aStatus; }
 
@@ -398,10 +398,10 @@ public:
     virtual sal_Bool    IsPasteAllowed();
 
     void            FrameWindowMoved();
-    void            ShowCursor( sal_Bool bOn );
+    void            ShowCursor( bool bOn );
 
     virtual sal_uInt16  GetSearchOptions();
-    sal_uInt16          StartSearchAndReplace( const SvxSearchItem& rSearchItem, sal_Bool bFromStart = sal_False );
+    sal_uInt16          StartSearchAndReplace( const SvxSearchItem& rSearchItem, bool bFromStart = false );
 
     virtual Window* GetLayoutWindow();
 
@@ -435,8 +435,8 @@ private:
     StackWindow     aStackWindow;
     ObjectCatalog   aObjectCatalog;
 
-    sal_Bool            bVSplitted;
-    sal_Bool            bHSplitted;
+    bool            bVSplitted;
+    bool            bHSplitted;
 
     ModulWindow * m_pModulWindow;
 
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index 4faa668..0cee74b 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -693,10 +693,10 @@ void DialogWindow::UpdateBrowser()
 
 static ::rtl::OUString aResourceResolverPropName( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" ));
 
-sal_Bool DialogWindow::SaveDialog()
+bool DialogWindow::SaveDialog()
 {
     DBG_CHKTHIS( DialogWindow, 0 );
-    sal_Bool bDone = sal_False;
+    bool bDone = false;
 
     Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
     Reference < XFilePicker > xFP;
@@ -956,9 +956,9 @@ LanguageMismatchQueryBox::LanguageMismatchQueryBox( Window* pParent,
     SetImage( QueryBox::GetStandardImage() );
 }
 
-sal_Bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const ScriptDocument& rDocument, const ::rtl::OUString& aLibName )
+bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const ScriptDocument& rDocument, const ::rtl::OUString& aLibName )
 {
-    sal_Bool bDone = sal_False;
+    bool bDone = false;
 
     Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
     Reference < XFilePicker > xFP;
@@ -1247,7 +1247,7 @@ sal_Bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const
                 pIDEShell->SetCurWindow( pNewDlgWin, sal_True );
             }
 
-            bDone = sal_True;
+            bDone = true;
         }
         catch(const Exception& )
         {}
@@ -1256,14 +1256,13 @@ sal_Bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const
     return bDone;
 }
 
-sal_Bool DialogWindow::ImportDialog()
+bool DialogWindow::ImportDialog()
 {
     DBG_CHKTHIS( DialogWindow, 0 );
 
     const ScriptDocument& rDocument = GetDocument();
     ::rtl::OUString aLibName = GetLibName();
-    sal_Bool bRet = implImportDialog( this, aCurPath, rDocument, aLibName );
-    return bRet;
+    return implImportDialog( this, aCurPath, rDocument, aLibName );
 }
 
 DlgEdModel* DialogWindow::GetModel() const
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index ae9443f..0f5d524 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -217,7 +217,7 @@ void BasicIDEShell::ExecuteCurrent( SfxRequest& rReq )
                                     {
                                         if ( pCurWin )
                                             pWin->SetSizePixel( pCurWin->GetSizePixel() );
-                                        nFound = ((ModulWindow*)pWin)->StartSearchAndReplace( (const SvxSearchItem&)rItem, sal_True );
+                                        nFound = ((ModulWindow*)pWin)->StartSearchAndReplace( (const SvxSearchItem&)rItem, true );
                                     }
                                     if ( nFound )
                                     {
@@ -238,7 +238,7 @@ void BasicIDEShell::ExecuteCurrent( SfxRequest& rReq )
                                     pWin = 0;
                             }
                             if ( !nFound && bSearchedFromStart )
-                                nFound = ((ModulWindow*)pCurWin)->StartSearchAndReplace( (const SvxSearchItem&)rItem, sal_True );
+                                nFound = ((ModulWindow*)pCurWin)->StartSearchAndReplace( (const SvxSearchItem&)rItem, true );
                             if ( bChangeCurWindow )
                                 SetCurWindow( pWin, sal_True );
                         }
diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx
index fb31885..d1ab9c2 100644
--- a/basctl/source/inc/baside3.hxx
+++ b/basctl/source/inc/baside3.hxx
@@ -80,8 +80,8 @@ public:
     sal_Bool                RenameDialog( const ::rtl::OUString& rNewName );
     void                DisableBrowser();
     void                UpdateBrowser();
-    sal_Bool                SaveDialog();
-    sal_Bool                ImportDialog();
+    bool                SaveDialog();
+    bool                ImportDialog();
 
     virtual ::rtl::OUString      GetTitle();
     virtual BasicEntryDescriptor CreateEntryDescriptor();
diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx
index 9caf921..7d91c10 100644
--- a/basctl/source/inc/basidesh.hxx
+++ b/basctl/source/inc/basidesh.hxx
@@ -66,7 +66,7 @@ class BasicIDEShell :public SfxViewShell
 {
 friend class JavaDebuggingListenerImpl;
 friend class LocalizationMgr;
-    friend sal_Bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const ScriptDocument& rDocument, const ::rtl::OUString& aLibName );
+    friend bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const ScriptDocument& rDocument, const ::rtl::OUString& aLibName );
     friend bool BasicIDE::RemoveDialog( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rDlgName );
 
     ObjectCatalog*      pObjectCatalog;


More information about the Libreoffice-commits mailing list