Bug 164413 - Compare feature does not work properly
Summary: Compare feature does not work properly
Status: RESOLVED DUPLICATE of bug 165993
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.8.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-21 14:07 UTC by madhavkiran.sodum
Modified: 2025-03-31 18:44 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
sample main text file (14.12 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-12-21 14:07 UTC, madhavkiran.sodum
Details
sample translation file (17.13 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-12-21 14:08 UTC, madhavkiran.sodum
Details
MSO Comparision (22.88 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-12-21 14:08 UTC, madhavkiran.sodum
Details
LO comparision (15.04 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-12-21 14:09 UTC, madhavkiran.sodum
Details
LO comparision (14.97 KB, patch)
2025-01-04 10:58 UTC, madhavkiran.sodum
Details
This my original file (5.09 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-03-24 06:12 UTC, madhavkiran.sodum
Details
This is the modified file with a change of softenter/line break (5.09 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-03-24 06:13 UTC, madhavkiran.sodum
Details
This is how LO compares (161.82 KB, image/png)
2025-03-24 06:16 UTC, madhavkiran.sodum
Details

Note You need to log in before you can comment on or make changes to this bug.
Description madhavkiran.sodum 2024-12-21 14:07:59 UTC
Created attachment 198205 [details]
sample main text file

I have two files, one is the main text and another is main text + its translation. When I compare the the two files using MSO, i get what i expect - the text which is common to both the documents is identified properly. But when i do the same with LO, i get a pretty poor result. Please see the files attached.
Comment 1 madhavkiran.sodum 2024-12-21 14:08:25 UTC
Created attachment 198206 [details]
sample translation file
Comment 2 madhavkiran.sodum 2024-12-21 14:08:48 UTC
Created attachment 198207 [details]
MSO Comparision
Comment 3 madhavkiran.sodum 2024-12-21 14:09:12 UTC
Created attachment 198208 [details]
LO comparision
Comment 4 Timur 2024-12-27 13:02:33 UTC
When reporting a bug, please:
1. use Compare properly, you seem to have used it in reverse
2. search for existing bugs, and there are those for Compare
3. attach minimal example where the issue and Experienced/Expected are easy to see, not 3 pages document with many formatting changes.
Comment 5 madhavkiran.sodum 2025-01-04 10:58:53 UTC
Created attachment 198376 [details]
LO comparision
Comment 6 madhavkiran.sodum 2025-01-04 11:03:34 UTC
(In reply to Timur from comment #4)
> When reporting a bug, please:
> 1. use Compare properly, you seem to have used it in reverse
Sorry, here is the correct file. please see if this helps.

> 2. search for existing bugs, and there are those for Compare
for some reason my search while filing this bug didn't show the existing bugs. but will keep a note of this.

> 3. attach minimal example where the issue and Experienced/Expected are easy
> to see, not 3 pages document with many formatting changes.
i wanted to show that LO compare is failing in these complicated cases. i had done the compare with the same complex documents in MSO and got the result attached.
Comment 7 madhavkiran.sodum 2025-03-22 11:37:15 UTC
I realized that the main issue is with line break (ASCII Char 10). LO is unable to compare two files when one file has line breaks. Could someone check this?
Comment 8 Mateusz Wlazłowski 2025-03-22 14:40:11 UTC
I can confirm that you seem to have used it in reverse. You first need to open the "new" file (test translation.docx), then press on Compare Document and open the "old" file (test main text.docx)

I would even say that the compare feature in LO works better in MSO as in LO it keeps the Center align of 'test translation.docx' where MSO does not. (according to the MSO file you provided, I did not test it myself)


I added a line break (ctrl+enter) as you suggested in both files and I could successfully compare the two files.


> LO is unable to compare two files when one file has line breaks.
Does it give any error? Try to restart in safe mode (Help -> Restart in Safe Mode -> Restart -> Continue in Safe Mode)



Version: 24.8.5.2 (X86_64) / LibreOffice Community
Build ID: fddf2685c70b461e7832239a0162a77216259f22
CPU threads: 8; OS: Linux 6.11; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: CL threaded


Version: 25.2.1.2 (X86_64) / LibreOffice Community
Build ID: d3abf4aee5fd705e4a92bba33a32f40bc4e56f49
CPU threads: 8; OS: Linux 6.11; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Flatpak
Calc: threaded
Comment 9 madhavkiran.sodum 2025-03-24 06:12:58 UTC
Created attachment 199992 [details]
This my original file
Comment 10 madhavkiran.sodum 2025-03-24 06:13:48 UTC
Created attachment 199993 [details]
This is the modified file with a change of softenter/line break
Comment 11 madhavkiran.sodum 2025-03-24 06:16:04 UTC
Created attachment 199994 [details]
This is how LO compares

LO thinks that the second line in each paragraph is shifted. whereas MSO (i can't give an MSO screenshot since i don't have it) does not.
Comment 12 madhavkiran.sodum 2025-03-24 06:17:40 UTC
(In reply to opp from comment #8)
> I can confirm that you seem to have used it in reverse. You first need to
> open the "new" file (test translation.docx), then press on Compare Document
> and open the "old" file (test main text.docx)
> 
> I would even say that the compare feature in LO works better in MSO as in LO
> it keeps the Center align of 'test translation.docx' where MSO does not.
> (according to the MSO file you provided, I did not test it myself)
> 
> 
> I added a line break (ctrl+enter) as you suggested in both files and I could
> successfully compare the two files.
> 
> 
In windows line break is (shift+enter). I used that.
Comment 13 Mateusz Wlazłowski 2025-03-25 21:56:52 UTC
I got it. Today I learned about shift+enter

I can confirm the bug (or the value of the enhancement request?).

I will bug triage and file a proper bug report when I'll have some time. I will resolve this one and open a new one, if that's okay with you. The aim is to provide a more descriptive bug report and to avoid confusion of others reading from the beginning of this thread.


Thank you for reporting this issue
Comment 14 madhavkiran.sodum 2025-03-26 04:34:53 UTC
Oh sure. But why not resolve it after you have filed the new bug? Lest it is forgotten.
Comment 15 madhavkiran.sodum 2025-03-26 04:35:15 UTC Comment hidden (obsolete)
Comment 16 Mateusz Wlazłowski 2025-03-31 18:44:41 UTC

*** This bug has been marked as a duplicate of bug 165993 ***