[upstream] Spreadsheet sheet copy changes sheet reference in formulas

Bug #243271 reported by Derek Abson
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenOffice
Confirmed
Unknown
openoffice.org (Ubuntu)
Won't Fix
Low
Unassigned

Bug Description

Binary package hint: openoffice.org

Sheet reference translation error. After a sheet copy, sheet references are shifted by one. In other words sheet1.range becomes sheet2.range in thr sheet copy version.

derek@tm8100-laptop:~$ lsb_release -rd
Description: Ubuntu 7.10
Release: 7.10

derek@tm8100-laptop:~$ apt-cache policy openoffice.org-calc
openoffice.org-calc:
  Installed: 1:2.3.0-1ubuntu5.4
  Candidate: 1:2.3.0-1ubuntu5.4
  Version table:
 *** 1:2.3.0-1ubuntu5.4 0
        500 http://security.ubuntu.com gutsy-security/main Packages
        500 http://archive.ubuntu.com gutsy-updates/main Packages
        100 /var/lib/dpkg/status
     1:2.3.0-1ubuntu5 0
        500 http://archive.ubuntu.com gutsy/main Packages

Revision history for this message
Derek Abson (dsabson) wrote :
Revision history for this message
Derek Abson (dsabson) wrote :

To protect a reference to sheet1, say, before copying sheet containing reference to sheet1, prefix sheet1 with $ sign. Then reference to sheet1 becomes $sheet1 in original sheet and remains $sheet1 in generated copy.

I'm not really sure if it should normally be necessary to protect references embedded in sheets to other sheets, but it is at least it's a work around!

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

Do you still have this problem with openoffice.org 1:2.4.1-1ubuntu2 in Ubuntu 8.04?

Changed in openoffice.org:
status: New → Incomplete
Revision history for this message
Derek Abson (dsabson) wrote :

Yes! I still have this bug in Ubuntu 8.04! But my version is now openoffice.org 1:2.4.0-3ubuntu6.

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

Derek,

You should be able to get 1:2.4.1-1ubuntu2 if you make sure that hardy-updates is in the list to download from. Once you upgrade to this version see if the problem still exists since it has a lot of other fixes from what was in the normal Ubuntu 8.04 (Hardy) release.

Thanks,

Chris Cheney

Revision history for this message
Derek Abson (dsabson) wrote :

Done the update to openoffice.org 1:2.4.1-1ubuntu2! Sorry, still doesn't work.

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

Ok, I see the document but can't seem to reproduce the problem you are having. If I insert a sheet it becomes "Sheet10" but it doesn't seem to affect any of the formulas, and if I copy for example "countLotto" to become "countLotto 2" it doesn't seem to affect any formulas either.

Can you explain in a little better detail what is going wrong?

Thanks,

Chris Cheney

Revision history for this message
Derek Abson (dsabson) wrote :

To reproduce the Copy error, in file lottoPermErr.ods, you must copy sheet, Results, say, to Results 2, then compare the functions that appear in the lotto and plus columns in both versions of the copied sheet. In the original version, Results, you will see functions: =countif(lotto.range;value) and =countif(plus.range;value) in the lotto and plus columns respectively. Whereas, in the copied version, Results 2, you will now see functions: =countif(plus.range;value) and =countif(countLotto.range;value) in the lotto and plus columns respectively. The sheet references have been corrupted in Results 2. If the sheet references are protected by being prefixed with a $ sign, sheets, Results and Results 2 are the same. I am not aware that sheet references need to be protected in this way. See the attached ods file.

Revision history for this message
bs66 (bugsquad66) wrote :

I would say that this is not a bug, its a feature.

The behavior is similar to how Microsoft Office Excel 2003 works when copying sheets.

/bs66

Revision history for this message
bs66 (bugsquad66) wrote :

ehrm. my mistake. i misunderstood the problem. sorry.

the behavior is NOT the same as in Microsoft Office Excel 2003.
Excel behaves as the reporter expects OOo to behave.

I can reproduce the behavior here.

0:~$ lsb_release -rd
Description: Ubuntu intrepid (development branch)
Release: 8.10
0:~$ apt-cache policy openoffice.org-calc
openoffice.org-calc:
  Installed: 1:2.4.1-9ubuntu2
  Candidate: 1:2.4.1-9ubuntu2
  Version table:
 *** 1:2.4.1-9ubuntu2 0
        500 http://archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/status

Revision history for this message
Neil Munro (neilmunro-deactivatedaccount) wrote :

Since two people can confirm this bug exists, it has now been marked as confirmed.

Changed in openoffice.org:
status: Incomplete → Confirmed
Revision history for this message
bs66 (bugsquad66) wrote :

To reproduce:

http://launchpadlibrarian.net/16381493/lottoPermErr.ods

Open lottoPermErr.ods in Calc (the version that is 39.7 KiB. se attachment above)
Save the file locally (must do this in order to copy sheets)
Select the sheet "Results" (leftclick the tab at the bottom)
Rightclick the "Results" tab and select "Move/Copy Sheet..."
Change "Insert before" to "-move to end position-" and enable checkbox "Copy". Click OK.
A new shet tab was created named "Results 3"
Compare the formulas in cells C2 in the sheets "Results" and "Results 3".

The content in cell C2 in sheet "Results" is: =COUNTIF(lotto.$E$8:$K$8;B2)
But cell C2 in the sheet "Result 3" contains: =COUNTIF(countLotto.$E$8:$K$8;B2)
Expected behavior is that the formulas are the same, but they are not.

Revision history for this message
bs66 (bugsquad66) wrote :

Same problem with Ubuntu 8.04.1 and OpenOffice 3.0 RC3.

Revision history for this message
bs66 (bugsquad66) wrote :
Revision history for this message
bs66 (bugsquad66) wrote :

Bug still there in OOo 3.0 release (build 9358) on Windows.

Chris Cheney (ccheney)
Changed in openoffice.org:
importance: Undecided → Low
status: Confirmed → Triaged
Changed in openoffice:
status: Unknown → Confirmed
Revision history for this message
hackel (hackel) wrote :

Just hit this in OO3.1 (1:3.1.1-5ubuntu1) in Karmic.

Revision history for this message
hackel (hackel) wrote :

Also happens with simply copy-paste, not just copying a whole sheet.

Chris Cheney (ccheney)
tags: added: gutsy
Changed in openoffice.org (Ubuntu):
status: Triaged → Won't Fix
Revision history for this message
Björn Michaelsen (bjoern-michaelsen) wrote : migrating packaging from OpenOffice.org to Libreoffice

[This is an automated message.]
There are no new official OpenOffice.org releases in Ubuntu packaging anymore => Won't Fix

If the problem persists, please mark this bug as "also affects project Libreoffice" or "also affects distribution Libreoffice (Ubuntu)" if that has not happened already.

Please leave references to upstream OpenOffice.org bugs in place to allow cross pollination.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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