Bug 164334 - Conditional statement condition "tomorrow" changes to "yesterday" after closing document
Summary: Conditional statement condition "tomorrow" changes to "yesterday" after closi...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: Other All
: medium minor
Assignee: Markus Mohrhard
URL:
Whiteboard: target:26.2.0 target:25.8.4
Keywords: filter:xlsx
Depends on:
Blocks: XLSX-Conditional-Formatting
  Show dependency treegraph
 
Reported: 2024-12-15 17:52 UTC by Bug_Reporter101
Modified: 2025-11-19 04:37 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
This is video evidence of the bug. The only editing that has been done is the black box to hide my file explorer contents. Thank you. (Your software rocks. This is just a weird bug.) (2.62 MB, video/mp4)
2024-12-15 17:52 UTC, Bug_Reporter101
Details
Sample file working for me. (12.30 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-12-15 23:30 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bug_Reporter101 2024-12-15 17:52:07 UTC
Created attachment 198120 [details]
This is video evidence of the bug. The only editing that has been done is the black box to hide my file explorer contents. Thank you. (Your software rocks. This is just a weird bug.)

I make a conditional statement that contains the statement, Date is tomorrow, change the style to _. Whenever I save and close out this document and reopen it, instead of applying to Date is tomorrow, it changes to Date is yesterday.
Comment 1 m_a_riosv 2024-12-15 23:30:33 UTC
Created attachment 198129 [details]
Sample file working for me.

Works for me
Version: 25.2.0.0.beta1 (X86_64) / LibreOffice Community
Build ID: 5a5fc103cad77dc243b7e54511502054c12c121c
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 2 Bug_Reporter101 2024-12-15 23:48:08 UTC
OK, My file was the Excel file type .xlsx. Perhaps that's the problem
Comment 3 Roman Kuznetsov 2025-01-04 20:09:58 UTC
(In reply to Bug_Reporter101 from comment #2)
> OK, My file was the Excel file type .xlsx. Perhaps that's the problem

Would be great to have it here for checking
Comment 4 raal 2025-01-06 07:12:21 UTC
confirm with Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: cac9c7db6257b27724d90d4a355e52e456ef7e08
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: kf5 (cairo+xcb)
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

Version 4.1.0.0.alpha0+ (Build ID: 847749e975a7111ea306909a29fddb5df13e9a7)

File saved as xlsx.
Comment 5 Saburo 2025-11-12 07:09:06 UTC
https://opengrok.libreoffice.org/xref/core/sc/source/filter/excel/xecontent.cxx?r=f41c58ad4172729a2be261f0ccea01d741d61a2d#1166

const char* getTimePeriodString( condformat::ScCondFormatDateType eType )
1158  {
1159      switch(eType)
1160      {
1161          case condformat::TODAY:
1162              return "today";
1163          case condformat::YESTERDAY:
1164              return "yesterday";
1165          case condformat::TOMORROW:
1166              return "yesterday";

return "tomorrow";
Comment 6 Saburo 2025-11-14 07:40:42 UTC
commit 80904d027f5a7adb0fec7da99536f8cc02bdd2d9

adding CC: Markus Mohrhard
Sorry, could you please write a patch?
I wish I could write a patch, but I don't know where to start.
Comment 7 Commit Notification 2025-11-18 14:50:57 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/12def302eb518bec27bf8a6f6234ed88b945e2f5

tdf#164334: fix OOXML export of cond format tomorrow condition

It will be available in 26.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2025-11-18 20:11:29 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/d925471eca8d88c571777833f0aa6b9492b3b080

tdf#164334: fix OOXML export of cond format tomorrow condition

It will be available in 25.8.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Markus Mohrhard 2025-11-19 04:37:51 UTC
(In reply to Saburo from comment #6)
> commit 80904d027f5a7adb0fec7da99536f8cc02bdd2d9
> 
> adding CC: Markus Mohrhard
> Sorry, could you please write a patch?
> I wish I could write a patch, but I don't know where to start.

Thanks for the detailed analysis. This made writing the patch very simple and straight-forward.