Bug 472853 - AutoOutline in calc doesn't do anything if the formula doesn't explicitly denote a contiguous range
Summary: AutoOutline in calc doesn't do anything if the formula doesn't explicitly den...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: openoffice.org
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: David Tardon
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-11-25 06:11 UTC by Vivian Bian
Modified: 2009-02-18 23:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-02-18 23:13:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenOffice.org 99250 0 None None None Never

Description Vivian Bian 2008-11-25 06:11:02 UTC
Description of problem:
When apply the autooutline on the cell range contains formula,there is nothing happened on the cell

Version-Release number of selected component (if applicable):
openoffice.org-calc-2.4.0-12.8.fc9.x86_64

How reproducible:

Always
Steps to Reproduce:
1.Create a table like this:
  January February March 1st Quarter     April May June 2nd Quarter
  100     120      130   =SUM(A2;B2;C2)  100   100  200 =SUM(E2;F2;G2)

2.select the cell range contains formula,click the Data->Outline->AutoOutline
  
Actual results:
the table is not grouped into two quarters 

Expected results:
the table should be grouped into two quarters

Additional info:
In the rhel4,openoffice.org-1.1.5-10.6.0.5.el4,there is also nothing happened when use the autooutline

Comment 1 David Tardon 2008-11-25 07:11:51 UTC
Strange, it works all right when I compute the sums by range expression, i.e. '=sum(A2:C2)' for the 1st Quarter.

dtardon->caolanm: Do you happen to know, by any chance, if that's intended behaviour? The Help says nothing to that.

Comment 2 Caolan McNamara 2008-11-25 10:11:06 UTC
Seems to be considering A2;B2;C2 to be three separate ranges of 1 cell each when it sees it like that, while A2;C2 is seen as a single range of 3 cells.

I see that Excel doesn't seem to have this limitation, and for us that 
sc/source/core/data/table2.cxx ScTable::DoAutoOutline blocks this initially by checking for pCell->HasOneReference which isn't true for A2;B2;C2

if e.g. we had =SUM(A2;C2;G2) where the range is not contiguous then not doing anything makes sense I guess, but if the range is *expressible* as a single range, even if not entered that way they it would be ideal to "just work".

caolanm->dtardon: Do you want to have a go at a sort of "ScFormulaCell::IsExpressibleaAsOneReference" which could be used in ScTable::DoAutoOutline instead of ScFormulaCell::HasOneReference

Comment 3 David Tardon 2008-11-25 10:46:48 UTC
dtardon->caolanm: Okay, taking over.

Comment 4 Caolan McNamara 2009-02-16 09:21:34 UTC
I've checked that patch into rawhide for >= 3.1.0

Comment 5 Caolan McNamara 2009-02-18 23:13:49 UTC
looks good for this example in 3.1.0-1 for F11


Note You need to log in before you can comment on or make changes to this bug.