Compare documents sometimes doesn't show individual edits

Discuss the word processor
Post Reply
catbill
Posts: 81
Joined: Sun Oct 08, 2017 6:51 pm

Compare documents sometimes doesn't show individual edits

Post by catbill »

Clients need to be able to see my edits. However, when Record Changes is on, the program (OpenOffice or LibreOffice) lags so much that it becomes inefficient and annoying.

So, I started to use Compare Documents to show the edits. It works OK for some text but for reasons I don’t understand, it sometimes shows the original version of a block of text or paragraph as deleted and the edited version as inserted. I thought this might happen when a paragraph is heavily edited but I am not sure that is the problem. An example is attached.

My questions are:

Why does this happen?
What can be done to enable individual edits to show?

I have posted about this on both LO and OO forums. I will happily forward those posts here if someone can contribute insights or solutions.
Attachments
Compared Documents Cho example.odt
(76.67 KiB) Downloaded 85 times
LibreOffice 6.2.6.2
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Compare documents sometimes doesn't show individual edit

Post by John_Ha »

Try accepting all the edits on a copy of the file. Now compare that file with the original. Does it now work properly? If so it looks like AOO gets confused when doing the comparison when one file has edits which have not yet been accepted (even though you may have unticked Edit > Changes > Show changes).

NB 19 pages is rather too much to work through. Can you produce a few lines showing the problem "it shows the original version of a block of text or paragraph as deleted and the edited version as inserted".
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
catbill
Posts: 81
Joined: Sun Oct 08, 2017 6:51 pm

Re: Compare documents sometimes doesn't show individual edit

Post by catbill »

Hi John,

Thank you for your response.

Because I am using compare documents to avoid using record changes, record changes is not on when I make revisions.

I have uploaded an extract from the document. As you can see, in some cases, edited paragraphs are shown as if the entire paragraph were inserted text. These are followed by deleted versions of the same paragraph.

I have noticed that this often happens for two paragraphs at a time. That is, two paragraphs are shown as inserted, followed by two paragraphs shown as deleted.

This extract shows an exception that I have not seen before. The first paragraph does show edits and still is followed by a deleted version of the same paragraph.

In case you are wondering about the font, I often use white text on a dark background (better on the eyes). Sometimes when I do this in OpenOffice (not sure about LibreOffice) all of the text becomes yellow when I change the background back to white. I will probably make another post about this.

Any further thoughts would be appreciated.
Attachments
Compared Documents extract Cho example.odt
(34.5 KiB) Downloaded 90 times
LibreOffice 6.2.6.2
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Compare documents sometimes doesn't show individual edit

Post by John_Ha »

It would help if you uploaded two example files (say fred.odt and tom.odt) and told us precisely how you were doing the comparison. eg I open fred.odt and go Edit > Compare document ..., and navigate to tom.odt.

Are you certain that neither fred.odt and tom.odt have any recorded changes? Go Edit > Changes > Accept or reject ..., to check.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
catbill
Posts: 81
Joined: Sun Oct 08, 2017 6:51 pm

Re: Compare documents sometimes doesn't show individual edit

Post by catbill »

Sure. I meant to upload the starting files yesterday but must have gotten distracted. Sorry about that. All 3 documents should be attached.

This is what I did: I opened the file “Edited” then chose Edit>Compare Documents. In the Compare Documents window, I navigated to “Original,” opened that, and saved the result as “Compared Documents.”

Record Changes and Show Changes are turned off in both Original and Edited.

By the way, when I did this today, the result of the comparison looks different from the version yesterday. Today's version shows even fewer individual changes. I believe I started with the same files.

I hope that you can detect something that explains why this happens. Thanks again for your help.
Attachments
Compared documents 12-8-17.odt
(8.22 KiB) Downloaded 78 times
Edited 12-8-17.odt
(30.87 KiB) Downloaded 88 times
Original 12-8-17.odt
(31.96 KiB) Downloaded 81 times
LibreOffice 6.2.6.2
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Compare documents sometimes doesn't show individual edit

Post by John_Ha »

As far as I can see, everything works as expected when I do it.

I opened the file “Edited” and went Edit > Compare Documents ..., and navigated to “Original,” and opened it. This is what I see:
Clipboard01.png
The changes seem to correlate with what has happened: the content in green has been inserted into Edited; and the content in red has been deleted from Edited. I have set up Writer so that insertions are shown in green and deletions are shown in red - it makes it easier for me.

Note if I now go Edit > Changes ..., and un-tick Show, I get back to Edited without the changes.

Note also that when I select (highlight) an edit in the Accept or Reject Changes list, that edit is selected (highlighted) in the document.

Is this what you see? If not, can you post an image. In order to get the image to be less than 128kB I first saved it as a .GIF file (132kB), which reduced the colours from 24 bit to 8 bit, and then saved the GIF as a PNG, which reduced it further to 98kB.

See Tracking changes to a document in Chapter 3 - Working with Text in the Writer Manual.

