Bug 140687 - Incorrect formula in Conditional formatting after moving cells
Summary: Incorrect formula in Conditional formatting after moving cells
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Conditional-Formatting-Managing
  Show dependency treegraph
 
Reported: 2021-02-26 20:06 UTC by Xisco Faulí
Modified: 2023-07-31 03:05 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
sample file (9.44 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-02-26 20:06 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2021-02-26 20:06:21 UTC
Created attachment 170091 [details]
sample file

Steps to reproduce:
1. Open attached document
2. Go to Format - Conditional - Manage - Edit -> Formulas are =B4 and =B5
3. Cut A5:A14
4. Paste it to A1
5. Go to Format - Conditional - Manage - Edit 

-> Formulas are =B8 and =B9. They should be =B4 and B5 instead. Not happening if moving to row 5 or greater

Reproduced in

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 43e306ebe61ef5a849dcfd1e74b697be3b3fe716
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Version: 5.2.0.0.alpha1+
Build ID: 5b168b3fa568e48e795234dc5fa454bf24c9805e
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; 
Locale: ca-ES (ca_ES.UTF-8)

and

Version: 4.1.0.0.alpha1+
Build ID: a2c9d4f8bbde97f175bae4df771273a61251f40
Comment 1 Regina Henschel 2021-02-26 20:56:32 UTC
It only happens if the paste range is above the cut range and overlaps the cut range.

It does not happen, if the paste range is below the cut range.
It does not happen, if you previously insert so many rows that the paste range does not overlap the cut range.
It does not happen, if you first paste to a different column and then paste (with same clipboard content) to A1.
Comment 2 Xisco Faulí 2021-02-26 21:10:29 UTC
Not happening if 'mpCell->UpdateReference(rCxt);' is commented out -> https://opengrok.libreoffice.org/xref/core/sc/source/core/data/colorscale.cxx?r=1efcc72d#266
Comment 3 Regina Henschel 2021-02-26 21:18:02 UTC
Bug 105531 and bug 133027 might be related
Comment 4 Xisco Faulí 2021-02-27 22:07:35 UTC
if the range is moved to A2, A3 or A4, 'bool bCellInMoveTarget = rCxt.maRange.In(aPos);' in https://opengrok.libreoffice.org/xref/core/sc/source/core/data/formulacell.cxx?r=0b1b167c#3386 return false, however, if the range is moved to A1, it returns true, and then aOldPos is changed

@Eike, I thought you might be interested in this issue...
Comment 5 QA Administrators 2023-07-31 03:05:26 UTC
Dear Xisco Faulí,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug