KDE Bug Tracking System
Home
Report New Wish or Bug
Query Existing Reports
First
Last
Prev
Next
No search results available
Search page
Bug
135131
:
KSpread can't handle simple spreadsheet
P
roduct
:
kspread
Co
m
ponent
:
general
Status
:
RESOLVED
Resolution
:
FIXED
Target
:
---
Version
:
1.5.2
Pr
i
ority
:
NOR
Severity
:
crash
V
otes
:
0
Description
:
Opened:
2006-10-05 04:08
Last Changed:
2007-08-12 15:57:51
Version: unknown (using KDE 3.5.4 "release 78.1" , openSUSE ) Compiler: Target: i586-suse-linux OS: Linux (i686) release 2.6.13-15.7-default KSpread 1.5.2 from SuSE rpms Try this (lvalues are spreadsheet cell names) A1 = 100000 B1 = .06/12 C1 = 360 D1 = -(pmt(b1;c1;a1) A3 = 1 B3 = A1 C3 = $B$1*B3 D3 = $D$1 - C3 A4 = A4 + 1 B4 = B3 - D3 copy C3:D3 and paste to C4 now copy A4:D4 and paste into a range of rows - A5:A363 would be ideal, but 16 rows seems sufficient (4 or 8 will work). Depending on how long you wait (OO.o will do 360 rows in a second or less - exact same cell contents and copy/paste) either KSpread will lock up, KDE will crash, or it will take down the entire machine. Also, why is it necessary to use parens to apply a unary minus to the pmt function? The description above will generate a home mortgage loan amortization table for a 30 year mortgage - it shows how much you owe (in column B) for each monthly payment.
Comment
#1
Ariya Hidayat 2006-10-08 00:24:51
SVN commit 593478 by ariya: fixed wrong handling of unary operator before a function CCBUG: 135131 M +4 -2 formula.cc M +9 -0 tests/formula_tester.cc --- branches/koffice/1.6/koffice/kspread/formula.cc #593477:593478 @@ -1070,10 +1070,11 @@ } // rule for unary operator: (op1) (op2) X -> (op1) X - // conditions: op2 is unary + // conditions: op2 is unary, token is not '(' // action: push (op2) to result // e.g. "* - 2" becomes "*" if( !ruleFound ) + if( token.asOperator() != Token::LeftPar ) if( syntaxStack.itemCount() >= 3 ) { Token x = syntaxStack.top(); @@ -1095,9 +1096,10 @@ } // auxilary rule for unary operator: (op) X -> X - // conditions: op is unary, op is first in syntax stack + // conditions: op is unary, op is first in syntax stack, token is not '(' // action: push (op) to result if( !ruleFound ) + if( token.asOperator() != Token::LeftPar ) if( syntaxStack.itemCount() == 2 ) { Token x = syntaxStack.top(); --- branches/koffice/1.6/koffice/kspread/tests/formula_tester.cc #593477:593478 @@ -241,7 +241,16 @@ CHECK_EVAL( "5---1", Value(4) ); CHECK_EVAL( "5----1", Value(6) ); CHECK_EVAL( "5-----1", Value(4) ); + CHECK_EVAL( "5-----1*2.5", Value(2.5) ); + CHECK_EVAL( "5------1*2.5", Value(7.5) ); CHECK_EVAL( "-SIN(0)", Value(0) ); + CHECK_EVAL( "1.1-SIN(0)", Value(1.1) ); + CHECK_EVAL( "1.2--SIN(0)", Value(1.2) ); + CHECK_EVAL( "1.3---SIN(0)", Value(1.3) ); + CHECK_EVAL( "-COS(0)", Value(-1) ); + CHECK_EVAL( "1.1-COS(0)", Value(0.1) ); + CHECK_EVAL( "1.2--COS(0)", Value(2.2) ); + CHECK_EVAL( "1.3---COS(0)", Value(0.3) ); // no parentheses, checking operator precendences CHECK_EVAL( "14+3*77", Value(245) );
Comment
#2
Krishna Sethuraman 2007-01-04 00:22:36
See also
bug 59510 comment 17
; somewhat related.
Comment
#3
Stefan Nikolaus 2007-08-12 15:57:51
*** Bug has been marked as fixed ***.
P
latform
:
unspecified
O
S
:
Linux
K
eywords
:
People
Reporter
:
Assigned To
:
KSpread Bugs
Related actions
View Bug Activity
Format For Printing
XML
Clone This Bug
Note
You need to
log in
before you can comment on or make changes to this bug.
Attachments
Add an attachment
(proposed patch, testcase, etc.)
Depends on
:
B
locks
:
Show dependency tree
-
Show dependency graph
First
Last
Prev
Next
No search results available
Search page
Actions
Reports
Requests
Reports
Bugs reported today
Bugs reported in the last 3 days
Bug reports with patches
Weekly Bug statistics
The most hated bugs
The most severe bugs
The most frequently reported bugs
The most wanted features
Junior Jobs
Report ownership counts and charts
My Account
New Account
Log In