Bug 75904 - References get updated differently whether it's copied or cut within the same columns
Summary: References get updated differently whether it's copied or cut within the same...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.2.1 release
Hardware: x86-64 (AMD64) All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Cell-Formula Cell-Reference
  Show dependency treegraph
 
Reported: 2014-03-08 07:42 UTC by sworddragon2
Modified: 2023-05-09 22:41 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sworddragon2 2014-03-08 07:42:17 UTC
Here are the steps to reproduce:

1. Create a new document.
2. Write in cell A1 "1".
3. Write in cell A2 "2".
4. Write in cell B2 "=SUMME(A$1:A2)" (or dependent on whatever your localization is. It seems I can't mix SUMME from german with SUM from english) and press enter.
5. Select A1 and B1.

Now the differences:

Copy the selection, select A4 and paste the content. A4 will now contain "=SUMME(A$1:A4)" as I would expect it.

But if you cut the selection instead of copying, selecting A4 and pasting the content A4 will contain "=SUMME(A$1:A2)". Normally I would expect that the formula would be "=SUMME(A$1:A2)" too.
Comment 1 A (Andy) 2014-03-08 08:44:59 UTC
reproducible with LO 4.2.1.1 (Win 8.1)

In the bug report seems to be a small typing error:
Step 5: "Select A1 and B1" -> "Select A2 and B2"
Comment 2 sworddragon2 2014-03-08 08:59:21 UTC
You are right with the typo and there is even another typo: 'Normally I would expect that the formula would be "=SUMME(A$1:A2)" too.' -> 'Normally I would expect that the formula would be "=SUMME(A$1:A4)" too.'. But it seems I can't edit my post.
Comment 3 Kohei Yoshida 2014-03-08 15:33:55 UTC
Yes, this is intentional. The way Calc updates references during copy-n-pasting and cut-n-pasting are different.  This is not a bug. If you check the previous versions of Calc it's always behaved this way.

Having said that, I just checked Excel's behavior.  Excel behaves identically to Calc *except* when the original range and the pasted range are both in the same columns Excel behaves the way the reporter describes.  Very interesting.

For example, in this scenario, in Excel, when you cut and paste A2:B2 to A4:B4, the reference becomes A$1:A4, however, when you cut and paste A2:B2 to B3:C3, the reference remains unchanged.

Is this difference critical though?  That's the question.
Comment 4 Kohei Yoshida 2014-03-08 15:35:54 UTC
I'll set it to enhancement request.
Comment 5 sworddragon2 2014-03-08 15:40:27 UTC
> when you cut and paste A2:B2 to B3:C3, the reference remains unchanged.

So if I'm understanding all your post correctly if you would copy this in Excel the reference would then change?