author | hayzel <hayzel> | 2004-01-08 12:12:30 (UTC) |
---|---|---|
committer | hayzel <hayzel> | 2004-01-08 12:12:30 (UTC) |
commit | 3cb4363abdb17d2898b4792390672375ffcd2493 (patch) (unidiff) | |
tree | a4debe153e781bb76a87b42362215800c81704d4 | |
parent | b25818faa882c1eb040f74e485cd981b94871a61 (diff) | |
download | opie-3cb4363abdb17d2898b4792390672375ffcd2493.zip opie-3cb4363abdb17d2898b4792390672375ffcd2493.tar.gz opie-3cb4363abdb17d2898b4792390672375ffcd2493.tar.bz2 |
*** empty log message ***
-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,2 +1,6 @@ | |||
1 | January 8, 2004 | ||
2 | - 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." | ||
3 | now the text is handled correctly. | ||
4 | |||
1 | January 7, 2004 | 5 | January 7, 2004 |
2 | * Release by hayzel (koppermind@panafonet.gr) | 6 | * Release by hayzel (koppermind@panafonet.gr) |
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 | |||
@@ -910,5 +910,5 @@ double Sheet::functionCountIf(const QString ¶m1, const QString ¶m2, cons | |||
910 | 910 | ||
911 | 911 | ||
912 | QString Sheet::calculateFunction(const QString &function, const QString ¶meters, int NumOfParams) | 912 | QString Sheet::calculateFunction(const QString &func, const QString ¶meters, int NumOfParams) |
913 | { | 913 | { |
914 | bool ok; | 914 | bool ok; |
@@ -919,4 +919,6 @@ QString Sheet::calculateFunction(const QString &function, const QString ¶met | |||
919 | QString s1,s2; | 919 | QString s1,s2; |
920 | //basic functions | 920 | //basic functions |
921 | QString function; | ||
922 | function=func.upper(); | ||
921 | if (function=="+") | 923 | if (function=="+") |
922 | { | 924 | { |
@@ -1778,5 +1780,5 @@ QString Sheet::dataParserHelper(const QString &data) | |||
1778 | else if(tokentype==VARIABLE_TOKEN) | 1780 | else if(tokentype==VARIABLE_TOKEN) |
1779 | { | 1781 | { |
1780 | stack1.push(new QString(*s1)); | 1782 | stack1.push(new QString(QString(*s1).upper())); |
1781 | //printf("Parse:Var=%s\r\n",s1->latin1()); | 1783 | //printf("Parse:Var=%s\r\n",s1->latin1()); |
1782 | //here to put implementation of other types of variables except cell. | 1784 | //here to put implementation of other types of variables except cell. |
@@ -1802,5 +1804,5 @@ QString Sheet::dataParserHelper(const QString &data) | |||
1802 | //,s1->latin1(),params.latin1(),stack1.count(),args); | 1804 | //,s1->latin1(),params.latin1(),stack1.count(),args); |
1803 | tempval=calculateFunction(*s1,params,args); | 1805 | tempval=calculateFunction(*s1,params,args); |
1804 | tempval=tempval.upper(); | 1806 | tempval=tempval; |
1805 | stack1.push(new QString(tempval)); | 1807 | stack1.push(new QString(tempval)); |
1806 | }; | 1808 | }; |
@@ -1826,5 +1828,5 @@ QString Sheet::dataParser(const QString &cell, const QString &data) | |||
1826 | listDataParser.append(cell); | 1828 | listDataParser.append(cell); |
1827 | // printf("DATAPARSER: data=%s, cell=%s\r\n",data.ascii(),cell.ascii()); | 1829 | // printf("DATAPARSER: data=%s, cell=%s\r\n",data.ascii(),cell.ascii()); |
1828 | strippedData=dataParserHelper(strippedData.remove(0, 1).upper().replace(QRegExp(":"), ",")); | 1830 | strippedData=dataParserHelper(strippedData.remove(0, 1).replace(QRegExp(":"), ",")); |
1829 | 1831 | ||
1830 | int i=0; | 1832 | int i=0; |
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 | |||
@@ -101,5 +101,5 @@ class Sheet: public QTable | |||
101 | bool findRange(const QString &variable1, const QString &variable2, int *row1, int *col1, int *row2, int *col2); | 101 | bool findRange(const QString &variable1, const QString &variable2, int *row1, int *col1, int *row2, int *col2); |
102 | QString calculateVariable(const QString &variable); | 102 | QString calculateVariable(const QString &variable); |
103 | QString calculateFunction(const QString &function, const QString ¶meters, int NumOfParams); | 103 | QString calculateFunction(const QString &func, const QString ¶meters, int NumOfParams); |
104 | QString getParameter(const QString ¶meters, int paramNo, bool giveError=FALSE, const QString funcName=""); | 104 | QString getParameter(const QString ¶meters, int paramNo, bool giveError=FALSE, const QString funcName=""); |
105 | QString dataParser(const QString &cell, const QString &data); | 105 | QString dataParser(const QString &cell, const QString &data); |