summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--formula/source/ui/dlg/formula.cxx38
1 files changed, 15 insertions, 23 deletions
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index d6e39b62341b..8273597ceeb2 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -614,40 +614,32 @@ void FormulaDlg_Impl::UpdateValues( bool bForceRecalcStruct )
bool FormulaDlg_Impl::CalcStruct( const OUString& rStrExp, bool bForceRecalcStruct )
{
- bool bResult = true;
sal_Int32 nLength = rStrExp.getLength();
if ( !rStrExp.isEmpty() && (bForceRecalcStruct || m_aOldFormula != rStrExp) && m_bStructUpdate)
{
- // Only calculate the value when there isn't any more keyboard input:
+ m_pStructPage->ClearStruct();
- if ( !Application::AnyInput( VclInputFlags::KEYBOARD ) )
+ OUString aString = rStrExp;
+ if (rStrExp[nLength-1] == '(')
{
- m_pStructPage->ClearStruct();
-
- OUString aString = rStrExp;
- if (rStrExp[nLength-1] == '(')
- {
- aString = aString.copy( 0, nLength-1);
- }
+ aString = aString.copy( 0, nLength-1);
+ }
- aString = aString.replaceAll( "\n", "");
- OUString aStrResult;
+ aString = aString.replaceAll( "\n", "");
+ OUString aStrResult;
- if ( CalcValue( aString, aStrResult ) )
- m_pWndFormResult->SetText( aStrResult );
+ if ( CalcValue( aString, aStrResult ) )
+ m_pWndFormResult->SetText( aStrResult );
- UpdateTokenArray(aString);
- fillTree(m_pStructPage);
+ UpdateTokenArray(aString);
+ fillTree(m_pStructPage);
- m_aOldFormula = rStrExp;
- if (rStrExp[nLength-1] == '(')
- UpdateTokenArray(rStrExp);
- }
- else
- bResult = false;
+ m_aOldFormula = rStrExp;
+ if (rStrExp[nLength-1] == '(')
+ UpdateTokenArray(rStrExp);
}
- return bResult;
+ return true;
}