-rw-r--r-- | noncore/apps/opie-sheet/ChangeLog | 4 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/sheet.cpp | 10 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/sheet.h | 2 |
3 files changed, 11 insertions, 5 deletions
diff --git a/noncore/apps/opie-sheet/ChangeLog b/noncore/apps/opie-sheet/ChangeLog index 56887c5..e8a31ee 100644 --- a/noncore/apps/opie-sheet/ChangeLog +++ b/noncore/apps/opie-sheet/ChangeLog @@ -1 +1,5 @@ +January 8, 2004 + - fixed issue : "-if someone enters directly text as parameter to a string function the text renders as uppercase due to the calculation engine that uppercases all the parsing sentence." + now the text is handled correctly. + January 7, 2004 diff --git a/noncore/apps/opie-sheet/sheet.cpp b/noncore/apps/opie-sheet/sheet.cpp index 103b83b..e1e4744 100644 --- a/noncore/apps/opie-sheet/sheet.cpp +++ b/noncore/apps/opie-sheet/sheet.cpp @@ -911,3 +911,3 @@ double Sheet::functionCountIf(const QString ¶m1, const QString ¶m2, cons -QString Sheet::calculateFunction(const QString &function, const QString ¶meters, int NumOfParams) +QString Sheet::calculateFunction(const QString &func, const QString ¶meters, int NumOfParams) { @@ -920,2 +920,4 @@ QString Sheet::calculateFunction(const QString &function, const QString ¶met //basic functions + QString function; + function=func.upper(); if (function=="+") @@ -1779,3 +1781,3 @@ QString Sheet::dataParserHelper(const QString &data) { - stack1.push(new QString(*s1)); + stack1.push(new QString(QString(*s1).upper())); //printf("Parse:Var=%s\r\n",s1->latin1()); @@ -1803,3 +1805,3 @@ QString Sheet::dataParserHelper(const QString &data) tempval=calculateFunction(*s1,params,args); - tempval=tempval.upper(); + tempval=tempval; stack1.push(new QString(tempval)); @@ -1827,3 +1829,3 @@ QString Sheet::dataParser(const QString &cell, const QString &data) // printf("DATAPARSER: data=%s, cell=%s\r\n",data.ascii(),cell.ascii()); - strippedData=dataParserHelper(strippedData.remove(0, 1).upper().replace(QRegExp(":"), ",")); + strippedData=dataParserHelper(strippedData.remove(0, 1).replace(QRegExp(":"), ",")); diff --git a/noncore/apps/opie-sheet/sheet.h b/noncore/apps/opie-sheet/sheet.h index 41f1b86..f705cd0 100644 --- a/noncore/apps/opie-sheet/sheet.h +++ b/noncore/apps/opie-sheet/sheet.h @@ -102,3 +102,3 @@ class Sheet: public QTable QString calculateVariable(const QString &variable); - QString calculateFunction(const QString &function, const QString ¶meters, int NumOfParams); + QString calculateFunction(const QString &func, const QString ¶meters, int NumOfParams); QString getParameter(const QString ¶meters, int paramNo, bool giveError=FALSE, const QString funcName=""); |