Bug 166125 - Formula becomes 0 in MSO after roundtrip
Summary: Formula becomes 0 in MSO after roundtrip
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.8.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.8.0 target:25.2.4 target:24...
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2025-04-10 12:31 UTC by Xisco Faulí
Modified: 2025-04-23 12:49 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
sample file (1.79 KB, application/vnd.oasis.opendocument.text-flat-xml)
2025-04-10 12:31 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2025-04-10 12:31:20 UTC
Created attachment 200272 [details]
sample file

Steps to reproduce:
1. Open attached document
2. Save to DOCX
3. Open the generated file in Word

-> Last formula is displayed as 0. it should be 6

Reproduced in

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 403b1dd4808f72a2cd5cd6397f1610d41882eb01
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 1 Xisco Faulí 2025-04-10 12:49:49 UTC
Regression introduced by:

commit a586ce188086ff27b08b8a4de4672c07ddf8ed7c	[log]
author	Miklos Vajna <vmiklos@collabora.com>	Wed Jan 03 08:10:47 2024 +0100
committer	Miklos Vajna <vmiklos@collabora.com>	Wed Jan 03 09:18:51 2024 +0100
tree 799a9b4e8ecb58ab78b3ebbefeebdc1004da8a2d
parent 41452912e8ec11ecfead11588e7c70ad08903fd9 [diff]

tdf#158532 sw: fix toolbar buttons remain disabled after pasting an image

Bisected with: bibisect-linux64-24.8
Comment 2 Xisco Faulí 2025-04-10 12:51:52 UTC
Hi Miklos,
I know it might look surprising the bisected issue caused this issue but I reverted it locally and the issue goes away.

Comparing the created file before and after reverting the commit, I see:

            <w:r>
              <w:rPr/>
-              <w:t>0</w:t>
+              <w:t>6</w:t>
            </w:r>
            <w:r>
Comment 3 Miklos Vajna 2025-04-10 13:36:39 UTC
Xisco: thanks for the bisect. Indeed surprising, but these things happen. :-)

Another thing I would verify is: the problematic commit itself was a regression fix, so I wonder if there was just a window of time when this appeared to work (with serious side-effects) or the problem is that this was all fine and the above regression fix wasn't a full fix. Anyhow, just writing this for myself, I should take a proper look.
Comment 4 Xisco Faulí 2025-04-10 14:31:39 UTC
(In reply to Miklos Vajna from comment #3)
> Xisco: thanks for the bisect. Indeed surprising, but these things happen. :-)
> 
> Another thing I would verify is: the problematic commit itself was a
> regression fix, so I wonder if there was just a window of time when this
> appeared to work (with serious side-effects) or the problem is that this was
> all fine and the above regression fix wasn't a full fix. Anyhow, just
> writing this for myself, I should take a proper look.

Hi Miklos,
If I revert a586ce188086ff27b08b8a4de4672c07ddf8ed7c I can't reproduce tdf#158532. Could you please give it a try on your end ?
Comment 5 Miklos Vajna 2025-04-11 12:36:23 UTC
Xisco: you're right :-) I went to linux-64-24.8, checked out the state before the fix, pasting an image and quickly clicking away shows we have the right repro steps. Then doing the same on master with the revert, the bug doesn't happen. (I did this twice.)

Let me see if anything started to depend on this new behavior by accident; otherwise I'll revert + try to add a test to keep this formula use-case working.
Comment 6 Commit Notification 2025-04-11 16:19:53 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#166125 Revert "tdf#158532 sw: fix toolbar buttons remain disabled ...

It will be available in 25.8.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 7 Commit Notification 2025-04-15 09:03:19 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/87d69093995e13925dc0fcd466ef234828f1cd80

tdf#166125 Revert "tdf#158532 sw: fix toolbar buttons remain disabled ...

It will be available in 25.2.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 8 Commit Notification 2025-04-16 12:03:27 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/137a7fa96819d84557c9f1fb13e95d6a1e23d0c8

tdf#166125 Revert "tdf#158532 sw: fix toolbar buttons remain disabled ...

It will be available in 24.8.7.

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 Commit Notification 2025-04-23 12:49:52 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-25-2-3":

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

tdf#166125 Revert "tdf#158532 sw: fix toolbar buttons remain disabled ...

It will be available in 25.2.3.

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.