Kaydet (Commit) 32efd885 authored tarafından Noel Grandin's avatar Noel Grandin

formula: sal_Bool->bool

Change-Id: I3280b4d4b02e6a6fa22bc250e56a3c6ae77fc675
üst 206e224f
...@@ -50,7 +50,7 @@ private: ...@@ -50,7 +50,7 @@ private:
MultiLineEdit* pMEdit; MultiLineEdit* pMEdit;
Link aSelChangedLink; Link aSelChangedLink;
Selection aOldSel; Selection aOldSel;
sal_Bool bMouseFlag; bool bMouseFlag;
DECL_LINK(ChangedHdl, void *); DECL_LINK(ChangedHdl, void *);
protected: protected:
......
...@@ -130,7 +130,7 @@ void FormulaHelper::FillArgStrings( const OUString& rFormula, ...@@ -130,7 +130,7 @@ void FormulaHelper::FillArgStrings( const OUString& rFormula,
sal_Int32 nStart = 0; sal_Int32 nStart = 0;
sal_Int32 nEnd = 0; sal_Int32 nEnd = 0;
sal_uInt16 i; sal_uInt16 i;
sal_Bool bLast = sal_False; bool bLast = false;
for ( i=0; i<nArgs && !bLast; i++ ) for ( i=0; i<nArgs && !bLast; i++ )
{ {
...@@ -143,7 +143,7 @@ void FormulaHelper::FillArgStrings( const OUString& rFormula, ...@@ -143,7 +143,7 @@ void FormulaHelper::FillArgStrings( const OUString& rFormula,
if ( nEnd != nStart ) if ( nEnd != nStart )
_rArgs.push_back(rFormula.copy( nStart, nEnd-1-nStart )); _rArgs.push_back(rFormula.copy( nStart, nEnd-1-nStart ));
else else
_rArgs.push_back(OUString()), bLast = sal_True; _rArgs.push_back(OUString()), bLast = true;
} }
else else
{ {
...@@ -175,10 +175,10 @@ void FormulaHelper::GetArgStrings( ::std::vector< OUString >& _rArgs, ...@@ -175,10 +175,10 @@ void FormulaHelper::GetArgStrings( ::std::vector< OUString >& _rArgs,
inline sal_Bool IsFormulaText( const CharClass* _pCharClass,const OUString& rStr, sal_Int32 nPos ) inline bool IsFormulaText( const CharClass* _pCharClass,const OUString& rStr, sal_Int32 nPos )
{ {
if( _pCharClass->isLetterNumeric( rStr, nPos ) ) if( _pCharClass->isLetterNumeric( rStr, nPos ) )
return sal_True; return true;
else else
{ // In internationalized versions function names may contain a dot { // In internationalized versions function names may contain a dot
// and in every version also an underscore... ;-) // and in every version also an underscore... ;-)
...@@ -201,11 +201,11 @@ sal_Int32 FormulaHelper::GetFunctionStart( const OUString& rFormula, ...@@ -201,11 +201,11 @@ sal_Int32 FormulaHelper::GetFunctionStart( const OUString& rFormula,
sal_Int32 nFStart = FUNC_NOTFOUND; sal_Int32 nFStart = FUNC_NOTFOUND;
sal_Int32 nParPos = nStart; sal_Int32 nParPos = nStart;
sal_Bool bRepeat, bFound; bool bRepeat, bFound;
do do
{ {
bFound = sal_False; bFound = false;
bRepeat = sal_False; bRepeat = false;
if ( bBack ) if ( bBack )
{ {
...@@ -219,7 +219,7 @@ sal_Int32 FormulaHelper::GetFunctionStart( const OUString& rFormula, ...@@ -219,7 +219,7 @@ sal_Int32 FormulaHelper::GetFunctionStart( const OUString& rFormula,
if (nParPos > 0) if (nParPos > 0)
nParPos--; nParPos--;
} }
else if ( (bFound = ( rFormula[nParPos] == '(' ) ) == sal_False ) else if ( (bFound = ( rFormula[nParPos] == '(' ) ) == false )
nParPos--; nParPos--;
} }
} }
...@@ -234,7 +234,7 @@ sal_Int32 FormulaHelper::GetFunctionStart( const OUString& rFormula, ...@@ -234,7 +234,7 @@ sal_Int32 FormulaHelper::GetFunctionStart( const OUString& rFormula,
nParPos++; nParPos++;
nParPos++; nParPos++;
} }
else if ( (bFound = ( rFormula[nParPos] == '(' ) ) == sal_False ) else if ( (bFound = ( rFormula[nParPos] == '(' ) ) == false )
nParPos++; nParPos++;
} }
} }
...@@ -259,13 +259,13 @@ sal_Int32 FormulaHelper::GetFunctionStart( const OUString& rFormula, ...@@ -259,13 +259,13 @@ sal_Int32 FormulaHelper::GetFunctionStart( const OUString& rFormula,
} }
else // Brackets without function -> keep searching else // Brackets without function -> keep searching
{ {
bRepeat = sal_True; bRepeat = true;
if ( !bBack ) if ( !bBack )
nParPos++; nParPos++;
else if (nParPos > 0) else if (nParPos > 0)
nParPos--; nParPos--;
else else
bRepeat = sal_False; bRepeat = false;
} }
} }
else // No brackets found else // No brackets found
...@@ -291,7 +291,7 @@ sal_Int32 FormulaHelper::GetFunctionEnd( const OUString& rStr, sal_Int32 nStart ...@@ -291,7 +291,7 @@ sal_Int32 FormulaHelper::GetFunctionEnd( const OUString& rStr, sal_Int32 nStart
short nParCount = 0; short nParCount = 0;
bool bInArray = false; bool bInArray = false;
sal_Bool bFound = sal_False; bool bFound = false;
while ( !bFound && (nStart < nStrLen) ) while ( !bFound && (nStart < nStrLen) )
{ {
...@@ -309,10 +309,10 @@ sal_Int32 FormulaHelper::GetFunctionEnd( const OUString& rStr, sal_Int32 nStart ...@@ -309,10 +309,10 @@ sal_Int32 FormulaHelper::GetFunctionEnd( const OUString& rStr, sal_Int32 nStart
{ {
nParCount--; nParCount--;
if ( nParCount == 0 ) if ( nParCount == 0 )
bFound = sal_True; bFound = true;
else if ( nParCount < 0 ) else if ( nParCount < 0 )
{ {
bFound = sal_True; bFound = true;
nStart--; // read one too far nStart--; // read one too far
} }
} }
...@@ -328,7 +328,7 @@ sal_Int32 FormulaHelper::GetFunctionEnd( const OUString& rStr, sal_Int32 nStart ...@@ -328,7 +328,7 @@ sal_Int32 FormulaHelper::GetFunctionEnd( const OUString& rStr, sal_Int32 nStart
{ {
if ( !bInArray && nParCount == 0 ) if ( !bInArray && nParCount == 0 )
{ {
bFound = sal_True; bFound = true;
nStart--; // read one too far nStart--; // read one too far
} }
} }
...@@ -349,7 +349,7 @@ sal_Int32 FormulaHelper::GetArgStart( const OUString& rStr, sal_Int32 nStart, sa ...@@ -349,7 +349,7 @@ sal_Int32 FormulaHelper::GetArgStart( const OUString& rStr, sal_Int32 nStart, sa
short nParCount = 0; short nParCount = 0;
bool bInArray = false; bool bInArray = false;
sal_Bool bFound = sal_False; bool bFound = false;
while ( !bFound && (nStart < nStrLen) ) while ( !bFound && (nStart < nStrLen) )
{ {
......
...@@ -102,8 +102,8 @@ void ArgEdit::Init( ArgEdit* pPrevEdit, ArgEdit* pNextEdit, ...@@ -102,8 +102,8 @@ void ArgEdit::Init( ArgEdit* pPrevEdit, ArgEdit* pNextEdit,
void ArgEdit::KeyInput( const KeyEvent& rKEvt ) void ArgEdit::KeyInput( const KeyEvent& rKEvt )
{ {
KeyCode aCode = rKEvt.GetKeyCode(); KeyCode aCode = rKEvt.GetKeyCode();
sal_Bool bUp = (aCode.GetCode() == KEY_UP); bool bUp = (aCode.GetCode() == KEY_UP);
sal_Bool bDown = (aCode.GetCode() == KEY_DOWN); bool bDown = (aCode.GetCode() == KEY_DOWN);
if ( pSlider if ( pSlider
&& ( !aCode.IsShift() && !aCode.IsMod1() && !aCode.IsMod2() ) && ( !aCode.IsShift() && !aCode.IsMod1() && !aCode.IsMod2() )
...@@ -113,8 +113,8 @@ void ArgEdit::KeyInput( const KeyEvent& rKEvt ) ...@@ -113,8 +113,8 @@ void ArgEdit::KeyInput( const KeyEvent& rKEvt )
{ {
ArgEdit* pEd = NULL; ArgEdit* pEd = NULL;
long nThumb = pSlider->GetThumbPos(); long nThumb = pSlider->GetThumbPos();
sal_Bool bDoScroll = sal_False; bool bDoScroll = false;
sal_Bool bChangeFocus = sal_False; bool bChangeFocus = false;
if ( bDown ) if ( bDown )
{ {
...@@ -128,13 +128,13 @@ void ArgEdit::KeyInput( const KeyEvent& rKEvt ) ...@@ -128,13 +128,13 @@ void ArgEdit::KeyInput( const KeyEvent& rKEvt )
else else
{ {
pEd = pEdNext; pEd = pEdNext;
bChangeFocus = sal_True; bChangeFocus = true;
} }
} }
else if ( pEdNext ) else if ( pEdNext )
{ {
pEd = pEdNext; pEd = pEdNext;
bChangeFocus = sal_True; bChangeFocus = true;
} }
} }
else // if ( bUp ) else // if ( bUp )
...@@ -149,13 +149,13 @@ void ArgEdit::KeyInput( const KeyEvent& rKEvt ) ...@@ -149,13 +149,13 @@ void ArgEdit::KeyInput( const KeyEvent& rKEvt )
else else
{ {
pEd = pEdPrev; pEd = pEdPrev;
bChangeFocus = sal_True; bChangeFocus = true;
} }
} }
else if ( pEdPrev ) else if ( pEdPrev )
{ {
pEd = pEdPrev; pEd = pEdPrev;
bChangeFocus = sal_True; bChangeFocus = true;
} }
} }
...@@ -376,7 +376,7 @@ IMPL_LINK( ArgInput, EdModifyHdl,ArgEdit*, pEd ) ...@@ -376,7 +376,7 @@ IMPL_LINK( ArgInput, EdModifyHdl,ArgEdit*, pEd )
// class EditBox // class EditBox
EditBox::EditBox( Window* pParent, const ResId& rResId ) EditBox::EditBox( Window* pParent, const ResId& rResId )
:Control(pParent,rResId), :Control(pParent,rResId),
bMouseFlag(sal_False) bMouseFlag(false)
{ {
WinBits nStyle=GetStyle(); WinBits nStyle=GetStyle();
SetStyle( nStyle| WB_DIALOGCONTROL); SetStyle( nStyle| WB_DIALOGCONTROL);
...@@ -456,7 +456,7 @@ bool EditBox::PreNotify( NotifyEvent& rNEvt ) ...@@ -456,7 +456,7 @@ bool EditBox::PreNotify( NotifyEvent& rNEvt )
if(nSwitch==EVENT_MOUSEBUTTONDOWN || nSwitch==EVENT_MOUSEBUTTONUP) if(nSwitch==EVENT_MOUSEBUTTONDOWN || nSwitch==EVENT_MOUSEBUTTONUP)
{ {
bMouseFlag=sal_True; bMouseFlag=true;
Application::PostUserEvent( LINK( this, EditBox, ChangedHdl ) ); Application::PostUserEvent( LINK( this, EditBox, ChangedHdl ) );
} }
} }
......
...@@ -67,7 +67,7 @@ ParaWin::ParaWin(Window* pParent,IControlReferenceHandler* _pDlg,Point aPos): ...@@ -67,7 +67,7 @@ ParaWin::ParaWin(Window* pParent,IControlReferenceHandler* _pDlg,Point aPos):
aSlider ( this, ModuleRes( WND_SLIDER ) ), aSlider ( this, ModuleRes( WND_SLIDER ) ),
m_sOptional ( ModuleRes( STR_OPTIONAL ) ), m_sOptional ( ModuleRes( STR_OPTIONAL ) ),
m_sRequired ( ModuleRes( STR_REQUIRED ) ), m_sRequired ( ModuleRes( STR_REQUIRED ) ),
bRefMode (sal_False) bRefMode (false)
{ {
FreeResource(); FreeResource();
aDefaultString=aFtEditDesc.GetText(); aDefaultString=aFtEditDesc.GetText();
......
...@@ -83,7 +83,7 @@ private: ...@@ -83,7 +83,7 @@ private:
ScrollBar aSlider; ScrollBar aSlider;
OUString m_sOptional; OUString m_sOptional;
OUString m_sRequired; OUString m_sRequired;
sal_Bool bRefMode; bool bRefMode;
sal_uInt16 nEdFocus; sal_uInt16 nEdFocus;
sal_uInt16 nActiveLine; sal_uInt16 nActiveLine;
...@@ -132,8 +132,8 @@ public: ...@@ -132,8 +132,8 @@ public:
void UpdateParas(); void UpdateParas();
void ClearAll(); void ClearAll();
sal_Bool IsRefMode() {return bRefMode;} bool IsRefMode() {return bRefMode;}
void SetRefMode(sal_Bool bFlag) {bRefMode=bFlag;} void SetRefMode(bool bFlag) {bRefMode=bFlag;}
sal_uInt16 GetActiveLine(); sal_uInt16 GetActiveLine();
void SetActiveLine(sal_uInt16 no); void SetActiveLine(sal_uInt16 no);
......
...@@ -35,7 +35,7 @@ namespace formula ...@@ -35,7 +35,7 @@ namespace formula
StructListBox::StructListBox(Window* pParent, const ResId& rResId ): StructListBox::StructListBox(Window* pParent, const ResId& rResId ):
SvTreeListBox(pParent,rResId ) SvTreeListBox(pParent,rResId )
{ {
bActiveFlag=sal_False; bActiveFlag=false;
Font aFont( GetFont() ); Font aFont( GetFont() );
Size aSize = aFont.GetSize(); Size aSize = aFont.GetSize();
...@@ -53,31 +53,31 @@ SvTreeListEntry* StructListBox::InsertStaticEntry( ...@@ -53,31 +53,31 @@ SvTreeListEntry* StructListBox::InsertStaticEntry(
return pEntry; return pEntry;
} }
void StructListBox::SetActiveFlag(sal_Bool bFlag) void StructListBox::SetActiveFlag(bool bFlag)
{ {
bActiveFlag=bFlag; bActiveFlag=bFlag;
} }
sal_Bool StructListBox::GetActiveFlag() bool StructListBox::GetActiveFlag()
{ {
return bActiveFlag; return bActiveFlag;
} }
void StructListBox::MouseButtonDown( const MouseEvent& rMEvt ) void StructListBox::MouseButtonDown( const MouseEvent& rMEvt )
{ {
bActiveFlag=sal_True; bActiveFlag=true;
SvTreeListBox::MouseButtonDown(rMEvt); SvTreeListBox::MouseButtonDown(rMEvt);
} }
void StructListBox::GetFocus() void StructListBox::GetFocus()
{ {
bActiveFlag=sal_True; bActiveFlag=true;
SvTreeListBox::GetFocus(); SvTreeListBox::GetFocus();
} }
void StructListBox::LoseFocus() void StructListBox::LoseFocus()
{ {
bActiveFlag=sal_False; bActiveFlag=false;
SvTreeListBox::LoseFocus(); SvTreeListBox::LoseFocus();
} }
...@@ -105,14 +105,14 @@ StructPage::StructPage(Window* pParent): ...@@ -105,14 +105,14 @@ StructPage::StructPage(Window* pParent):
void StructPage::ClearStruct() void StructPage::ClearStruct()
{ {
aTlbStruct.SetActiveFlag(sal_False); aTlbStruct.SetActiveFlag(false);
aTlbStruct.Clear(); aTlbStruct.Clear();
} }
SvTreeListEntry* StructPage::InsertEntry( const OUString& rText, SvTreeListEntry* pParent, SvTreeListEntry* StructPage::InsertEntry( const OUString& rText, SvTreeListEntry* pParent,
sal_uInt16 nFlag,sal_uLong nPos,IFormulaToken* pIFormulaToken) sal_uInt16 nFlag,sal_uLong nPos,IFormulaToken* pIFormulaToken)
{ {
aTlbStruct.SetActiveFlag( sal_False ); aTlbStruct.SetActiveFlag( false );
SvTreeListEntry* pEntry = NULL; SvTreeListEntry* pEntry = NULL;
switch( nFlag ) switch( nFlag )
......
...@@ -41,7 +41,7 @@ class StructListBox : public SvTreeListBox ...@@ -41,7 +41,7 @@ class StructListBox : public SvTreeListBox
{ {
private: private:
sal_Bool bActiveFlag; bool bActiveFlag;
protected: protected:
virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
...@@ -58,8 +58,8 @@ public: ...@@ -58,8 +58,8 @@ public:
sal_uLong nPos = TREELIST_APPEND, sal_uLong nPos = TREELIST_APPEND,
IFormulaToken* pToken = NULL ); IFormulaToken* pToken = NULL );
void SetActiveFlag(sal_Bool bFlag=sal_True); void SetActiveFlag(bool bFlag=true);
sal_Bool GetActiveFlag(); bool GetActiveFlag();
void GetFocus() SAL_OVERRIDE; void GetFocus() SAL_OVERRIDE;
void LoseFocus() SAL_OVERRIDE; void LoseFocus() SAL_OVERRIDE;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment