KDE Bug Tracking System
Home
Report New Wish or Bug
Query Existing Reports
First
Last
Prev
Next
No search results available
Search page
Bug
128383
:
undo/redo apparently is not recalculating formulas
P
roduct
:
kspread
Co
m
ponent
:
general
Status
:
RESOLVED
Resolution
:
FIXED
Target
:
---
Version
:
1.5.1
Pr
i
ority
:
NOR
Severity
:
grave
V
otes
:
0
Description
:
Opened:
2006-05-31 18:56
Last Changed:
2006-10-23 22:24:28
Version: 1.5.1 (using KDE KDE 3.5.2) Installed from: Ubuntu Packages OS: Linux It happened that when I clicked undo, a formula like =(Tablas!B7/30*14)-F8 undoing to =Tablas!B7-F8 conserves current value. Even clicking on tools->recalculate sheet doesn't work.
Comment
#1
Tomas Mecir 2006-07-11 12:15:04
This bug is already fixed in the SVN version.
Comment
#2
Sebastian Sauer 2006-08-21 03:34:18
Reopen the report since the problem is reproducable for me with KSpread from 1.6-branch compiled 5 minutes ago. Also I changed the severity to grave since wrong formula-results are one of the worst cases. Reproduce; 1. Fill cells A1="1", A2="10", A3="100", A4="=A1+A2" 2. Change A4 to "=A2+A3" 3. Undo 4. A4 has the old calc-result and even F9 does not update the wrong value. Only way to get the correct values is to close the document and reopen it. Proposed fix; Index: manipulator_data.cc =================================================================== --- manipulator_data.cc (Revision 574496) +++ manipulator_data.cc (Arbeitskopie) @@ -71,6 +71,13 @@ { Cell *cell = m_sheet->nonDefaultCell (col, row); cell->setCellValue (val, fmtType, text); + if (cell->isFormula()) { + cell->setCalcDirtyFlag(); + //cell->calc(); + //m_sheet->valueChanged(cell); + //m_sheet->recalc(true); + //m_sheet->updateCell(cell,col,row); + } } } } The problem with the fix is, that even if the cell's dirty-flag is set and even if calc() got called, the formula does not got updated whyever :-(
Comment
#3
Sebastian Sauer 2006-08-21 03:37:57
Added Tomas to the cc-list since that way it's easier for him to know, that I reopened the bug + confirmed the bug (maybe a regression?)
Comment
#4
Tomas Mecir 2006-08-21 09:43:40
This with 1.5.x or trunk (Qt4) ?
Comment
#5
Stefan Nikolaus 2006-10-23 22:24:28
SVN commit 598528 by nikolaus: Fix "undo/redo apparently is not recalculating formulas" BUG: 128383 M +4 -0 branches/koffice/1.6/koffice/kspread/kspread_cell.cc M +4 -0 trunk/koffice/kspread/Cell.cpp --- branches/koffice/1.6/koffice/kspread/kspread_cell.cc #598527:598528 @@ -516,7 +516,11 @@ void Cell::setCellValue (const Value &v, FormatType fmtType, const QString &txt) { if ( !txt.isNull() ) + { d->strText = txt; + if ( isFormula() ) + makeFormula(); + } else if ( !isFormula() ) d->strText = sheet()->doc()->converter()->asString (v).asString(); if (fmtType != No_format) --- trunk/koffice/kspread/Cell.cpp #598527:598528 @@ -329,7 +329,11 @@ void Cell::setCellValue (const Value &value, FormatType fmtType, const QString &txt) { if ( !txt.isNull() ) + { d->strText = txt; + if ( isFormula() ) + makeFormula(); + } else if ( !isFormula() ) d->strText = sheet()->doc()->converter()->asString( value ).asString(); if ( fmtType != No_format )
P
latform
:
Ubuntu Packages
O
S
:
Linux
K
eywords
:
U
RL
:
People
Reporter
:
Sebastián BenÃtez
Assigned To
:
Laurent Montel
CC
:
mecirt gmail com
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