Created attachment 74224 [details] Screenshot shows wrong row calculation During my research for "Bug 60306 - EDITING: CONDITIONAL FORMATTING destroyed after copy-paste cell" with [Version 4.1.0.0.alpha0+ (Build ID: 2823789bec0c029d9714aff0ed65923e23177ef) TinderBox: Win-x86@6, Branch:master, Time: 2013-01-24_22:52:49] I found something strange with formula in CF cell when I copy / paste to target: Steps how to reproduce: 0. Open both documents from Attachment 74218 [details] for Bug 60306 1. In source.ods select row 65 by click on row heading 2. <control+c> for copy all row 3. In target document click A65 5. <control+v> for paste > Row contents will become pasted 6. As in step 5 also paste to rows 64 ... 54 and 66 ... 70 Expected: Comparison always to Cell in Column T of SAME row (as T65 in row 65) Actual: Reference to cell in different line of Column T, see list below and Screenshot Souce: $Tabelle1.$T65>$Tabelle1.$C$10 (Row 65) Target: $Tabelle1.$T65>$Tabelle1.$C$10 (Row 65) $Tabelle1.$T64>$Tabelle1.$C$10 (Row 63) !! $Tabelle1.$T63>$Tabelle1.$C$10 (Row 61) !! Row reference is calculated wrongly for row different from Source row.
I can't tell whether this problem is related to root of Bug 60306
Already [Reproducible] with server installation of "LOdev 4.0.0.0.beta2+ - ENGLISH UI / German Locale [Build ID:6738ae52bd075dc6478dedfeddc60d1c25cffcb)]" {tinderbox: Win-x86@6, pull time 2013-01-04 23:41:48} on German WIN7 Home Premium (64bit) with own separate User Profile Was still ok with unzipped installation of "LOdev 4.0.0.0.alpha1+ - ENGLISH UI / German Locale [Build ID:af60316514f3ae3d4c475819bf86f2af837171e)]" {tinderbox: Win-x86@6, pull time 2012-11-23 22:10:31} on German WIN7 Home Premium (64bit) with own separate User Profile Reproduced in independent builds, so NEW This one appeared later than Bug 60306, so I now doubt that there is a direct relation. @Markus: can you please have a look?
I suspect you are checking the conditional format with the Manage conditional formats dialog?
And after playing around with it for some time I can no longer reproduce it again. This code is so screwed up but for the first time in a long time it is not my change that is responsible :/ Despite my rejection a patch has been integrated that might be responsible for this problem. Can you please test if selecting a cell in the range and then using not the "Manage Conditional Format" but the Format->Conditional Formatting->Condition dialog with a cell in the range selected shows the right formula?
(In reply to comment #3) I check with Menu 'Format - CF -> Condition', sometimes via 'Format - CF -> Manage' (In reply to comment #4) > And after playing around ... It meets with my experience: always when I thought to have understood what happens I see something totally unexpected ... I checked again with Server Installation of "LibO 4.0.0.3 rc - ENGLISH UI / German Locale [Build ID: 7545bee9c2a0782548772a21bc84a9dcc583b89)]" {tinderbox: @6, pull time 2013-01-31 11:30(?)} on German WIN7 Home Premium (64bit) with separate new User Profile. In source.ods Formula for I65 (Via 'Format -> CF -> Manage': * Condition1: $Tabelle1.$T65>$Tabelle1.$C$10 - Apply Style: EK_Aktuell * Condition1: $Tabelle1.$T65<=$Tabelle1.$C$10 - Apply Style: EK_Veraltet That's what I expect After copying complete row to SampleTarget.ods Row 65: * Condition1: $Tabelle1.$T65>$Tabelle1.$C$10 - Apply Style: EK_Aktuell * Condition1: $Tabelle1.$T65<=$Tabelle1.$C$10 - Apply Style: EK_Veraltet What seems to be exactly the same. But I see I65 with blue border of Style "Berechnet" And it seems the information in CF dialog is not correct. When I copy / Paste I65 to I66 I would expect to see a very similar CF formula for Row 66, but In the copied Cell I66 I see no formula, but: * Condition1: Cell Value Is: not equal to: leer - Apply Style: Berechnet * Condition1: nothing
Problem description: Paste special for conditional formatting not working as expected! Wrong incrementing for second cell refference. Steps to reproduce: 1. Blank ods 2. Create a conditional formatting formula (for example: IF(isblank($A2),0,IF(AK2=AK$40,0,1)) then apply style NEW_STYLE 3. copy cell 4. paste special, only format, in cell ak3 5. You get the formula: IF(ISBLANK($A2),0,IF(B2=B$40,0,1)) Current behavior: You get the formula: IF(ISBLANK($A3),0,IF(B4=B$40,0,1)) Expected behavior: You should get IF(ISBLANK($A3),0,IF(B3=B$40,0,1)) NOTE: This only happens for paste special (CTRL+SHIFT+V) and the brush button from the toolbar. If you make the cell B2 and the FILL DOWN, and after that you complete the data, then it works as expected. Clearly a bug, quite unpleasant!
Created attachment 74514 [details] Paste special corrupts cell refferences in Conditional Formatting
The comment above was for LO 4.0.0.3 release, on Windows 7 PRO 64bit EN. For any additional info please email me for further tests!
@Robert Popa I cannot follow your steps - which cell did you originally enter the conditional format into before copying? Should the relative reference in the original formula certainly be to AK2?
Sorry, I discovered the issue in one of our files and I created another example file afterwards. So, at point 2 I should have written: 2. Create a conditional formatting formula (for example: IF(isblank($A2),0,IF(B2=B$40,0,1)) then apply style NEW_STYLE Just take a look at the file I attached. I hope it is much clear there.
*** Bug 60521 has been marked as a duplicate of this bug. ***
Judging by the fix: http://cgit.freedesktop.org/libreoffice/core/commit/?id=a9ce4176d274587de755147cf52bbec91b53fa2b&h=libreoffice-4-0 This is a duplicate of 60306. Thanks for reporting and helping to chase this down - we're trying to get the fix reviewed for 4.0.1 currently. *** This bug has been marked as a duplicate of bug 60306 ***
Not a real DUP due to latest research, function was already ok while Bug 60306 still unfixed. This bug has been fixed, Markus Mohrhard committed a patch related to this issue: <https://bugs.freedesktop.org/show_bug.cgi?id=60306#c10> <https://bugs.freedesktop.org/show_bug.cgi?id=60306#c11> I will check whether fixes for "Bug 60306 - EDITING: CONDITIONAL FORMATTING destroyed after copy-paste cell" will contain a backport of those fixes to 4.0.1 for this one, too