Bug 111854 - Formula objects are permanently deleted when tracking changes
Summary: Formula objects are permanently deleted when tracking changes
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: dataLoss
: 128485 143230 (view as bug list)
Depends on:
Blocks: Track-Changes
  Show dependency treegraph
 
Reported: 2017-08-16 09:46 UTC by Frederic Parrenin
Modified: 2025-12-18 03:12 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (9.96 KB, application/vnd.oasis.opendocument.text)
2017-08-31 15:58 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Parrenin 2017-08-16 09:46:37 UTC
Steps to reproduce:
- open a new .odt document
- type 'nf' and then click F3 to insert a numbered formula
- go to Edit > Track Changes > Save
- now select the whole document with CTRL-A and deleted
=> the formula object still appears (BTW, there is no way to see the formula is deleted, it should be strike-through).
- now save the document
=> the formula object is replaced with a box with 'Object 2' written in red
- now select all and discard the change
=> the formula is lost, it does not come back
Comment 1 Buovjaga 2017-08-31 15:58:04 UTC
Created attachment 135909 [details]
Example file

nf did not work for me, so here is a test file.

Reproduced.

Arch Linux 64-bit, KDE Plasma 5
Version: 6.0.0.0.alpha0+
Build ID: 4082b5874adddedf8332fe977b6bb47b6949b302
CPU threads: 8; OS: Linux 4.12; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on August 31st 2017

Arch Linux 64-bit
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 2 QA Administrators 2018-09-01 02:41:14 UTC Comment hidden (obsolete)
Comment 3 Frederic Parrenin 2018-09-03 08:05:43 UTC
This bug is still present in 6.0.5.
Comment 4 Frederic Parrenin 2018-09-03 08:10:26 UTC
It also present in 6.1.1.1.
Comment 5 NISZ LibreOffice Team 2019-11-05 15:18:07 UTC
*** Bug 128485 has been marked as a duplicate of this bug. ***
Comment 6 Gabor Kelemen (Collabora) 2021-07-13 17:23:07 UTC
*** Bug 143230 has been marked as a duplicate of this bug. ***
Comment 7 Matt K 2023-12-17 02:29:58 UTC
(In reply to Buovjaga from comment #1)
> nf did not work for me, so here is a test file.

I'm able to repro with the test file, but how did you insert the Formula?  I tried Insert->Field->More Fields..., but it doesn't insert the same type of Formula as in the test file and doesn't repro.
Comment 8 Buovjaga 2023-12-17 07:59:45 UTC
(In reply to Matt K from comment #7)
> (In reply to Buovjaga from comment #1)
> > nf did not work for me, so here is a test file.
> 
> I'm able to repro with the test file, but how did you insert the Formula?  I
> tried Insert->Field->More Fields..., but it doesn't insert the same type of
> Formula as in the test file and doesn't repro.

Try Insert - OLE Object - Formula Object.

Still repro observations from comment 0 except now there is an indication the object was deleted.

Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: 60(Build:1)
CPU threads: 8; OS: Linux 6.6; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
7.6.4-1
Calc: threaded
Comment 9 Matt K 2023-12-18 01:41:11 UTC
I was able to prevent the original formula from being lost on save by doing the following comment in the code of SwRangeRedline::Hide:

//case 2: DelCopyOfSection(nMyPos); break;

But the code still inserts a new Formula object and marks it deleted, so it seems like the original code is doing a delete then insert but I didn't find where yet.

Points of interest in the code:
- I bibisected the code change for "Mark image as deleted in track changes" to d845b91bcc6eb885c55494d4d4fab4ec09577e1d
- embobj.dll!DocumentHolder::CloseDocument
- smlo.dll!SmDocShell::Save
Comment 10 QA Administrators 2025-12-18 03:12:39 UTC
Dear Frederic Parrenin,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug