[Libreoffice-commits] .: basctl/source
Takeshi Abe
tabe at kemper.freedesktop.org
Thu Jul 19 15:03:32 PDT 2012
basctl/source/basicide/basicbox.cxx | 16 ++++-----
basctl/source/basicide/basicbox.hxx | 4 +-
basctl/source/basicide/baside2.cxx | 50 +++++++++++++++----------------
basctl/source/basicide/baside2.hxx | 38 +++++++++++------------
basctl/source/basicide/baside2b.cxx | 58 ++++++++++++++++++------------------
basctl/source/basicide/bastypes.cxx | 8 ++--
basctl/source/inc/bastypes.hxx | 4 +-
7 files changed, 89 insertions(+), 89 deletions(-)
New commits:
commit 390fc89057e5cf8a701846836740be09fd8e850e
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Fri Jul 20 06:11:34 2012 +0900
sal_Bool -> bool
Change-Id: I5b334344a0ead5fde083c952e625d74978f1a927
diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx
index 600f6bb..81b2f9d 100644
--- a/basctl/source/basicide/basicbox.cxx
+++ b/basctl/source/basicide/basicbox.cxx
@@ -152,12 +152,12 @@ BasicLibBox::BasicLibBox( Window* pParent, const uno::Reference< frame::XFrame >
m_xFrame( rFrame )
{
FillBox();
- bIgnoreSelect = sal_True; // do not yet transfer select of 0
- bFillBox = sal_True;
+ bIgnoreSelect = true; // do not yet transfer select of 0
+ bFillBox = true;
SelectEntryPos( 0 );
aCurText = GetEntry( 0 );
SetSizePixel( Size( 250, 200 ) );
- bIgnoreSelect = sal_False;
+ bIgnoreSelect = false;
}
@@ -202,7 +202,7 @@ void BasicLibBox::ReleaseFocus()
void BasicLibBox::FillBox()
{
SetUpdateMode( sal_False );
- bIgnoreSelect = sal_True;
+ bIgnoreSelect = true;
aCurText = GetSelectEntry();
@@ -232,7 +232,7 @@ void BasicLibBox::FillBox()
SelectEntryPos( GetEntryCount() );
aCurText = GetSelectEntry();
}
- bIgnoreSelect = sal_False;
+ bIgnoreSelect = false;
}
void BasicLibBox::InsertEntries( const ScriptDocument& rDocument, LibraryLocation eLocation )
@@ -285,15 +285,15 @@ long BasicLibBox::PreNotify( NotifyEvent& rNEvt )
if ( bFillBox )
{
FillBox();
- bFillBox = sal_False;
+ bFillBox = false;
}
}
else if( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( !HasChildPathFocus( sal_True ) )
{
- bIgnoreSelect = sal_True;
- bFillBox = sal_True;
+ bIgnoreSelect = true;
+ bFillBox = true;
}
}
diff --git a/basctl/source/basicide/basicbox.hxx b/basctl/source/basicide/basicbox.hxx
index 314d99d..ce55433 100644
--- a/basctl/source/basicide/basicbox.hxx
+++ b/basctl/source/basicide/basicbox.hxx
@@ -75,8 +75,8 @@ class BasicLibBox : public DocListenerBox
{
private:
String aCurText;
- sal_Bool bIgnoreSelect;
- sal_Bool bFillBox;
+ bool bIgnoreSelect;
+ bool bFillBox;
com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
void ReleaseFocus();
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index e419c42..d427a30 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -268,7 +268,7 @@ void ModulWindow::CheckCompileBasic()
if( bModified )
{
AssertValidEditEngine();
- GetEditorWindow().SetSourceInBasic( sal_False );
+ GetEditorWindow().SetSourceInBasic( false );
}
sal_Bool bWasModified = GetBasic()->IsModified();
@@ -285,12 +285,12 @@ void ModulWindow::CheckCompileBasic()
pIDEShell->GetViewFrame()->GetWindow().LeaveWait();
aStatus.bError = !bDone;
- aStatus.bIsRunning = sal_False;
+ aStatus.bIsRunning = false;
}
}
}
-sal_Bool ModulWindow::BasicExecute()
+bool ModulWindow::BasicExecute()
{
DBG_CHKTHIS( ModulWindow, 0 );
@@ -301,7 +301,7 @@ sal_Bool ModulWindow::BasicExecute()
if ( !aDocument.allowMacros() )
{
WarningBox( this, WB_OK, IDE_RESSTR(RID_STR_CANNOTRUNMACRO)).Execute();
- return sal_False;
+ return false;
}
}
@@ -351,10 +351,10 @@ sal_Bool ModulWindow::BasicExecute()
ClearStatus( BASWIN_RUNNINGBASIC );
}
else
- aStatus.bIsRunning = sal_False; // cancel of Reschedule()
+ aStatus.bIsRunning = false; // cancel of Reschedule()
}
- sal_Bool bDone = !aStatus.bError;
+ bool bDone = !aStatus.bError;
return bDone;
}
@@ -371,39 +371,39 @@ sal_Bool ModulWindow::CompileBasic()
return bIsCompiled;
}
-sal_Bool ModulWindow::BasicRun()
+bool ModulWindow::BasicRun()
{
DBG_CHKTHIS( ModulWindow, 0 );
aStatus.nBasicFlags = 0;
- sal_Bool bDone = BasicExecute();
+ bool bDone = BasicExecute();
return bDone;
}
-sal_Bool ModulWindow::BasicStepOver()
+bool ModulWindow::BasicStepOver()
{
DBG_CHKTHIS( ModulWindow, 0 );
aStatus.nBasicFlags = SbDEBUG_STEPINTO | SbDEBUG_STEPOVER;
- sal_Bool bDone = BasicExecute();
+ bool bDone = BasicExecute();
return bDone;
}
-sal_Bool ModulWindow::BasicStepInto()
+bool ModulWindow::BasicStepInto()
{
DBG_CHKTHIS( ModulWindow, 0 );
aStatus.nBasicFlags = SbDEBUG_STEPINTO;
- sal_Bool bDone = BasicExecute();
+ bool bDone = BasicExecute();
return bDone;
}
-sal_Bool ModulWindow::BasicStepOut()
+bool ModulWindow::BasicStepOut()
{
DBG_CHKTHIS( ModulWindow, 0 );
aStatus.nBasicFlags = SbDEBUG_STEPOUT;
- sal_Bool bDone = BasicExecute();
+ bool bDone = BasicExecute();
return bDone;
}
@@ -414,7 +414,7 @@ void ModulWindow::BasicStop()
DBG_CHKTHIS( ModulWindow, 0 );
GetBasic()->Stop();
- aStatus.bIsRunning = sal_False;
+ aStatus.bIsRunning = false;
}
sal_Bool ModulWindow::LoadBasic()
@@ -731,8 +731,8 @@ long ModulWindow::BasicBreakHdl( StarBASIC* pBasic )
pLayout->GetWatchWindow().UpdateWatches();
pLayout->GetStackWindow().UpdateCalls();
- aStatus.bIsInReschedule = sal_True;
- aStatus.bIsRunning = sal_True;
+ aStatus.bIsInReschedule = true;
+ aStatus.bIsRunning = true;
AddStatus( BASWIN_INRESCHEDULE );
@@ -741,7 +741,7 @@ long ModulWindow::BasicBreakHdl( StarBASIC* pBasic )
while( aStatus.bIsRunning )
Application::Yield();
- aStatus.bIsInReschedule = sal_False;
+ aStatus.bIsInReschedule = false;
aXEditorWindow.GetBrkWindow().SetMarkerPos( MARKER_NOMARKER );
ClearStatus( BASWIN_INRESCHEDULE );
@@ -790,7 +790,7 @@ void ModulWindow::BasicAddWatch()
void ModulWindow::BasicRemoveWatch()
{
DBG_CHKTHIS( ModulWindow, 0 );
- sal_Bool bRemoved = pLayout->GetWatchWindow().RemoveSelectedWatch();
+ bool bRemoved = pLayout->GetWatchWindow().RemoveSelectedWatch();
if ( !bRemoved )
Sound::Beep();
@@ -848,17 +848,17 @@ void ModulWindow::StoreData()
// StoreData is called when the BasicManager is destroyed or
// this window is closed.
// => interrupts undesired!
- GetEditorWindow().SetSourceInBasic( sal_True );
+ GetEditorWindow().SetSourceInBasic( true );
}
-sal_Bool ModulWindow::CanClose()
+bool ModulWindow::CanClose()
{
DBG_CHKTHIS( ModulWindow, 0 );
- return sal_True;
+ return true;
}
-sal_Bool ModulWindow::AllowUndo()
+bool ModulWindow::AllowUndo()
{
return GetEditorWindow().CanModify();
}
@@ -1301,7 +1301,7 @@ void ModulWindow::BasicStarted()
{
if ( XModule().Is() )
{
- aStatus.bIsRunning = sal_True;
+ aStatus.bIsRunning = true;
BreakPointList& rList = GetBreakPoints();
if ( rList.size() )
{
@@ -1319,7 +1319,7 @@ void ModulWindow::BasicStarted()
void ModulWindow::BasicStopped()
{
- aStatus.bIsRunning = sal_False;
+ aStatus.bIsRunning = false;
GetBreakPointWindow().SetMarkerPos( MARKER_NOMARKER );
}
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 9e90a75..7a15c45 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -117,9 +117,9 @@ private:
void ImpDoHighlight( sal_uLong nLineOff );
void ImplSetFont();
- sal_Bool bHighlightning;
- sal_Bool bDoSyntaxHighlight;
- sal_Bool bDelayHighlight;
+ bool bHighlightning;
+ bool bDoSyntaxHighlight;
+ bool bDelayHighlight;
virtual
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
@@ -138,7 +138,7 @@ protected:
void DoSyntaxHighlight( sal_uLong nPara );
String GetWordAtCursor();
- sal_Bool ImpCanModify();
+ bool ImpCanModify();
public:
EditorWindow( Window* pParent );
@@ -151,7 +151,7 @@ public:
void CreateProgress( const String& rText, sal_uLong nRange );
void DestroyProgress();
- void ParagraphInsertedDeleted( sal_uLong nNewPara, sal_Bool bInserted );
+ void ParagraphInsertedDeleted( sal_uLong nNewPara, bool bInserted );
void DoDelayedSyntaxHighlight( sal_uLong nPara );
void CreateEditEngine();
@@ -161,9 +161,9 @@ public:
{ pModulWindow = pWin; }
void ForceSyntaxTimeout();
- sal_Bool SetSourceInBasic( sal_Bool bQuiet = sal_True );
+ bool SetSourceInBasic( bool bQuiet = true );
- sal_Bool CanModify() { return ImpCanModify(); }
+ bool CanModify() { return ImpCanModify(); }
};
@@ -174,7 +174,7 @@ private:
sal_uInt16 nMarkerPos;
BreakPointList aBreakPointList;
ModulWindow* pModulWindow;
- sal_Bool bErrorMarker;
+ bool bErrorMarker;
virtual void DataChanged(DataChangedEvent const & rDCEvt);
@@ -184,11 +184,11 @@ protected:
virtual void Paint( const Rectangle& );
virtual void Resize();
BreakPoint* FindBreakPoint( const Point& rMousePos );
- void ShowMarker( sal_Bool bShow );
+ void ShowMarker( bool bShow );
virtual void MouseButtonDown( const MouseEvent& rMEvt );
virtual void Command( const CommandEvent& rCEvt );
- sal_Bool SyncYOffset();
+ bool SyncYOffset();
public:
BreakPointWindow( Window* pParent );
@@ -197,7 +197,7 @@ public:
void SetModulWindow( ModulWindow* pWin )
{ pModulWindow = pWin; }
- void SetMarkerPos( sal_uInt16 nLine, sal_Bool bErrorMarker = sal_False );
+ void SetMarkerPos( sal_uInt16 nLine, bool bErrorMarker = false );
void DoScroll( long nHorzScroll, long nVertScroll );
long& GetCurYOffset() { return nCurYOffset; }
@@ -253,7 +253,7 @@ public:
~WatchWindow();
void AddWatch( const String& rVName );
- sal_Bool RemoveSelectedWatch();
+ bool RemoveSelectedWatch();
void UpdateWatches( bool bBasicStopped = false );
WatchTreeListBox& GetWatchTreeListBox() { return aTreeListBox; }
@@ -325,7 +325,7 @@ private:
long BasicBreakHdl( StarBASIC* pBasic );
void CheckCompileBasic();
- sal_Bool BasicExecute();
+ bool BasicExecute();
void GoOnTop();
void AssertValidEditEngine();
@@ -351,14 +351,14 @@ public:
virtual void GetState( SfxItemSet& );
virtual void StoreData();
virtual void UpdateData();
- virtual sal_Bool CanClose();
+ virtual bool CanClose();
// return number of pages to be printed
virtual sal_Int32 countPages( Printer* pPrinter );
// print page
virtual void printPage( sal_Int32 nPage, Printer* pPrinter );
virtual ::rtl::OUString GetTitle();
virtual BasicEntryDescriptor CreateEntryDescriptor();
- virtual sal_Bool AllowUndo();
+ virtual bool AllowUndo();
virtual void SetReadOnly( sal_Bool bReadOnly );
virtual sal_Bool IsReadOnly();
@@ -372,10 +372,10 @@ public:
::rtl::OUString GetSbModuleName();
sal_Bool CompileBasic();
- sal_Bool BasicRun();
- sal_Bool BasicStepOver();
- sal_Bool BasicStepInto();
- sal_Bool BasicStepOut();
+ bool BasicRun();
+ bool BasicStepOver();
+ bool BasicStepInto();
+ bool BasicStepOut();
void BasicStop();
sal_Bool BasicToggleBreakPoint();
void BasicToggleBreakPointEnabled();
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 3e96c22..0e63635 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -162,12 +162,12 @@ private:
EditorWindow::EditorWindow( Window* pParent ) :
Window( pParent, WB_BORDER )
{
- bDoSyntaxHighlight = sal_True;
- bDelayHighlight = sal_True;
+ bDoSyntaxHighlight = true;
+ bDelayHighlight = true;
pModulWindow = 0;
pEditView = 0;
pEditEngine = 0;
- bHighlightning = sal_False;
+ bHighlightning = false;
pProgress = 0;
nCurTextWidth = 0;
SetBackground(
@@ -403,9 +403,9 @@ void EditorWindow::Command( const CommandEvent& rCEvt )
}
}
-sal_Bool EditorWindow::ImpCanModify()
+bool EditorWindow::ImpCanModify()
{
- sal_Bool bCanModify = sal_True;
+ bool bCanModify = true;
if ( StarBASIC::IsRunning() )
{
// If in Trace-mode, abort the trace or refuse input
@@ -416,7 +416,7 @@ sal_Bool EditorWindow::ImpCanModify()
BasicIDE::StopBasic();
}
else
- bCanModify = sal_False;
+ bCanModify = false;
}
return bCanModify;
}
@@ -449,12 +449,12 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt )
TextSelection aSel( pEditView->GetSelection() );
if ( aSel.GetStart().GetPara() != aSel.GetEnd().GetPara() )
{
- bDelayHighlight = sal_False;
+ bDelayHighlight = false;
if ( !rKEvt.GetKeyCode().IsShift() )
pEditView->IndentBlock();
else
pEditView->UnindentBlock();
- bDelayHighlight = sal_True;
+ bDelayHighlight = true;
bDone = sal_True;
}
}
@@ -500,11 +500,11 @@ void EditorWindow::LoseFocus()
Window::LoseFocus();
}
-sal_Bool EditorWindow::SetSourceInBasic( sal_Bool bQuiet )
+bool EditorWindow::SetSourceInBasic( bool bQuiet )
{
(void)bQuiet;
- sal_Bool bChanged = sal_False;
+ bool bChanged = false;
if ( pEditEngine && pEditEngine->IsModified()
&& !GetEditView()->IsReadOnly() ) // Added for #i60626, otherwise
// any read only bug in the text engine could lead to a crash later
@@ -530,7 +530,7 @@ sal_Bool EditorWindow::SetSourceInBasic( sal_Bool bQuiet )
pEditEngine->SetModified( sal_False );
BasicIDE::MarkDocumentModified( aDocument );
- bChanged = sal_True;
+ bChanged = true;
}
}
return bChanged;
@@ -574,8 +574,8 @@ void EditorWindow::CreateEditEngine()
aHighlighter.initialize( HIGHLIGHT_BASIC );
- sal_Bool bWasDoSyntaxHighlight = bDoSyntaxHighlight;
- bDoSyntaxHighlight = sal_False; // too slow for large texts...
+ bool bWasDoSyntaxHighlight = bDoSyntaxHighlight;
+ bDoSyntaxHighlight = false; // too slow for large texts...
::rtl::OUString aOUSource( pModulWindow->GetModule() );
sal_Int32 nLines = 0;
sal_Int32 nIndex = -1;
@@ -720,12 +720,12 @@ void EditorWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
}
else if( rTextHint.GetId() == TEXT_HINT_PARAINSERTED )
{
- ParagraphInsertedDeleted( rTextHint.GetValue(), sal_True );
+ ParagraphInsertedDeleted( rTextHint.GetValue(), true );
DoDelayedSyntaxHighlight( rTextHint.GetValue() );
}
else if( rTextHint.GetId() == TEXT_HINT_PARAREMOVED )
{
- ParagraphInsertedDeleted( rTextHint.GetValue(), sal_False );
+ ParagraphInsertedDeleted( rTextHint.GetValue(), false );
}
else if( rTextHint.GetId() == TEXT_HINT_PARACONTENTCHANGED )
{
@@ -868,7 +868,7 @@ IMPL_LINK_NOARG(EditorWindow, SyntaxTimerHdl)
sal_Bool bWasModified = pEditEngine->IsModified();
// pEditEngine->SetUpdateMode( sal_False );
- bHighlightning = sal_True;
+ bHighlightning = true;
for ( SyntaxLineSet::const_iterator it = aSyntaxLineTable.begin();
it != aSyntaxLineTable.end(); ++it )
{
@@ -883,12 +883,12 @@ IMPL_LINK_NOARG(EditorWindow, SyntaxTimerHdl)
pEditEngine->SetModified( bWasModified );
aSyntaxLineTable.clear();
- bHighlightning = sal_False;
+ bHighlightning = false;
return 0;
}
-void EditorWindow::ParagraphInsertedDeleted( sal_uLong nPara, sal_Bool bInserted )
+void EditorWindow::ParagraphInsertedDeleted( sal_uLong nPara, bool bInserted )
{
if ( pProgress )
pProgress->StepProgress();
@@ -996,7 +996,7 @@ void BreakPointWindow::Paint( const Rectangle& )
size_t nY = nLine*nLineHeight - nCurYOffset;
DrawImage( Point( 0, nY ) + aBmpOff, pBrk->bEnabled ? aBrk1 : aBrk0 );
}
- ShowMarker( sal_True );
+ ShowMarker( true );
}
@@ -1009,18 +1009,18 @@ void BreakPointWindow::DoScroll( long nHorzScroll, long nVertScroll )
-void BreakPointWindow::SetMarkerPos( sal_uInt16 nLine, sal_Bool bError )
+void BreakPointWindow::SetMarkerPos( sal_uInt16 nLine, bool bError )
{
if ( SyncYOffset() )
Update();
- ShowMarker( sal_False );
+ ShowMarker( false );
nMarkerPos = nLine;
bErrorMarker = bError;
- ShowMarker( sal_True );
+ ShowMarker( true );
}
-void BreakPointWindow::ShowMarker( sal_Bool bShow )
+void BreakPointWindow::ShowMarker( bool bShow )
{
if ( nMarkerPos == MARKER_NOMARKER )
return;
@@ -1128,7 +1128,7 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt )
}
}
-sal_Bool BreakPointWindow::SyncYOffset()
+bool BreakPointWindow::SyncYOffset()
{
TextView* pView = pModulWindow->GetEditView();
if ( pView )
@@ -1138,10 +1138,10 @@ sal_Bool BreakPointWindow::SyncYOffset()
{
nCurYOffset = nViewYOffset;
Invalidate();
- return sal_True;
+ return true;
}
}
- return sal_False;
+ return false;
}
// virtual
@@ -1399,7 +1399,7 @@ void WatchWindow::AddWatch( const String& rVName )
aRemoveWatchButton.Enable();
}
-sal_Bool WatchWindow::RemoveSelectedWatch()
+bool WatchWindow::RemoveSelectedWatch()
{
SvLBoxEntry* pEntry = aTreeListBox.GetCurEntry();
if ( pEntry )
@@ -1412,10 +1412,10 @@ sal_Bool WatchWindow::RemoveSelectedWatch()
aXEdit.SetText( String() );
if ( !aTreeListBox.GetEntryCount() )
aRemoveWatchButton.Disable();
- return sal_True;
+ return true;
}
else
- return sal_False;
+ return false;
}
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 5872324..76c6a35 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -162,14 +162,14 @@ void IDEBaseWindow::StoreData()
{
}
-sal_Bool IDEBaseWindow::CanClose()
+bool IDEBaseWindow::CanClose()
{
- return sal_True;
+ return true;
}
-sal_Bool IDEBaseWindow::AllowUndo()
+bool IDEBaseWindow::AllowUndo()
{
- return sal_True;
+ return true;
}
diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx
index 3551637..ffe1a9a 100644
--- a/basctl/source/inc/bastypes.hxx
+++ b/basctl/source/inc/bastypes.hxx
@@ -149,7 +149,7 @@ public:
virtual void StoreData();
virtual void UpdateData();
- virtual sal_Bool CanClose();
+ virtual bool CanClose();
// return number of pages to be printed
virtual sal_Int32 countPages( Printer* pPrinter ) = 0;
@@ -163,7 +163,7 @@ public:
virtual sal_Bool IsModified();
virtual sal_Bool IsPasteAllowed();
- virtual sal_Bool AllowUndo();
+ virtual bool AllowUndo();
virtual void SetReadOnly( sal_Bool bReadOnly );
virtual sal_Bool IsReadOnly();
More information about the Libreoffice-commits
mailing list