[ooo-build-commit] Branch 'ooo/OOO320' - sc/source

Jan Holesovsky kendy at kemper.freedesktop.org
Fri Jan 8 17:23:20 PST 2010


 sc/source/core/data/documen4.cxx |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 317284efe0c33f963da39896ac73452bfd388fd8
Author: Oliver Bolte <obo at openoffice.org>
Date:   Fri Jan 8 07:19:18 2010 +0000

    CWS-TOOLING: integrate CWS calc32stopper8
    2010-01-04 18:19:19 +0100 nn  r277850 : #i108005# build token array for goal seek with value instead of string token

diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index aa90414..fbac296 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -76,9 +76,13 @@ BOOL ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
         CellType eFType, eVType;
         GetCellType(nFCol, nFRow, nFTab, eFType);
         GetCellType(nVCol, nVRow, nVTab, eVType);
-        // CELLTYPE_NOTE: kein Value aber von Formel referiert
-        if (eFType == CELLTYPE_FORMULA && (eVType == CELLTYPE_VALUE
-                || eVType == CELLTYPE_NOTE) )
+        // CELLTYPE_NOTE: no value, but referenced by formula
+        // #i108005# convert target value to number using default format,
+        // 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;
             aRefData.InitFlags();
@@ -98,7 +102,7 @@ BOOL ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
 
             aArr.AddSingleReference( aRefData );
             aArr.AddOpCode( ocSep );
-            aArr.AddString( sValStr.GetBuffer() );
+            aArr.AddDouble( nTargetVal );
             aArr.AddOpCode( ocClose );
             aArr.AddOpCode( ocStop );
 


More information about the ooo-build-commit mailing list