Kaydet (Commit) 9f12a629 authored tarafından Niklas Nebel's avatar Niklas Nebel

#i108005# build token array for goal seek with value instead of string token

üst a15b7f80
...@@ -76,9 +76,13 @@ BOOL ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab, ...@@ -76,9 +76,13 @@ BOOL ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
CellType eFType, eVType; CellType eFType, eVType;
GetCellType(nFCol, nFRow, nFTab, eFType); GetCellType(nFCol, nFRow, nFTab, eFType);
GetCellType(nVCol, nVRow, nVTab, eVType); GetCellType(nVCol, nVRow, nVTab, eVType);
// CELLTYPE_NOTE: kein Value aber von Formel referiert // CELLTYPE_NOTE: no value, but referenced by formula
if (eFType == CELLTYPE_FORMULA && (eVType == CELLTYPE_VALUE // #i108005# convert target value to number using default format,
|| eVType == CELLTYPE_NOTE) ) // as previously done in ScInterpreter::GetDouble
double nTargetVal = 0.0;
sal_uInt32 nFIndex = 0;
if (eFType == CELLTYPE_FORMULA && (eVType == CELLTYPE_VALUE || eVType == CELLTYPE_NOTE) &&
GetFormatTable()->IsNumberFormat(sValStr, nFIndex, nTargetVal))
{ {
ScSingleRefData aRefData; ScSingleRefData aRefData;
aRefData.InitFlags(); aRefData.InitFlags();
...@@ -98,7 +102,7 @@ BOOL ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab, ...@@ -98,7 +102,7 @@ BOOL ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
aArr.AddSingleReference( aRefData ); aArr.AddSingleReference( aRefData );
aArr.AddOpCode( ocSep ); aArr.AddOpCode( ocSep );
aArr.AddString( sValStr.GetBuffer() ); aArr.AddDouble( nTargetVal );
aArr.AddOpCode( ocClose ); aArr.AddOpCode( ocClose );
aArr.AddOpCode( ocStop ); aArr.AddOpCode( ocStop );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment