summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/formulacell.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 917fcd4d9b65..de5fc6809355 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1301,7 +1301,8 @@ void ScFormulaCell::CompileXML( sc::CompileFormulaContext& rCxt, ScProgress& rPr
ScFormulaCell *pPreviousCell = pDocument->GetFormulaCell( aPreviousCell );
if( pPreviousCell )
{
- // Now try to convert to a string quickly ...
+ // Build formula string using the tokens from the previous cell,
+ // but use the current cell position.
ScCompiler aBackComp( rCxt, aPos, *(pPreviousCell->pCode) );
OUStringBuffer aShouldBeBuf;
aBackComp.CreateStringFromTokenArray( aShouldBeBuf );