Issue 101544

Summary: Named ranges don't work with range operator (colon)
Product: Calc Reporter: Joe Smith <jes>
Component: programmingAssignee: oc
Status: CLOSED FIXED QA Contact: issues@sc <issues>
Severity: Trivial    
Priority: P3 CC: issues, oc, rb.henschel, stefan.baltzer, weigel
Version: OOo 3.1 RC2Keywords: oooqa, regression
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 101565    
Attachments:
Description Flags
sample document showing problem
none
as created in OOo31
none
resaved with OOo 301 none

Description Joe Smith 2009-05-04 17:39:12 UTC
Steps to reproduce:

1) Define names for two cells; e.g., A1:"Top", B10:"Bottom".
2) Create a formula using either or both names with the colon operator; e.g.,
=SUM(A1:Bottom) or =SUM(Top:Bottom).
3) The result is #NAME? instead of the expected sum.

This seems to work correctly in OOo 3.0 and 3.0.1
Comment 1 Joe Smith 2009-05-04 17:40:13 UTC
Created attachment 61984 [details]
sample document showing problem
Comment 2 Joe Smith 2009-05-04 17:43:15 UTC
The attached file loads and works correctly in OOo 3.0.1, but not in OOo 3.1rc2.

The formula using the colon range operator fails.
Comment 3 Regina Henschel 2009-05-04 20:22:34 UTC
Confirm. Testdocument "i4904_ocrange.ods" from issue 4904 (where this feature
has been introduced) shows OK in OOo3.0.1 and fails in OOo3.1RC2.
Comment 4 Regina Henschel 2009-05-06 11:23:43 UTC
I'll attach two files. File "mytestin31" is the file created in OOo310m11_build
9399 on WinXP. It shows the error in cell A5. Then I opened this file in
OOo301m15_build9379 and saved it immediately to file "mytestin31 via 301". In
OOo301 the sum in cell A5 is calculated correct and opening the file "mytestin31
via 301" in OOo31 also shows no error.

When you unpack the files and look into the content.xml, you see three differences
(1)
OOo31 has the additional namespace
xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0"
(2)
OOo31 has an additional style
  <style:style style:name="ta_extref" style:family="table">
   <style:table-properties table:display="false"/>
  </style:style>
(3)
OOo31 uses
     <table:table-cell table:formula="of:=SUM(a1:ende)"
office:value-type="float" office:value="0">
      <text:p>#NAME?</text:p>
where OOo301 uses
     <table:table-cell table:formula="of:=SUM([.A1]:ende)"
office:value-type="float" office:value="6">
      <text:p>6</text:p>

Comment 5 Regina Henschel 2009-05-06 11:24:59 UTC
Created attachment 62052 [details]
as created in OOo31
Comment 6 Regina Henschel 2009-05-06 11:25:40 UTC
Created attachment 62053 [details]
resaved with OOo 301
Comment 7 stefan.baltzer 2009-05-07 11:17:54 UTC
Set target OOo 3.1.1. Reassigned to NN. Put OC on c/c.
Comment 8 niklas.nebel 2009-06-10 09:22:42 UTC
*** Issue 102632 has been marked as a duplicate of this issue. ***
Comment 9 niklas.nebel 2009-06-10 09:24:02 UTC
Another case, from issue 102632, is SUM(A1:OFFSET(...)).
Comment 10 ooo 2009-06-26 13:53:14 UTC
Grabbing issue.
Comment 11 ooo 2009-06-26 13:55:42 UTC
Adding issue to cws dr68ooo311.
Comment 12 ooo 2009-06-26 17:37:21 UTC
In cws dr68ooo311:

revision 273436
sc/inc/compiler.hxx
sc/source/core/tool/compiler.cxx
Comment 13 ooo 2009-06-29 13:38:08 UTC
Also in cws calc51 for OOo3.2:

revision 273474
sc/inc/address.hxx
sc/inc/compiler.hxx
sc/inc/externalrefmgr.hxx
sc/source/core/data/documen4.cxx
sc/source/core/data/table3.cxx
sc/source/core/inc/interpre.hxx
sc/source/core/tool/address.cxx
sc/source/core/tool/compiler.cxx
sc/source/core/tool/interpr1.cxx
sc/source/core/tool/interpr4.cxx
sc/source/ui/docshell/externalrefmgr.cxx
Comment 14 ooo 2009-07-03 16:13:33 UTC
Reassigning to QA for verification.
Comment 15 oc 2009-07-13 14:00:56 UTC
verified in internal builds cws_dr68ooo3111 and cws_calc51
Comment 16 oc 2009-07-15 11:29:29 UTC
Detection of invalid ranges in Chart wizard broken => reopen
Comment 17 oc 2009-07-15 11:33:26 UTC
To reproduce the broken chart feature: new spreadsheet, fill A1:A5 with numbers,
insert chart, in chart wizard go to page data ranges, delete the 5 in the
datarange => nothing happens, but now the editline has to become red and nearly
all controls should be disabled because of the invalid range
Comment 18 ooo 2009-07-16 12:58:39 UTC
In cws dr68ooo311:

revision 274048
sc/source/core/tool/compiler.cxx
sc/source/core/tool/reftokenhelper.cxx

Also fixes the cases that already didn't work before this CWS ...
Comment 19 ooo 2009-07-16 13:25:13 UTC
In cws calc51:

revision 274051
sc/source/core/tool/compiler.cxx
sc/source/core/tool/reftokenhelper.cxx
Comment 20 ooo 2009-07-17 12:01:16 UTC
Back to QA for verification.
Comment 21 ooo 2009-07-17 14:47:07 UTC
More thorough reference checking in chart data ranges; also prevent some
possible crash if invalid ranges were to be passed to document/cell access.

In cws dr68ooo311:

revision 274096
sc/inc/refdata.hxx
sc/inc/table.hxx
sc/source/core/data/document.cxx
sc/source/core/tool/reftokenhelper.cxx
Comment 22 ooo 2009-07-17 14:52:35 UTC
In cws calc51:

revision 274098
sc/inc/refdata.hxx
sc/inc/table.hxx
sc/source/core/data/document.cxx
sc/source/core/tool/reftokenhelper.cxx
Comment 23 oc 2009-07-20 08:09:40 UTC
verified in internal build cws_dr68ooo311 and cws_calc51
Comment 24 Joe Smith 2009-07-30 20:36:21 UTC
Tested in OOo-dev 3.1  310m17(Build:9415) on Fedora Linux 11

Looks great--thanks!
Comment 25 Joe Smith 2009-08-05 22:25:55 UTC
Tested in DEV300_m54 on Fedora Linux 11:

OK here, too. Nice!
Comment 26 amy2008 2009-08-07 04:03:17 UTC
Verified in DEV300m54 on WinXP
Closing
Comment 27 ooo 2009-08-27 11:44:43 UTC
*** Issue 104492 has been marked as a duplicate of this issue. ***