Issue 16398 - Compare Document doesn't compare tables
Summary: Compare Document doesn't compare tables
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 RC5
Hardware: PC Windows XP
: P3 Trivial with 30 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Keywords: oooqa
: 28325 96416 105525 (view as issue list)
Depends on:
Reported: 2003-07-03 11:59 UTC by Unknown
Modified: 2013-08-07 14:44 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

My patch to enable table comparison (1.45 KB, text/plain)
2007-11-22 13:34 UTC, andreas.martens
no flags Details
Document with table to comparison (6.64 KB, application/vnd.sun.xml.writer)
2007-11-22 13:40 UTC, andreas.martens
no flags Details
Document with table to comparison (6.69 KB, application/vnd.sun.xml.writer)
2007-11-22 13:40 UTC, andreas.martens
no flags Details
Document with table to comparison (6.65 KB, application/vnd.sun.xml.writer)
2007-11-22 13:41 UTC, andreas.martens
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Unknown 2003-07-03 11:59:38 UTC
1. create a new document
2. insert a default table
3. insert the text "hallo" into the first field
4. save the document as doc1.swx
5. change the text to "hallo, du da"
6. select edit -> compare document
7. open doc1.swx and click insert

Nothing happens, nothing is underlined.

Expected result:
The addition auf "du da" should be displayed and given
the choice to accept or deny it.

Version used:
German version of opennoffice 1.03
Operating system: windows xp.

Uwe Fechner
Comment 1 utomo99 2003-09-24 08:41:48 UTC
I can Reproduce the problem on 
OpenOffice 1.1 RC5(default Install, US), Win XP Pro Sp1. 
(And MS Office XP Sp2). 

But I am not sure it is bugs or feature 

Comment 2 utomo99 2003-09-26 09:49:01 UTC
change to new
Comment 3 jack.warchold 2003-09-29 11:44:49 UTC
reassigend to jw
set target to OOo2.0
Comment 4 jack.warchold 2003-10-13 11:54:38 UTC
reassigend to dvo

can you please take a look at this issue.
i set the target to OOo2.0 because es told me that you are currently 
working on redlining issues for the 2.0. please call back or change 
the target, if this is not fixable to OOo2.0
Comment 5 michael.ruess 2004-04-26 09:37:42 UTC
*** Issue 28325 has been marked as a duplicate of this issue. ***
Comment 6 michael.ruess 2004-05-04 14:18:06 UTC
No chance to make a reasonable implementation until OO 2.0. Target OO later now.
Comment 7 gendi 2005-02-04 18:04:51 UTC
I was able to replicate the problem on OOo 1.1.4 using Windows XP (service 
pack 2). The problem seems to only exist with all table compares only, even if 
the difference is in a totally different cell, but if the 2 documents have 
different non-table text, it works fine.
Comment 8 pschrauth 2006-07-30 08:29:03 UTC
Comparing the contents of tables still seems to be a problem with OO 2.0.3. 
Changes are only reflected if complete cells are deleted or inserted, but not 
if only the contents of a cell was changed.
Comment 9 anthonyhall 2007-09-20 12:12:57 UTC
We are using open office (2.3) for comparing documents and this issue is a real 
headache for us.

Comment 10 andreas.martens 2007-10-12 12:45:34 UTC
Seems to be doable...
Comment 11 andreas.martens 2007-10-12 13:16:30 UTC
Fixed in CWS swqbf105
Comment 12 cno 2007-10-12 16:31:01 UTC
Great that this has been picked up!
Would it be possible to include the fix also in the 2.3.1 code line?
Comment 13 andreas.martens 2007-10-12 17:24:58 UTC
Technically possible, of course. But I don't think that this issue fulfills the
criteria for 2.3.1
Comment 14 anthonyhall 2007-10-16 12:37:56 UTC
Great news that this has been fixed - thank you

It would be great if it could go in 2.3.1

Many thanks

Comment 15 andreas.martens 2007-10-23 11:55:57 UTC
Ready for QA.
BTW: OOo is not able to compare a document with itself, i.e. open a document
"xy.odt", change something, compare with "xy.odt" again => nothing will be compared!
What I've fixed is the problem of _table_ comparison between _two_ documents.
Comment 16 andreas.martens 2007-10-23 14:53:10 UTC
Sorry to say that, but I've to remove this issue from CWS swqbf105 because of
the occurrence of new crashes.
I will create a new CWS for this issues where I am planning to solve all
problems we get if we enable table comparison. 
Comment 17 andreas.martens 2007-10-23 14:54:27 UTC
Reassigned to myself again :-(
Comment 18 andreas.martens 2007-11-22 13:33:39 UTC
I tried to enable doc comparison for table content but run into trouble even
with your fix for issue 73682
Comment 19 andreas.martens 2007-11-22 13:34:41 UTC
Created attachment 49820 [details]
My patch to enable table comparison
Comment 20 andreas.martens 2007-11-22 13:40:10 UTC
Created attachment 49821 [details]
Document with table to comparison
Comment 21 andreas.martens 2007-11-22 13:40:59 UTC
Created attachment 49822 [details]
Document with table to comparison
Comment 22 andreas.martens 2007-11-22 13:41:49 UTC
Created attachment 49823 [details]
Document with table to comparison
Comment 23 andreas.martens 2007-11-22 13:55:24 UTC
I checked your patch from issue 73682 together with my patch (see attachment
It works fine e.g. if I compare doccomp01c.odt with doccomp01b.odt.
But if I compare doccomp01a.odt with doccomp01b.odt, it does not look like
expected. And if I accept the first deletion and try to undo this action
afterwards, I'll run into trouble (C++ exception etc.).
So it looks like my patch needs some improvement. If you are interested in this
issue, your help would be very well appreciated!
Comment 24 2007-11-26 06:33:39 UTC
I would love to. :-)  Hope I can help.
Comment 25 andreas.martens 2008-01-07 12:52:14 UTC
Sorry to say:
New target OOo3.0.
I set the target for swredline02 to OOo3.0 because I don't think that we should
integrate this CWS in the current version into OOo2.4. (Too much side-effects,
too less time to solve all problems)
Comment 26 andreas.martens 2008-01-07 12:53:49 UTC
New target OOo3.0
Comment 27 andreas.martens 2008-05-27 13:20:56 UTC
Retarget to OOo3.1
Comment 28 Mathias_Bauer 2008-11-05 13:38:25 UTC
There are too many open questions to finish in 3.1.
Comment 29 eric.savary 2008-11-21 12:25:15 UTC
*** Issue 96416 has been marked as a duplicate of this issue. ***
Comment 30 larysahitekschool 2009-04-23 22:02:41 UTC
I can reproduce the problem on OOo-dev3.2.0 DEV300m44.
Comment 31 sergey_feo 2009-04-28 20:15:50 UTC
(excuse me for my bad english)

Can reproduce bug with OpenOffice Writer 3.0.0 under Windows XP and 3.0.1 under
Slackware 12.1. 

May be OpenOffice can say something like "Comparing documents with tables is
unsupported yet" if it find any tables when comparing documents? It is temporary
"solution" before bug will be fixed. IMHO it will be much better than deceiving
user. Now user ask OpenOffice to compare documents, see that OpenOffice did not
report any differences for tables and can think that tables really equivalent.
This is bad. Sincere warning will be better.
Comment 32 cno 2009-04-28 20:35:37 UTC
Hi sergey feo,
Our friends of DeltaXML (also present at latest OOoCon) have made a fine
extension as (temporary) solution:
Comment 33 phil_ 2009-04-29 15:14:58 UTC
Dear cornouws,

thanks ever so much for this hint!

I didn't know of this extension yet, and in fact it does exactly what I need!
Not only tables are perfectly compared now, but also changes in images are shown.
Also, the comparison algorithm for normal text is better than the one of the
built-in comparison feature, which often shows whole text blocks as changed
instead of the individual word that was changed.

So thanks a lot also to the DeltaXML people!

I think this issue is resolved by this extension. :-)

Thanks again,
Comment 34 lendo 2009-09-25 10:11:54 UTC
The mentioned extension does NOT really solve the problem. It introduces a new
and only English interface that doesn't fit very well in OOo, the comparison
method requires to save the result in a new file(!), and most OOo users don't
know about extensions. The extension is only a time-consuming workaround for
some people. Hope AMA can spare time to create a new patch in the future. :)
Comment 35 ace_dent 2009-10-02 09:55:16 UTC
*** Issue 105525 has been marked as a duplicate of this issue. ***
Comment 36 floid 2009-12-22 20:23:43 UTC
Also affected, voting.

One awkward workaround appears be to paste your tables into spreadsheets (OO.o
Spreadsheet) and use its comparison feature.  However, you need to save out one
of the sheet documents before you can run the comparison, which is annoying.

So, two suggestions from a user:

-If doing this "right" is somewhat difficult, can it be band-aided by comparing
a checksum or hash for the entire table and doing something to indicate a
mismatch [for the entire table as an object]?  This would be way better than
failing silently.  (Presumably the hard part is not matching tables between
documents by name.)  

Getting a "false difference" if only "metadata" (like the table name) differs
would still beat getting a "false match" when it fails silently.

-If the functionality in Sheet works, maybe someone wants to patch its 
comparison function to support comparing Sheet1, 2, 3 etc. in one spreadsheet
"document".  That would take a couple steps out of the workaround and make it
almost-acceptable in the meantime.  Or perhaps there's robust code in there that
can be reused?
Comment 37 gleppert 2010-03-17 23:40:55 UTC
added myself to CC.
So far, this issue is scheduled for 3.3, at least according to the CWS where it
is in. Will we see it in 3.3?