Bug 170494 - [26.8] CELL("contents") does not work correctly in cell validity
Summary: [26.8] CELL("contents") does not work correctly in cell validity
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
26.8.0.0 alpha0+ master
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectRequest, regression
Depends on:
Blocks: Cell-Validity
  Show dependency treegraph
 
Reported: 2026-01-27 10:16 UTC by nobu
Modified: 2026-02-03 01:19 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Sample ods (30.30 KB, application/vnd.oasis.opendocument.spreadsheet)
2026-01-27 10:18 UTC, nobu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nobu 2026-01-27 10:16:28 UTC
Description:
CELL("contents") does not work correctly with cell validity.

Steps to Reproduce:
1. Open new Calc.
2. Insert Cell Validity into Cell [A1]
   Criteria tab :
     Allow : Custom
     Formula : ISODD(CELL("contents"))
   Close the dialog without making any other settings.

   By default, it should look like this:
     Error Alert tab :
       Checkbox : ☑
       Action : Stop

This setting, similar to "ISODD(A1)", allows odd numbers but displays a stop dialog when an even number is entered, with the value being rejected.

3. First, insert "1" in cell [A1].
   You can enter it exactly as specified.

4. Next, insert "2" in cell [A1].

Actual Results:
5. You can also insert "2". The stop dialog will not appear.
   Other even numbers or strings can also be inserted.

Expected Results:
5. Since "2" is not an odd number, the stop dialog will appear and the input will be rejected.


Reproducible: Always


User Profile Reset: No

Additional Info:

Conversely, if you first insert "2" in step [3.], all subsequent inputs will be rejected.
It appears that the initial value entered after creating the input rules locks the result.
When saved and reopened, the state is reset, but it again locks the result based on the first input upon opening.

It worked correctly until early December's master version (26.8.0.0.alpha0+).

Reproducible
[2025-12-16]
Version: 26.8.0.0.alpha0+ (X86_64)
Build ID: 680(Build:0)
CPU threads: 4; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster; VCL: win
Locale: en-US (ja_JP); UI: en-US
Calc: CL threaded

Reproducible
[2026-01-26]
Version: 26.8.0.0.alpha0+ (X86_64)
Build ID: 680(Build:0)
CPU threads: 4; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded

Reproducible
[2026-01-14]
Version: 26.8.0.0.alpha0+ (X86_64)
Build ID: fe4cb5de3fa77562a1a4decc67836e8f79000400
CPU threads: 2; OS: Linux 6.14; UI render: default; VCL: kf5 (cairo+xcb)
Locale: ja-JP (ja_JP.UTF-8); UI: en-US
Calc: threaded

---

Not Reproducible
Version: 26.2.0.2 (X86_64)
Build ID: 620(Build:2)
CPU threads: 4; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded

Not Reproducible
[2025-12-07]
Version: 26.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 680(Build:0)
CPU threads: 4; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: en-US (ja_JP); UI: en-US
Calc: CL threaded
Comment 1 nobu 2026-01-27 10:18:23 UTC
Created attachment 205195 [details]
Sample ods
Comment 2 ady 2026-01-27 13:43:55 UTC
Repro > regression.

There have been some recent changes to Data Validity in Calc (in theory, making things as they used to be before LO 24.2, with an additional tweak).

Someone could be tempted to focus on the functions themselves (whether they are valid or not. That's irrelevant to this bug report, which is about the Validity features in Calc.
Comment 3 Saburo 2026-01-30 12:14:35 UTC
bibisected with win64-26.8
commit 7ca98e3865df26e4418d1429d5006b39881c1cdc
author	Caolán McNamara
optimize relative conditional formatting effort

***
I think this is committed, but welcome a second opinion
Comment 4 Justin Gray 2026-02-03 01:19:45 UTC
Bibisected with win64-26.8 to commit 7ca98e3865df26e4418d1429d5006b39881c1cdc https://hollowknight.io . I believe this is already committed, but I’d welcome a second opinion.