diff options
Diffstat (limited to 'sc/source/ui/formdlg/formula.cxx')
-rw-r--r-- | sc/source/ui/formdlg/formula.cxx | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx index d2da590cdc07..14a4e0023efa 100644 --- a/sc/source/ui/formdlg/formula.cxx +++ b/sc/source/ui/formdlg/formula.cxx @@ -107,7 +107,7 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW, { pScViewShell = PTR_CAST( ScTabViewShell, pMyViewFrm->GetViewShell() ); if( pScViewShell ) - pScViewShell->UpdateInputHandler(TRUE); + pScViewShell->UpdateInputHandler(true); } } } @@ -127,10 +127,10 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW, if ( pInputHdl ) pInputHdl->NotifyChange( NULL ); - m_aHelper.enableInput( FALSE ); + m_aHelper.enableInput( false ); m_aHelper.EnableSpreadsheets(); m_aHelper.Init(); - m_aHelper.SetDispatcherLock( TRUE ); + m_aHelper.SetDispatcherLock( sal_True ); notifyChange(); fill(); @@ -160,26 +160,26 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW, String aFormula; pDoc->GetFormula( nCol, nRow, nTab, aFormula ); - BOOL bEdit = ( aFormula.Len() > 1 ); - BOOL bMatrix = FALSE; + sal_Bool bEdit = ( aFormula.Len() > 1 ); + sal_Bool bMatrix = false; if ( bEdit ) { bMatrix = CheckMatrix(aFormula); xub_StrLen nFStart = 0; xub_StrLen nFEnd = 0; - if ( GetFormulaHelper().GetNextFunc( aFormula, FALSE, nFStart, &nFEnd) ) + if ( GetFormulaHelper().GetNextFunc( aFormula, false, nFStart, &nFEnd) ) { pScMod->InputReplaceSelection( aFormula ); pScMod->InputSetSelection( nFStart, nFEnd ); xub_StrLen PrivStart, PrivEnd; pScMod->InputGetSelection( PrivStart, PrivEnd); - eMode = SetMeText(pScMod->InputGetFormulaStr(),PrivStart, PrivEnd,bMatrix,TRUE,TRUE); + eMode = SetMeText(pScMod->InputGetFormulaStr(),PrivStart, PrivEnd,bMatrix,sal_True,sal_True); pData->SetFStart( nFStart ); } else - bEdit = FALSE; + bEdit = false; } if ( !bEdit ) @@ -192,12 +192,12 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW, pScMod->InputSetSelection( 1, aNewFormula.Len()+1 ); xub_StrLen PrivStart, PrivEnd; pScMod->InputGetSelection( PrivStart, PrivEnd); - SetMeText(pScMod->InputGetFormulaStr(),PrivStart, PrivEnd,bMatrix,FALSE,FALSE); + SetMeText(pScMod->InputGetFormulaStr(),PrivStart, PrivEnd,bMatrix,false,false); pData->SetFStart( 1 ); // hinter dem "=" } - pData->SetMode( (USHORT) eMode ); + pData->SetMode( (sal_uInt16) eMode ); String rStrExp = GetMeText(); pCell = new ScFormulaCell( pDoc, aCursorPos, rStrExp ); @@ -279,9 +279,9 @@ ScFormulaDlg::~ScFormulaDlg() delete pCell; } -BOOL ScFormulaDlg::IsInputHdl(ScInputHandler* pHdl) +sal_Bool ScFormulaDlg::IsInputHdl(ScInputHandler* pHdl) { - BOOL bAlive = FALSE; + sal_Bool bAlive = false; // gehoert der InputHandler zu irgendeiner ViewShell ? @@ -290,7 +290,7 @@ BOOL ScFormulaDlg::IsInputHdl(ScInputHandler* pHdl) while ( pSh && !bAlive ) { if (((ScTabViewShell*)pSh)->GetInputHandler() == pHdl) - bAlive = TRUE; + bAlive = sal_True; pSh = SfxViewShell::GetNext( *pSh, &aScType ); } @@ -320,10 +320,10 @@ ScInputHandler* ScFormulaDlg::GetNextInputHandler(ScDocShell* pDocShell,PtrTabVi } -BOOL ScFormulaDlg::Close() +sal_Bool ScFormulaDlg::Close() { - DoEnter(FALSE); - return TRUE; + DoEnter(false); + return sal_True; } // -------------------------------------------------------------------------- @@ -331,7 +331,7 @@ BOOL ScFormulaDlg::Close() // -------------------------------------------------------------------------- bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult ) { - BOOL bResult = TRUE; + sal_Bool bResult = sal_True; ::std::auto_ptr<ScFormulaCell> pFCell( new ScFormulaCell( pDoc, aCursorPos, rStrExp ) ); @@ -339,7 +339,7 @@ bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult ) // wenn ein Name eigentlich als Bereich in die Gesamt-Formel // eingefuegt wird, bei der Einzeldarstellung aber als // single-Zellbezug interpretiert wird - BOOL bColRowName = pCell->HasColRowName(); + sal_Bool bColRowName = pCell->HasColRowName(); if ( bColRowName ) { // ColRowName im RPN-Code? @@ -352,10 +352,10 @@ bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult ) pFCell.reset( new ScFormulaCell( pDoc, aCursorPos, aBraced ) ); } else - bColRowName = FALSE; + bColRowName = false; } - USHORT nErrCode = pFCell->GetErrCode(); + sal_uInt16 nErrCode = pFCell->GetErrCode(); if ( nErrCode == 0 ) { SvNumberFormatter& aFormatter = *(pDoc->GetFormatTable()); @@ -363,7 +363,7 @@ bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult ) if ( pFCell->IsValue() ) { double n = pFCell->GetValue(); - ULONG nFormat = aFormatter.GetStandardFormat( n, 0, + sal_uLong nFormat = aFormatter.GetStandardFormat( n, 0, pFCell->GetFormatType(), ScGlobal::eLnge ); aFormatter.GetOutputString( n, nFormat, rStrResult, &pColor ); @@ -373,7 +373,7 @@ bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult ) String aStr; pFCell->GetString( aStr ); - ULONG nFormat = aFormatter.GetStandardFormat( + sal_uLong nFormat = aFormatter.GetStandardFormat( pFCell->GetFormatType(), ScGlobal::eLnge); aFormatter.GetOutputString( aStr, nFormat, rStrResult, &pColor ); @@ -405,7 +405,7 @@ void ScFormulaDlg::RefInputStart( formula::RefEdit* pEdit, formula::RefButton* p m_aHelper.RefInputStart( aPair.second, aPair.first); RefInputStartAfter( aPair.second, aPair.first ); } -void ScFormulaDlg::RefInputDone( BOOL bForced ) +void ScFormulaDlg::RefInputDone( sal_Bool bForced ) { m_aHelper.RefInputDone( bForced ); RefInputDoneAfter( bForced ); @@ -417,7 +417,7 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc ) if ( pFunc && pFunc->getSuppressedArgumentCount() > 0 ) { Selection theSel; - BOOL bRefNull = UpdateParaWin(theSel); + sal_Bool bRefNull = UpdateParaWin(theSel); if ( rRef.aStart != rRef.aEnd && bRefNull ) { @@ -425,7 +425,7 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc ) } String aRefStr; - BOOL bOtherDoc = ( pRefDoc != pDoc && pRefDoc->GetDocumentShell()->HasName() ); + sal_Bool bOtherDoc = ( pRefDoc != pDoc && pRefDoc->GetDocumentShell()->HasName() ); if ( bOtherDoc ) { // Referenz auf anderes Dokument - wie inputhdl.cxx @@ -472,21 +472,21 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc ) } } -BOOL ScFormulaDlg::IsRefInputMode() const +sal_Bool ScFormulaDlg::IsRefInputMode() const { const IFunctionDescription* pDesc = getCurrentFunctionDescription(); - BOOL bRef = (pDesc && (pDesc->getSuppressedArgumentCount() > 0)) && (pDoc!=NULL); + sal_Bool bRef = (pDesc && (pDesc->getSuppressedArgumentCount() > 0)) && (pDoc!=NULL); return bRef; } -BOOL ScFormulaDlg::IsDocAllowed(SfxObjectShell* pDocSh) const +sal_Bool ScFormulaDlg::IsDocAllowed(SfxObjectShell* pDocSh) const { // not allowed: different from this doc, and no name // pDocSh is always a ScDocShell if ( pDocSh && ((ScDocShell*)pDocSh)->GetDocument() != pDoc && !pDocSh->HasName() ) - return FALSE; + return false; - return TRUE; // everything else is allowed + return sal_True; // everything else is allowed } void ScFormulaDlg::SetActive() @@ -508,7 +508,7 @@ void ScFormulaDlg::SaveLRUEntry(const ScFuncDesc* pFuncDescP) } } -void ScFormulaDlg::doClose(BOOL /*_bOk*/) +void ScFormulaDlg::doClose(sal_Bool /*_bOk*/) { m_aHelper.DoClose( ScFormulaDlgWrapper::GetChildWindowId() ); } @@ -525,7 +525,7 @@ void ScFormulaDlg::ShowReference(const String& _sFormula) { m_aHelper.ShowReference(_sFormula); } -void ScFormulaDlg::HideReference( BOOL bDoneRefMode ) +void ScFormulaDlg::HideReference( sal_Bool bDoneRefMode ) { m_aHelper.HideReference(bDoneRefMode); } @@ -537,10 +537,10 @@ void ScFormulaDlg::AddRefEntry( ) { } -BOOL ScFormulaDlg::IsTableLocked( ) const +sal_Bool ScFormulaDlg::IsTableLocked( ) const { // per Default kann bei Referenzeingabe auch die Tabelle umgeschaltet werden - return FALSE; + return false; } void ScFormulaDlg::ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton) { @@ -550,7 +550,7 @@ void ScFormulaDlg::ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pB { m_aHelper.ReleaseFocus(pEdit,pButton); } -void ScFormulaDlg::dispatch(BOOL _bOK,BOOL _bMartixChecked) +void ScFormulaDlg::dispatch(sal_Bool _bOK,sal_Bool _bMartixChecked) { SfxBoolItem aRetItem( SID_DLG_RETOK, _bOK ); SfxBoolItem aMatItem( SID_DLG_MATRIX, _bMartixChecked ); @@ -559,9 +559,9 @@ void ScFormulaDlg::dispatch(BOOL _bOK,BOOL _bMartixChecked) // Wenn durch Dokument-Umschalterei die Eingabezeile weg war/ist, // ist der String leer. Dann nicht die alte Formel loeschen. if ( !aStrItem.GetValue().Len() ) - aRetItem.SetValue( FALSE ); // FALSE = Cancel + aRetItem.SetValue( false ); // sal_False = Cancel - m_aHelper.SetDispatcherLock( FALSE ); // Modal-Modus ausschalten + m_aHelper.SetDispatcherLock( false ); // Modal-Modus ausschalten clear(); @@ -569,7 +569,7 @@ void ScFormulaDlg::dispatch(BOOL _bOK,BOOL _bMartixChecked) SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aRetItem, &aStrItem, &aMatItem, 0L ); } -void ScFormulaDlg::setDispatcherLock( BOOL bLock ) +void ScFormulaDlg::setDispatcherLock( sal_Bool bLock ) { m_aHelper.SetDispatcherLock( bLock ); } |