KDE Bug Tracking System
Home
Report New Wish or Bug
Query Existing Reports
First
Last
Prev
Next
No search results available
Search page
Bug
124549
:
reference on sheets with name from numbers does...
P
roduct
:
kspread
Co
m
ponent
:
general
Status
:
RESOLVED
Resolution
:
FIXED
Target
:
---
Version
:
unspecified
Pr
i
ority
:
NOR
Severity
:
normal
V
otes
:
0
Description
:
Opened:
2006-03-30 11:19
Last Changed:
2006-09-15 13:27:49
Version: 1.5 rc1 (using KDE 3.5.2, Gentoo) Compiler: gcc version 3.4.5 (Gentoo 3.4.5, ssp-3.4.5-1.0, pie-8.7.9) OS: Linux (i686) release 2.6.15-gentoo-r1n I just found that references to another sheet (same file) doesn't work if name of referenced sheet consists of numbers (works ok if sheet-name begins with character). see attached example for clarification (cell a1 from sheets #2 and #3, in #3 is ok, in #2 not ok).
Comment
#1
werner hoernerfranzracing de 2006-03-30 11:20:49
Created an attachment (id=15371)
[details]
see bug description
Comment
#2
werner hoernerfranzracing de 2006-04-13 11:22:17
I just upgraded to kspread 1.5 and can confirm the problem still persists.
Comment
#3
Nicolas Vincent 2006-09-15 11:26:40
On kspread 1.6beta1 the bug persists, i had my sheet named 2005_2006 and the other one (in which a cell have a reference to 2005_2006!M4) called 2006_2007, I renamed first sheet to "Feuille1" and by updating the reference, my cell displayed the correct number instead of "####" Nicolas
Comment
#4
Stefan Nikolaus 2006-09-15 13:27:48
SVN commit 584601 by nikolaus: Formula Allow sheet names beginning with a number and fix an issue with quoted sheet names. BUGS: 124549 M +16 -3 branches/koffice/1.6/koffice/kspread/formula.cc M +5 -0 branches/koffice/1.6/koffice/kspread/tests/formula_tester.cc M +16 -3 trunk/koffice/kspread/Formula.cpp M +5 -0 trunk/koffice/kspread/tests/formula_tester.cc --- branches/koffice/1.6/koffice/kspread/formula.cc #584600:584601 @@ -533,7 +533,6 @@ { i++; state = InSheetOrAreaName; - tokenText.append( QChar( '\'' ) ); } // decimal dot ? @@ -688,8 +687,8 @@ else { - // the aposthrophe itself - tokenText.append( ex[i++] ); + // eat the aposthrophe itself + ++i; // must be followed by '!', otherwise we have a string in '' if( ex[i] == '!' ) { @@ -737,6 +736,20 @@ state = InExpIndicator; } + // reference sheet delimiter? + else if( ch == '!' ) + { + tokenText.append( ex[i++] ); + state = InCell; + } + + // identifier? + else if( isIdentifier( ch ) ) + { + // has to be a sheet or area name then + state = InIdentifier; + } + // we're done with integer number else { --- branches/koffice/1.6/koffice/kspread/tests/formula_tester.cc #584600:584601 @@ -129,7 +129,12 @@ // cell/range/identifier CHECK_PARSE( "A1", "c" ); CHECK_PARSE( "Sheet1!A1", "c" ); + CHECK_PARSE( "'Sheet1'!A1", "c" ); CHECK_PARSE( "'Sheet One'!A1", "c" ); + CHECK_PARSE( "2006!A1", "c" ); + CHECK_PARSE( "2006bak!A1", "c" ); + CHECK_PARSE( "2006bak2!A1", "c" ); + CHECK_PARSE( "'2006bak2'!A1", "c" ); CHECK_PARSE( "A1:B100", "r" ); CHECK_PARSE( "Sheet1!A1:B100", "r" ); CHECK_PARSE( "'Sheet One'!A1:B100", "r" ); --- trunk/koffice/kspread/Formula.cpp #584600:584601 @@ -533,7 +533,6 @@ { i++; state = InSheetOrAreaName; - tokenText.append( QChar( '\'' ) ); } // decimal dot ? @@ -687,8 +686,8 @@ else { - // the aposthrophe itself - tokenText.append( ex[i++] ); + // eat the aposthrophe itself + ++i; // must be followed by '!', otherwise we have a string in '' if( ex[i] == '!' ) { @@ -736,6 +735,20 @@ state = InExpIndicator; } + // reference sheet delimiter? + else if( ch == '!' ) + { + tokenText.append( ex[i++] ); + state = InCell; + } + + // identifier? + else if( isIdentifier( ch ) ) + { + // has to be a sheet or area name then + state = InIdentifier; + } + // we're done with integer number else { --- trunk/koffice/kspread/tests/formula_tester.cc #584600:584601 @@ -129,7 +129,12 @@ // cell/range/identifier CHECK_PARSE( "A1", "c" ); CHECK_PARSE( "Sheet1!A1", "c" ); + CHECK_PARSE( "'Sheet1'!A1", "c" ); CHECK_PARSE( "'Sheet One'!A1", "c" ); + CHECK_PARSE( "2006!A1", "c" ); + CHECK_PARSE( "2006bak!A1", "c" ); + CHECK_PARSE( "2006bak2!A1", "c" ); + CHECK_PARSE( "'2006bak2'!A1", "c" ); CHECK_PARSE( "A1:B100", "r" ); CHECK_PARSE( "Sheet1!A1:B100", "r" ); CHECK_PARSE( "'Sheet One'!A1:B100", "r" );
P
latform
:
unspecified
O
S
:
Linux
K
eywords
:
People
Reporter
:
Assigned To
:
Raphael Langerhorst
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
see bug description
(5.59 KB, application/vnd.oasis.opendocument.spreadsheet)
2006-03-30 11:20
,
werner@hoernerfranzracing.de
Details
View All
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