summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2016-10-03 23:12:38 -0400
committerKohei Yoshida <libreoffice@kohei.us>2016-10-04 03:47:50 +0000
commitf309531cfe1d6a1b6ea1306d45ed3e121145bc5f (patch)
tree2901bf9728af6fda28c14af2512f483f1fa5c4d0
parent191e0258427f2209f21384b4e4c685efda24ac03 (diff)
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 <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
-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 );