summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--formula/inc/formula/FormulaCompiler.hxx3
-rw-r--r--formula/source/ui/dlg/formula.cxx5
2 files changed, 7 insertions, 1 deletions
diff --git a/formula/inc/formula/FormulaCompiler.hxx b/formula/inc/formula/FormulaCompiler.hxx
index 9aa65ba30d..4be65adb75 100644
--- a/formula/inc/formula/FormulaCompiler.hxx
+++ b/formula/inc/formula/FormulaCompiler.hxx
@@ -219,6 +219,9 @@ public:
*/
OpCode GetEnglishOpCode( const String& rName ) const;
+ void SetCompileForFAP( BOOL bVal )
+ { bCompileForFAP = bVal; bIgnoreErrors = bVal; }
+
static BOOL DeQuote( String& rStr );
static const String& GetNativeSymbol( OpCode eOp );
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 35e16e5b7c..ecd0563472 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -675,8 +675,10 @@ void FormulaDlg_Impl::MakeTree(IStructHelper* _pTree,SvLBoxEntry* pParent,Formul
long nParas = _pToken->GetParamCount();
OpCode eOp = _pToken->GetOpCode();
+ // #i101512# for output, the original token is needed
+ FormulaToken* pOrigToken = (_pToken->GetType() == svFAP) ? _pToken->GetFAPOrigToken() : _pToken;
uno::Sequence<sheet::FormulaToken> aArgs(1);
- aArgs[0] = m_aTokenMap.find(_pToken)->second;
+ aArgs[0] = m_aTokenMap.find(pOrigToken)->second;
try
{
const String aResult = m_pHelper->getFormulaParser()->printFormula(aArgs);
@@ -766,6 +768,7 @@ void FormulaDlg_Impl::UpdateTokenArray( const String& rStrExp)
} // if ( pTokens && nLen == m_aTokenList.getLength() )
FormulaCompiler aCompiler(*m_pTokenArray.get());
+ aCompiler.SetCompileForFAP(TRUE); // #i101512# special handling is needed
aCompiler.CompileTokenArray();
}