Issue 128076

Summary: Conditional formatting causes comment to point to wrong cell
Product: Calc Reporter: apache
Component: formattingAssignee: AOO issues mailing list <issues>
Status: UNCONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P5 (lowest)    
Version: 4.1.6   
Target Milestone: ---   
Hardware: All   
OS: All   
See Also: https://bz.apache.org/ooo/show_bug.cgi?id=61253
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
Minimal working example, see cells D300 and HH300. none

Description apache 2019-03-25 23:49:37 UTC
Created attachment 86657 [details]
Minimal working example, see cells D300 and HH300.

Description
===========
Conditional formatting causes comment cells anywhere on the same sheet to point their arrowhead to the wrong location.

Expected behavior
=================
Conditional formatting use has no effect on where a comment is drawn.

Definitions
===========
'applied conditional formatting' -- No relation to the logical evaluation of the condition, merely whether (at least) condition 1's checkbox is checkmarked for that cell.

Observed behavior
=================
Consider a comment somewhere on a sheet, say in cell D300. 
If no conditional formatting is applied anywhere on the sheet, the comment's arrowhead will point to the top right corner of cell D300.
As conditional formatting is applied to cells in rows above the commented cell (i.e. rows 1-299), the comment and its arrowhead will shift further and further down the sheet.
Conditional formatting applied to rows at or past the commented cell has no effect on the position of the comment.
The number of cells and position of cells using conditional formatting within a given row has no effect. To elaborate: 1 cell using conditional formatting and 100 cells using conditional formatting within a single row cause the same displacement of the comment's drawn position. Conditional formatting applied, in our D300 example, to cells A1, B2, C3, D4, E5, F6, G7, H8 etc will each displace the comment vertically. Identical displacement would be observed from conditional formatting applied to cells A1-A8.
No horizontal effect exists for conditional formatting, i.e. a comment in HH300 would be displaced only vertically if all cells in A1..GZ299 were conditionally formatted. (Note - a horizontal effect will happen from resizing columns. See bug #61253.)

Steps to reproduce
==================
1. New spreadsheet
2. Navigate to cell D300. 
3. Insert comment in D300. (insert->comment / rightclick->'insert comment' / ctrl+alt+c / all methods produce same results)
4. Mouseover and observe comment's position, pointing to the top right of D300. Alternatively, rightclick->'show comment' to keep it visible.
5. Make A1:A500 nonblank. ('test', 1..500, etc)
6. Apply conditional formatting to column A. (format->'conditional formatting'->'cell value is equal to 0')
7. Observe new position of comment, displaced downward by about 2.16" (twelve 0.18" default rows.)

bonus:
8. While watching comment's position (use show comment first), hit undo. Watch comment pop back up to D300.
9. Make cells A50..A150 blank. Watch comment's displacement shrink by a third.
10. Make cells A151..A250 no longer conditionally formatted. Watch comment's displacement shrink by about half.