sal_Bool->bool

Change-Id: Id5cbf2c94e3d3ff27cdb8998e2b7b3b712b537ec
This commit is contained in:
Noel Grandin 2014-02-18 12:27:00 +02:00
parent 4003da2f87
commit ae2f7da4f9
4 changed files with 29 additions and 29 deletions

View File

@ -90,7 +90,7 @@ namespace formula
::std::pair<RefButton*,RefEdit*> ::std::pair<RefButton*,RefEdit*>
RefInputStartBefore( RefEdit* pEdit, RefButton* pButton ); RefInputStartBefore( RefEdit* pEdit, RefButton* pButton );
void RefInputStartAfter( RefEdit* pEdit, RefButton* pButton ); void RefInputStartAfter( RefEdit* pEdit, RefButton* pButton );
void RefInputDoneAfter( sal_Bool bForced ); void RefInputDoneAfter( bool bForced );
sal_Bool CalcValue( const OUString& rStrExp, OUString& rStrResult ); sal_Bool CalcValue( const OUString& rStrExp, OUString& rStrResult );
sal_Bool CalcStruct( const OUString& rStrExp); sal_Bool CalcStruct( const OUString& rStrExp);
void UpdateValues(); void UpdateValues();
@ -114,17 +114,17 @@ namespace formula
void SaveArg( sal_uInt16 nEd ); void SaveArg( sal_uInt16 nEd );
void UpdateSelection(); void UpdateSelection();
void DoEnter( sal_Bool bOk ); void DoEnter( bool bOk );
void FillListboxes(); void FillListboxes();
void FillControls(sal_Bool &rbNext, sal_Bool &rbPrev); void FillControls(sal_Bool &rbNext, sal_Bool &rbPrev);
FormulaDlgMode SetMeText(const OUString& _sText, sal_Int32 PrivStart, sal_Int32 PrivEnd, sal_Bool bMatrix,sal_Bool _bSelect,sal_Bool _bUpdate); FormulaDlgMode SetMeText(const OUString& _sText, sal_Int32 PrivStart, sal_Int32 PrivEnd, bool bMatrix, bool _bSelect, bool _bUpdate);
void SetMeText(const OUString& _sText); void SetMeText(const OUString& _sText);
sal_Bool CheckMatrix(OUString& aFormula /*IN/OUT*/); bool CheckMatrix(OUString& aFormula /*IN/OUT*/);
void SetEdSelection(); void SetEdSelection();
sal_Bool UpdateParaWin(Selection& _rSelection); bool UpdateParaWin(Selection& _rSelection);
void UpdateParaWin(const Selection& _rSelection,const OUString& _sRefStr); void UpdateParaWin(const Selection& _rSelection,const OUString& _sRefStr);
void SetData(sal_Int32 nFStart, sal_Int32 nNextFStart, sal_Int32 nNextFEnd, sal_Int32& PrivStart, sal_Int32& PrivEnd); void SetData(sal_Int32 nFStart, sal_Int32 nNextFStart, sal_Int32 nNextFEnd, sal_Int32& PrivStart, sal_Int32& PrivEnd);
@ -957,7 +957,7 @@ OUString FormulaDlg_Impl::RepairFormula(const OUString& aFormula)
return aResult; return aResult;
} }
void FormulaDlg_Impl::DoEnter(sal_Bool bOk) void FormulaDlg_Impl::DoEnter(bool bOk)
{ {
// Accept input to the document or cancel // Accept input to the document or cancel
if ( bOk) if ( bOk)
@ -984,11 +984,11 @@ IMPL_LINK( FormulaDlg_Impl, BtnHdl, PushButton*, pBtn )
{ {
if ( pBtn == &aBtnCancel ) if ( pBtn == &aBtnCancel )
{ {
DoEnter(sal_False); // closes the Dialog DoEnter(false); // closes the Dialog
} }
else if ( pBtn == &aBtnEnd ) else if ( pBtn == &aBtnEnd )
{ {
DoEnter(sal_True); // closes the Dialog DoEnter(true); // closes the Dialog
} }
else if ( pBtn == &aBtnForward ) else if ( pBtn == &aBtnForward )
{ {
@ -1436,7 +1436,7 @@ void FormulaDlg_Impl::RefInputStartAfter( RefEdit* /*pEdit*/, RefButton* /*pButt
m_pParent->SetText( MnemonicGenerator::EraseAllMnemonicChars( aStr ) ); m_pParent->SetText( MnemonicGenerator::EraseAllMnemonicChars( aStr ) );
} }
} }
void FormulaDlg_Impl::RefInputDoneAfter( sal_Bool bForced ) void FormulaDlg_Impl::RefInputDoneAfter( bool bForced )
{ {
aRefBtn.SetStartImage(); aRefBtn.SetStartImage();
if( bForced || !aRefBtn.IsVisible() ) if( bForced || !aRefBtn.IsVisible() )
@ -1490,7 +1490,7 @@ void FormulaDlg_Impl::SetMeText(const OUString& _sText)
pMEdit->SetSelection( pData->GetSelection()); pMEdit->SetSelection( pData->GetSelection());
aMEFormula.UpdateOldSel(); aMEFormula.UpdateOldSel();
} }
FormulaDlgMode FormulaDlg_Impl::SetMeText(const OUString& _sText, sal_Int32 PrivStart, sal_Int32 PrivEnd, sal_Bool bMatrix, sal_Bool _bSelect, sal_Bool _bUpdate) FormulaDlgMode FormulaDlg_Impl::SetMeText(const OUString& _sText, sal_Int32 PrivStart, sal_Int32 PrivEnd, bool bMatrix, bool _bSelect, bool _bUpdate)
{ {
FormulaDlgMode eMode = FORMULA_FORMDLG_FORMULA; FormulaDlgMode eMode = FORMULA_FORMDLG_FORMULA;
if(!bEditFlag) if(!bEditFlag)
@ -1509,11 +1509,11 @@ FormulaDlgMode FormulaDlg_Impl::SetMeText(const OUString& _sText, sal_Int32 Priv
} // if ( _bUpdate ) } // if ( _bUpdate )
return eMode; return eMode;
} }
sal_Bool FormulaDlg_Impl::CheckMatrix(OUString& aFormula) bool FormulaDlg_Impl::CheckMatrix(OUString& aFormula)
{ {
pMEdit->GrabFocus(); pMEdit->GrabFocus();
sal_Int32 nLen = aFormula.getLength(); sal_Int32 nLen = aFormula.getLength();
sal_Bool bMatrix = nLen > 3 // Matrix-Formula bool bMatrix = nLen > 3 // Matrix-Formula
&& aFormula[0] == '{' && aFormula[0] == '{'
&& aFormula[1] == '=' && aFormula[1] == '='
&& aFormula[nLen-1] == '}'; && aFormula[nLen-1] == '}';
@ -1594,7 +1594,7 @@ void FormulaDlg_Impl::UpdateParaWin(const Selection& _rSelection, const OUString
pParaWin->SetRefMode(sal_False); pParaWin->SetRefMode(sal_False);
} }
sal_Bool FormulaDlg_Impl::UpdateParaWin(Selection& _rSelection) bool FormulaDlg_Impl::UpdateParaWin(Selection& _rSelection)
{ {
pParaWin->SetRefMode(sal_True); pParaWin->SetRefMode(sal_True);
@ -1667,7 +1667,7 @@ void FormulaModalDialog::SetMeText(const OUString& _sText)
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
sal_Bool FormulaModalDialog::CheckMatrix(OUString& aFormula) bool FormulaModalDialog::CheckMatrix(OUString& aFormula)
{ {
return m_pImpl->CheckMatrix(aFormula); return m_pImpl->CheckMatrix(aFormula);
} }
@ -1684,7 +1684,7 @@ void FormulaModalDialog::RefInputStartAfter( RefEdit* pEdit, RefButton* pButton
{ {
m_pImpl->RefInputStartAfter( pEdit, pButton ); m_pImpl->RefInputStartAfter( pEdit, pButton );
} }
void FormulaModalDialog::RefInputDoneAfter( sal_Bool bForced ) void FormulaModalDialog::RefInputDoneAfter( bool bForced )
{ {
m_pImpl->RefInputDoneAfter( bForced ); m_pImpl->RefInputDoneAfter( bForced );
} }
@ -1756,7 +1756,7 @@ void FormulaDlg::SetMeText(const OUString& _sText)
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
FormulaDlgMode FormulaDlg::SetMeText(const OUString& _sText, sal_Int32 PrivStart, sal_Int32 PrivEnd, sal_Bool bMatrix, sal_Bool _bSelect, sal_Bool _bUpdate) FormulaDlgMode FormulaDlg::SetMeText(const OUString& _sText, sal_Int32 PrivStart, sal_Int32 PrivEnd, bool bMatrix, bool _bSelect, bool _bUpdate)
{ {
return m_pImpl->SetMeText(_sText,PrivStart, PrivEnd,bMatrix,_bSelect,_bUpdate); return m_pImpl->SetMeText(_sText,PrivStart, PrivEnd,bMatrix,_bSelect,_bUpdate);
} }
@ -1766,7 +1766,7 @@ void FormulaDlg::CheckMatrix()
m_pImpl->aBtnMatrix.Check(); m_pImpl->aBtnMatrix.Check();
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
sal_Bool FormulaDlg::CheckMatrix(OUString& aFormula) bool FormulaDlg::CheckMatrix(OUString& aFormula)
{ {
return m_pImpl->CheckMatrix(aFormula); return m_pImpl->CheckMatrix(aFormula);
} }
@ -1784,7 +1784,7 @@ void FormulaDlg::Update()
m_pImpl->aTimer.Start(); m_pImpl->aTimer.Start();
} }
void FormulaDlg::DoEnter(sal_Bool _bOk) void FormulaDlg::DoEnter(bool _bOk)
{ {
m_pImpl->DoEnter(_bOk); m_pImpl->DoEnter(_bOk);
} }
@ -1796,7 +1796,7 @@ void FormulaDlg::RefInputStartAfter( RefEdit* pEdit, RefButton* pButton )
{ {
m_pImpl->RefInputStartAfter( pEdit, pButton ); m_pImpl->RefInputStartAfter( pEdit, pButton );
} }
void FormulaDlg::RefInputDoneAfter( sal_Bool bForced ) void FormulaDlg::RefInputDoneAfter( bool bForced )
{ {
m_pImpl->RefInputDoneAfter( bForced ); m_pImpl->RefInputDoneAfter( bForced );
} }
@ -1847,7 +1847,7 @@ void FormulaDlg::UpdateParaWin(const Selection& _rSelection,const OUString& _sRe
{ {
m_pImpl->UpdateParaWin(_rSelection,_sRefStr); m_pImpl->UpdateParaWin(_rSelection,_sRefStr);
} }
sal_Bool FormulaDlg::UpdateParaWin(Selection& _rSelection) bool FormulaDlg::UpdateParaWin(Selection& _rSelection)
{ {
return m_pImpl->UpdateParaWin(_rSelection); return m_pImpl->UpdateParaWin(_rSelection);
} }

View File

@ -67,12 +67,12 @@ protected:
virtual bool PreNotify( NotifyEvent& rNEvt ); virtual bool PreNotify( NotifyEvent& rNEvt );
::std::pair<RefButton*,RefEdit*> RefInputStartBefore( RefEdit* pEdit, RefButton* pButton = NULL ); ::std::pair<RefButton*,RefEdit*> RefInputStartBefore( RefEdit* pEdit, RefButton* pButton = NULL );
void RefInputStartAfter( RefEdit* pEdit, RefButton* pButton = NULL ); void RefInputStartAfter( RefEdit* pEdit, RefButton* pButton = NULL );
void RefInputDoneAfter( sal_Bool bForced = sal_False ); void RefInputDoneAfter( bool bForced = false );
void SetFocusWin(Window *pWin,const OString& nUniqueId); void SetFocusWin(Window *pWin,const OString& nUniqueId);
void SetMeText(const OUString& _sText); void SetMeText(const OUString& _sText);
void Update(); void Update();
sal_Bool CheckMatrix(OUString& aFormula /*IN/OUT*/); bool CheckMatrix(OUString& aFormula /*IN/OUT*/);
void Update(const OUString& _sExp); void Update(const OUString& _sExp);
void StoreFormEditData(FormEditData* pData); void StoreFormEditData(FormEditData* pData);
@ -111,20 +111,20 @@ protected:
virtual bool PreNotify( NotifyEvent& rNEvt ); virtual bool PreNotify( NotifyEvent& rNEvt );
::std::pair<RefButton*,RefEdit*> RefInputStartBefore( RefEdit* pEdit, RefButton* pButton = NULL ); ::std::pair<RefButton*,RefEdit*> RefInputStartBefore( RefEdit* pEdit, RefButton* pButton = NULL );
void RefInputStartAfter( RefEdit* pEdit, RefButton* pButton = NULL ); void RefInputStartAfter( RefEdit* pEdit, RefButton* pButton = NULL );
void RefInputDoneAfter( sal_Bool bForced = sal_False ); void RefInputDoneAfter( bool bForced = false );
void SetFocusWin(Window *pWin,const OString& nUniqueId); void SetFocusWin(Window *pWin,const OString& nUniqueId);
void HighlightFunctionParas(const OUString& aFormula); void HighlightFunctionParas(const OUString& aFormula);
void SetMeText(const OUString& _sText); void SetMeText(const OUString& _sText);
FormulaDlgMode SetMeText(const OUString& _sText, sal_Int32 PrivStart, sal_Int32 PrivEnd, sal_Bool bMatrix, sal_Bool _bSelect, sal_Bool _bUpdate); FormulaDlgMode SetMeText(const OUString& _sText, sal_Int32 PrivStart, sal_Int32 PrivEnd, bool bMatrix, bool _bSelect, bool _bUpdate);
void Update(); void Update();
sal_Bool CheckMatrix(OUString& aFormula /*IN/OUT*/); bool CheckMatrix(OUString& aFormula /*IN/OUT*/);
OUString GetMeText() const; OUString GetMeText() const;
void Update(const OUString& _sExp); void Update(const OUString& _sExp);
void CheckMatrix(); void CheckMatrix();
void DoEnter(sal_Bool _bOk); void DoEnter(bool _bOk);
const IFunctionDescription* getCurrentFunctionDescription() const; const IFunctionDescription* getCurrentFunctionDescription() const;
sal_Bool UpdateParaWin(Selection& _rSelection); bool UpdateParaWin(Selection& _rSelection);
void UpdateParaWin(const Selection& _rSelection, const OUString& _sRefStr); void UpdateParaWin(const Selection& _rSelection, const OUString& _sRefStr);
RefEdit* GetActiveEdit(); RefEdit* GetActiveEdit();
void SetEdSelection(); void SetEdSelection();

View File

@ -231,7 +231,7 @@ IMPL_LINK( FormulaDialog, OnClickHdl, OAddFieldWindow* ,_pAddFieldDlg)
} }
m_pEdit = NULL; m_pEdit = NULL;
_pAddFieldDlg->Hide(); _pAddFieldDlg->Hide();
RefInputDoneAfter( sal_True ); RefInputDoneAfter( true );
return 0L; return 0L;
} }

View File

@ -159,7 +159,7 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
sal_Int32 PrivStart, PrivEnd; sal_Int32 PrivStart, PrivEnd;
pScMod->InputGetSelection( PrivStart, PrivEnd); pScMod->InputGetSelection( PrivStart, PrivEnd);
eMode = SetMeText(pScMod->InputGetFormulaStr(),PrivStart, PrivEnd,bMatrix,sal_True,sal_True); eMode = SetMeText(pScMod->InputGetFormulaStr(),PrivStart, PrivEnd, bMatrix, true, true);
pData->SetFStart( nFStart ); pData->SetFStart( nFStart );
} }
else else