Natural named range not updated

Bug #46055 reported by Tero Karvinen
8
Affects Status Importance Assigned to Milestone
openoffice.org (Ubuntu)
Invalid
Low
Unassigned

Bug Description

Binary package hint: openoffice.org2-calc

Results of formulas using natural named range are not always updated automatically.

To reproduce, in OpenOffice calc,
1) create a row with cells "event" and "amount"
2) add some events ("foo") and numbers (2)
3) create last row "total", "=SUM(amount)"
Now total row correctly displays sum of amounts.
4) insert a row before "total" row
5) add to new row "plane ticket" "1000"
What happens
- total row still shows the old amount (without +1000)
What should happen
- total row should show the correct sum of amounts, including the 1000 of "plane ticket"

Tested with Breezy and openoffice.org2-calc 1.9.129-0.1ubuntu4.

Revision history for this message
Tero Karvinen (karvinen+launchpad) wrote : Screenshot: Natural named range not updated

A screenshot of a spreadsheet showing the error.

Revision history for this message
Tero Karvinen (karvinen+launchpad) wrote : OOo Calc spreadsheet with wrong sum

Spreadsheet where natural named range is not updated. Same as in screenshot.

Revision history for this message
Tero Karvinen (karvinen+launchpad) wrote :

It seems that update happens when saved file is loaded. Thus, the attached spreadsheet does not show the problem when opened. You can still reproduce it by inserting another row.

Revision history for this message
Chris Cheney (ccheney) wrote :

Confirmed on Ubuntu 7.10 OpenOffice 2.3.0.

Changed in openoffice.org:
importance: Medium → Low
status: New → Confirmed
Revision history for this message
Bert Vorenholt (bert-vorenholt-nl) wrote :

Confirmed on Kubuntu 7.10 OOo 2.3.0

Not only a named-range problem though. Even with a "normal" =SUM() formula the col/row range isn't updated.
When you actually do the insert on the row above the row with the formula (inserting a row anywhere within the range, except a new last one), the range gets updated, but then you have a gap in the table.

I find this bug extreemly important because this is not expected and easy overseen, with possible (financial) consequences for the user who is using OOo for (professional) calculations/analyzing/reporting.

Revision history for this message
Bert Vorenholt (bert-vorenholt-nl) wrote :

Oops... this seems not to be a bug, but a feature :-(

Searching the OOo Calc forum topic, i saw the next solution:

http://www.oooforum.org/forum/viewtopic.phtml?t=59440 (answer on question)

<begin solution>
JohnV
Administrator

Joined: 07 Mar 2003
Posts: 4810
Location: Kentucky, USA

Posted: Sun Jul 08, 2007 12:25 pm Post subject:
Try Tools > Options > Calc > General
From Help:
Quote:
Expand references when new columns/rows are inserted
Specifies whether to expand references when inserting columns or rows adjacent to the reference range. This is only possible if the reference range, where the column or row is inserted, originally spanned at least two cells in the desired direction.
Example: If the range A1:B1 is referenced in a formula and you insert a new column after column B, the reference is expanded to A1:C1. If the range A1:B1 is referenced and a new row is inserted under row 1, the reference is not expanded, since there is only a single cell in the vertical direction.
If you insert rows or columns in the middle of a reference area, the reference is always expanded.

</solution>

I've tried this option and now my inserts are behaving as espected :-)

Hope this helps other people.

P.S.: I think this should be set by default

Chris Cheney (ccheney)
Changed in openoffice.org:
status: Confirmed → Won't Fix
Chris Cheney (ccheney)
Changed in openoffice.org:
status: Won't Fix → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.