From f309531cfe1d6a1b6ea1306d45ed3e121145bc5f Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 3 Oct 2016 23:12:38 -0400 Subject: Add a bit more description here. We are creating a formula string using the tokens from the previous cell to see what it would look like if the current cell was grouped with it, then perform string comparison to evaluate for grouping. Change-Id: I29b780d44bec16c0b42990837b70435e059c7594 Reviewed-on: https://gerrit.libreoffice.org/29516 Reviewed-by: Kohei Yoshida Tested-by: Kohei Yoshida --- sc/source/core/data/formulacell.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sc') 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 ); -- cgit