You are here

Graphical Diff for ODF documents using OpenOffice.org

Submitted by craig on Mon, 15/06/2009 - 10:31am

At work we use Subversion for just about all our software project data: source code, design documents, reports. Design documents are usually in MS Word, Excel and Visio. TortoiseSVN is great at using MS Word's "track changes" feature to do a graphical diff of two versions of a document.

At home, I use Linux and Subversion, and also store my ODF (OpenOffice.org) documents in Subversion. So I've been interested in getting a graphical diff feature working for these documents too, which can be started from the command line, and ideally integrated with Subversion.

This script integrates nicely into Mercurial workflow using the extdiff extension. I've got it set up so I can just type hg oodiff file.odt to see how an ODF file within my Mercurial working copy has changed.

Hello. I should clarify—this code doesn't implement the feature, the feature already exists in OpenOffice. This code just automates it so a diff can be started from the command line. If you want to do a diff in OpenOffice.org via the menus, you can do it this way:

In OpenOffice.org (e.g. Writer) open the first document you want to compare

Select menu Edit-->Compare Document...

In the Open dialog box that comes up, choose the second document you want to compare