If your problem is solved please view your first post in this thread and click the Edit button (top right in the post) and add [Solved] in front of the subject.
Attachments
JH_Compared.odt
My compared file
(34.17 KiB) Downloaded 86 times
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
catbill
Posts: 81
Joined: Sun Oct 08, 2017 6:51 pm

Re: Compare documents sometimes doesn't show individual edit

Post by catbill »

Thanks for taking a look.

I am not being clear enough. I did not insert or delete entire paragraphs, but that is what is shown using Compare Documents. I made edits within paragraphs. I am seeking assistance because the individual edits within paragraph do not appear.

To better understand this, please look at the text in the original and edited files. You will see that no entire paragraphs have been deleted and no entire paragraphs have been inserted.

Pasted below is a small example. As you can see, I inserted and deleted some text within the paragraph. Those edits are what I expect to see. Yet, when “Original” and “Edited” are compared, the entire paragraph in Original is deleted and the entire paragraph in Edited is inserted.

Please let me know if I am still not being clear enough. Thanks again.

Original:
The six industrial chemicals used for comparison were 1,1-Dichloroethane, 1,2-Dichloropropane, Methy ter buty ehter (MTBE), Perchloroethylene (Perc), 1,1,1-Trichloroethane, and Chlorobenzene. The trend of TCE and other six chemicals levels in the air were monitored in the Pawtucket area since 2001. To indicate the immediate impact of TCE reduction intervention, we compared the trend of concentration in the two years interval before and after the intervention.

Edited:
The six chemicals chosen were 1,1-dichloroethane, 1,2-dichloropropane, methyl tertiary butyl ether (MTBE), perchloroethylene (perc), 1,1,1-trichloroethane, and chlorobenzene. We compared the concentrations of each chemical in the two-year periods before and after the intervention.
LibreOffice 6.2.6.2
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Compare documents sometimes doesn't show individual edit

Post by John_Ha »

catbill wrote:I did not insert or delete entire paragraphs, but that is what is shown using Compare Documents. I made edits within paragraphs. I am seeking assistance because the individual edits within paragraph do not appear.
Sorry - missed that! I don't know why it is happening.

I think you need to do some structured diagnosis to try and identify how the problem is introduced.

1. Start with a simple file with one line of text. Make one edit adding text and one edit deleting text. Do the comparison. Does it work OK? If so
2. Make things more complex - try a page of text, make more than one edits. Do the comparison. Does it work OK? If so
3. Add some comments. Do the comparison. Does it work OK?

Continue until you have a document as complex as the one you are editing.

Another thought: If a file has been edited many times it seems to become "tangled". Create a new, empty text document > Insert > File ..., and bring in your original file. Save it. This seems to remove "tangles". Repeat with the other file. Repeat your test with these new files.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
catbill
Posts: 81
Joined: Sun Oct 08, 2017 6:51 pm

Re: Compare documents sometimes doesn't show individual edit

Post by catbill »

Hi John,

I did some testing as you suggested and this is what I found: Both formatting and length appear to affect the results of compare documents and the results are not consistent.

The attached documents use text that has been pasted from the original into new files. They illustrate the following:

When one-sentence files are compared, it works correctly when formatting has been removed but not if formatting has been retained. In those cases, an “inserted” paragraph is followed by a “deleted” paragraph.

However, when I removed the formatting and compared three (not one) sentences, it did not work properly either.

To add to the complexity, there are cases when the results are mixed, as in the file called “edits partially show.” In those cases, the first few words and the last few words in a paragraph are not changed, but in between, “inserted” text is followed by “deleted” text within the same paragraph. This does not appear to be a consistent result and I only saw it recently.

I tested the role of “Comments” but could not detect instances where they affected the outcome.

Since I have not found evidence of anyone else having this problem, it appears to be specific to me. But to be sure, have you used compare documents and found that it works correctly?

I would appreciate any further insights or suggestions.
Attachments
Edits Show-1 sentence-Formatting removed.odt
(11.83 KiB) Downloaded 77 times
Edits don't show-1 sentence-with formatting.odt
(13.91 KiB) Downloaded 79 times
LibreOffice 6.2.6.2
catbill
Posts: 81
Joined: Sun Oct 08, 2017 6:51 pm

Re: Compare documents sometimes doesn't show individual edit

Post by catbill »

Here are a couple more files.

Thanks again.
Attachments
Edits partially show-paragraph-formatting removed.odt
(19.02 KiB) Downloaded 78 times
Edits don't show-3 sentences-formatting removed.odt
(16.99 KiB) Downloaded 96 times
LibreOffice 6.2.6.2
catbill
Posts: 81
Joined: Sun Oct 08, 2017 6:51 pm

Re: Compare documents sometimes doesn't show individual edit

Post by catbill »

After doing more research, I finally found that this is a known bug in LibreOffice (and probably OpenOffice). My recommendation for anyone else trying to use compare documents is: If at all possible, save the files as MS Word files and then compare the documents. In my case, I can do that at the local library and hope that others can do so as well.
LibreOffice 6.2.6.2
Post Reply