https://bugs.documentfoundation.org/show_bug.cgi?id=173414

--- Comment #4 from [email protected] ---
Following up on comment 2: I can now reproduce this with 26.8.1.1 on Windows.
The trigger is a vertical alignment that is set in a cell style, not only the
background.

In attachment 208372 the Default cell style has style:vertical-align="top", and
the conditional styles "Odd Rows"/"Even Rows" have
style:vertical-align="automatic" (Vertical "Default" in the dialog).

Steps:
1. New document. Edit cell style Default: Alignment > Vertical = Top.
2. New cell style BgOnly (parent Default): yellow background; Alignment >
Vertical changed from the inherited Top to Default.
3. A1:C1 = Top / Middle / Bottom, text format, row height 1.5 cm, direct
vertical alignment top / middle / bottom.
4. Format > Conditional > Condition, "Formula is" TRUE(), style BgOnly.

Result: all three cells are bottom aligned. The saved .ods has BgOnly with
style:vertical-align="automatic", as in the attachment.

Control: reset the Alignment page of BgOnly with "Standard" (it then inherits
Top from Default): all three cells become top aligned.

So whatever vertical alignment the conditional style resolves to, including a
value inherited from its parent style, overrides the cells' direct alignment.
In my first test the Default style had no vertical alignment set, so there was
nothing to override.

Code pointer: ScPatternAttr::GetItem() (sc/source/core/data/patattr.cxx) uses
pCondSet->GetItemState(nWhich, true, ...), i.e. bSrchInParent = true, so items
from the parent of the conditional style count as set.

LibreOffice:
Version: 26.8.1.1 (X86_64)
Build ID: bf6ef2662401c7d6dce671ab4deb26ee0af3a7c1
CPU threads: 20; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Raster;
VCL: win
Locale: zh-CN (zh_CN); UI: zh-CN
Calc: CL threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to