summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2013-06-26 22:08:09 +0100
committerMichael Meeks <michael.meeks@suse.com>2013-06-27 19:34:39 +0100
commit5cedd85bdccd6275ba146aaa68ecd3d63d60c60c (patch)
tree5d9728ee8d4c1545ea34b6f093eee54604531aee
parentf4ea3fd5c1ee0e26be8383b0cc209a0d8de3f433 (diff)
Use new method for returning values.
-rw-r--r--sc/source/core/tool/formulagroup.cxx21
1 files changed, 4 insertions, 17 deletions
diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx
index 2262cc5e153b..9d9b504a09c9 100644
--- a/sc/source/core/tool/formulagroup.cxx
+++ b/sc/source/core/tool/formulagroup.cxx
@@ -42,8 +42,8 @@ TimeValue aTimeBefore, aTimeAfter;
bool FormulaGroupInterpreter::interpret()
{
#if HAVE_FEATURE_OPENCL
- size_t rowSize = mxGroup->mnLength, srcSize = 0;
- fprintf(stderr,"rowSize at begin is ...%ld.\n",rowSize);
+ size_t rowSize = mxGroup->mnLength; //, srcSize = 0;
+ fprintf(stderr,"rowSize at begin is ...%ld.\n",(long)rowSize);
int *rangeStart =NULL; // The first position for calculation,for example,the A1 in (=MAX(A1:A100))
int *rangeEnd = NULL; // The last position for calculation,for example, the A100 in (=MAX(A1:A100))
// The row quantity can be gotten from p2->GetArrayLength()
@@ -236,21 +236,8 @@ bool FormulaGroupInterpreter::interpret()
// fprintf(stderr,"After GPU,rRsults[%d] is ...%f\n",i,rResult[i]);
// }
-// We want to stuff the double data, which in rResult[i] from GPU calculated well, to UI view for users
- ScAddress aInsertPos = maTopPos;
- for (sal_Int32 i = 0; i < mxGroup->mnLength; ++i)
- {
- aInsertPos.SetRow(mxGroup->mnStart + i);
- ScFormulaCell* pDestx = mrDoc.GetFormulaCell(aInsertPos);
-
- SAL_DEBUG(" put value " << rResult[i] << " into formula at " << aInsertPos.Col() << " , " << aInsertPos.Row() );
- assert(pDestx);
-
- formula::FormulaTokenRef xResult = new formula::FormulaDoubleToken(rResult[i]);
- pDestx->SetResultToken(xResult.get());
- pDestx->ResetDirty();
- pDestx->SetChanged(true);
- }
+ // Insert the double data, in rResult[i] back into the document
+ mrDoc.SetFormulaResults(maTopPos, rResult, mxGroup->mnLength);
}
if(leftData)